Граф коммитов

22905 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 9c192aa9ca Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 09:23:02 +00:00
Mihai Alexandru Michis 261d01524b Backed out changeset d0f173a90792 (bug 1519636) for causing bustages.
CLOSED TREE
2020-08-31 10:14:58 +03:00
Sylvestre Ledru 939dd426e6 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 06:51:21 +00:00
Edgar Chen 85d4338685 Bug 1653949 - Part 3: Dispatch MouseExitFromWidget event with proper ExitFrom type based on the "direction" of movement; r=smaug
There are three cases,
- Move to inner OOP frame.
- Move to outer OOP frame.
- Move to an OOP frame that is in different sub-tree.

We could use common BrowserParent ancestor to determine which case is and
dispatch MouseExitFromWidget event with proper ExitFrom type.

Depends on D84748

Differential Revision: https://phabricator.services.mozilla.com/D84761
2020-08-29 21:11:41 +00:00
Edgar Chen 55691da377 Bug 1653949 - Part 2: Add ePuppet to WidgetMouseEvent::ExitFrom; r=smaug
eTopLevel is reused in content process to indicates that the mouse leaves
the puppet widget rendering area, now we add a separated type, ePuppet, for it.

Differential Revision: https://phabricator.services.mozilla.com/D84748
2020-08-27 17:19:14 +00:00
Edgar Chen 36ccda1d13 Bug 1653949 - Part 1: Change mExitFrom in WidgetMouseEvent to be Maybe<ExitFrom>; r=smaug
mExitFrom now contains a value only when mMessage is eMouseExitFromWidget

Differential Revision: https://phabricator.services.mozilla.com/D88225
2020-08-27 17:19:03 +00:00
Anny Gakhokidze af962e7815 Bug 1589102 - Part 14: Unskip test test_window_cross_origin_props.html and mark as failing, r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D88228
2020-08-28 17:21:19 +00:00
Anny Gakhokidze 7e764895d7 Bug 1589102 - Part 13: Fix a race in process switching code due to reftest.js forcing a process switch, r=kmag
The race occurs when the parent changes the owner process for a BC, but the
child does not know about it and proceeds to call SetCurrentInnerWindowId on a
BC it no longer owns. To fix this, in child process, whenever we call
SetCurrentInnerWindowId on a BC, check that the BC is in process and that the
docshell has not been notified about an upcoming process change.

Differential Revision: https://phabricator.services.mozilla.com/D87934
2020-08-28 17:21:17 +00:00
Anny Gakhokidze bd0938ed77 Bug 1589102 - Part 3: Enable about:blank loads to take place via DocumentChannel, r=mattwoodrow
In process selection logic, ensure that we don't use the original URI for
about:blank and instead use the result principal. If the about:blank load has a
null principal, then revert to using the original URI.

Also, remove an extra about:blank load when an nsFrameLoaderOwner is changing
remoteness to prevent races.

Differential Revision: https://phabricator.services.mozilla.com/D85081
2020-08-28 17:20:40 +00:00
Anny Gakhokidze 8b553ecfcf Bug 1589102 - Part 1: Enable about:srcdoc loads via DocumentChannel, r=mattwoodrow
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.

Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.

We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.

Differential Revision: https://phabricator.services.mozilla.com/D85079
2020-08-28 17:20:30 +00:00
Emilio Cobos Álvarez ffbb5f66b7 Bug 1661446 - Don't assert that we still have a document in nsGlobalWindowOuter::Print. r=smaug
Even though the outer comes from the inner, and the inner always checks
HasActiveDocument(), that seems to be a bit of a lie, insofar
HasActiveDocument() only checks IsCurrentActiveWindow(), and that can
return true for an already-discarded page.

Throwing in this case seems acceptable.

Differential Revision: https://phabricator.services.mozilla.com/D88586
2020-08-28 15:57:59 +00:00
Andreas Farre 4d206b8241 Bug 1646996 - Proxy to main thread in ~DocGroup. r=smaug
When destroying the DocGroup, it will most certainly have no documents
attached to it, which makes labelling them a strange thing to do. And
the event target in DocGroup would most certainly dispatch to release
on the main thread anyway, so switch to do that right away.

Differential Revision: https://phabricator.services.mozilla.com/D88538
2020-08-28 10:14:39 +00:00
Emilio Cobos Álvarez b595041e81 Bug 1659897 - Rewind if needed when hitting a forced break in find-in-page. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D87584
2020-08-28 09:46:15 +00:00
Cosmin Sabou 403893bc7e Backed out 5 changesets (bug 1653949) for assertion failures on EventStateManager.cpp. CLOSED TREE
Backed out changeset ad7c35ab2a40 (bug 1653949)
Backed out changeset 31cb90ef998a (bug 1653949)
Backed out changeset 03e65cbd2a11 (bug 1653949)
Backed out changeset a87ac2a7db70 (bug 1653949)
Backed out changeset 390dd2c04cd4 (bug 1653949)
2020-08-27 20:13:20 +03:00
alwu bf59a9f003 Bug 1634494 - part3 : make content media controller per inner window. r=chunmin,smaug
Before applying this patch, `ContentMediaController` is per process, it might contains `ContentMediaControlKeyReceiver` coming from different browsing context, and we are not able to treat those receivers differently based on the browsing context they exist in.

The goal to change `ContentMediaController` per inner window is to allow us to have an ability to treat receivers in different browsing context with different operations without interering each other.

As the `ContentMediaController` control the media playback in web context, which life cycle is tight to the inner window, that is why I choose to create `ContentMediaController` on the inner window.

In addition, update the comment to make its up-to-date.

Differential Revision: https://phabricator.services.mozilla.com/D87142
2020-08-24 04:27:08 +00:00
Olli Pettay 8206cc1db2 Bug 1661462 - Add a pref to control min timeout delays in background windows before throttling has started, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D88414
2020-08-27 14:58:21 +00:00
Edgar Chen bbb093555e Bug 1653949 - Part 3: Dispatch MouseExitFromWidget event with proper ExitFrom type based on the "direction" of movement; r=smaug
There are three cases,
- Move to inner OOP frame.
- Move to outer OOP frame.
- Move to an OOP frame that is in different sub-tree.

We could use common BrowserParent ancestor to determine which case is and
dispatch MouseExitFromWidget event with proper ExitFrom type.

Differential Revision: https://phabricator.services.mozilla.com/D84761
2020-08-27 11:48:30 +00:00
Edgar Chen c4125fd9d4 Bug 1653949 - Part 2: Add ePuppet to WidgetMouseEvent::ExitFrom; r=smaug
eTopLevel is reused in content process to indicates that the mouse leaves
the puppet widget rendering area, now we add a separated type, ePuppet, for it.

Differential Revision: https://phabricator.services.mozilla.com/D84748
2020-08-26 20:31:46 +00:00
Edgar Chen 363e80d673 Bug 1653949 - Part 1: Change mExitFrom in WidgetMouseEvent to be Maybe<ExitFrom>; r=smaug
mExitFrom now contains a value only when mMessage is eMouseExitFromWidget

Differential Revision: https://phabricator.services.mozilla.com/D88225
2020-08-26 14:19:46 +00:00
Emilio Cobos Álvarez 7a25ed4dd9 Bug 1661388 - Never show the print progress dialog if we're calling window.print() with the new UI. r=jwatt
Depends on D88397

Differential Revision: https://phabricator.services.mozilla.com/D88398
2020-08-27 10:50:58 +00:00
Henri Sivonen 4dabc3a5b9 Bug 1661281 - Use standard if formatting in nsFocusManager.cpp. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88297
2020-08-26 15:48:13 +00:00
Henri Sivonen 38bcf98586 Bug 1653160 - Avoid re-raising the PuppetWidget of an already-focused OOP iframe upon click. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87859
2020-08-26 15:53:31 +00:00
Henri Sivonen 812f93262d Bug 1646537 - Use BrowsingContext (and IPC) in place of GetInProcessParent usage in nsGlobalWindowOuter::FocusOuter. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87576
2020-08-26 15:53:18 +00:00
James Teh 39c32ba853 Bug 1660363: Don't treat elements inside print preview documents as focusable. r=emilio,mstriemer
Previously, IsFocusable returned true on elements in print preview documents, but the element wouldn't accept focus.
This meant that when you tried to tab, focus would get stuck on the document.
Now, IsFocusable returns false.
Thus, tab doesn't try to stop on these elements and can move out of the document.

Differential Revision: https://phabricator.services.mozilla.com/D88000
2020-08-27 00:41:42 +00:00
Narcis Beleuzu c6ea928240 Backed out changeset d8a3ede94c32 (bug 1660363) for bc failures on browser_modal_print.js . CLOSED TREE 2020-08-27 06:08:03 +03:00
James Teh c364e2dd5d Bug 1660363: Don't treat elements inside print preview documents as focusable. r=emilio,mstriemer
Previously, IsFocusable returned true on elements in print preview documents, but the element wouldn't accept focus.
This meant that when you tried to tab, focus would get stuck on the document.
Now, IsFocusable returns false.
Thus, tab doesn't try to stop on these elements and can move out of the document.

Differential Revision: https://phabricator.services.mozilla.com/D88000
2020-08-27 00:41:42 +00:00
Hiroyuki Ikezoe 4e7ae7b866 Bug 1660490 - Reset `IsTopLevelContentDocument` and `IsContentDocument` depending on the given docshell in Document::SetContainer. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88244
2020-08-26 10:21:27 +00:00
Emilio Cobos Álvarez af5c4cc4cc Bug 1661248 - Remove CustomElementRegistry::AutoSetRunningFlag. r=edgar
We have standard utilities for such things.

Differential Revision: https://phabricator.services.mozilla.com/D88283
2020-08-26 12:36:18 +00:00
Masayuki Nakano 5bca4199fb Bug 1660378 - part 9: Avoid QI for getting `nsStyledElement` pointer r=smaug
The editor modules does QI too many times when it sets or removes some style
with `execCommand` or XPCOM API.  Therefore, there should be an API to
retrieve `nsStyledElement` pointer from `nsINode*`.

Differential Revision: https://phabricator.services.mozilla.com/D87990
2020-08-26 05:29:06 +00:00
Mihai Alexandru Michis 6d6f67bc0b Backed out changeset 44d25518ea20 (bug 1660363) for causing bc failures in browser_modal_print.js
CLOSED TREE
2020-08-26 09:07:18 +03:00
James Teh f30d80c39a Bug 1660363: Don't treat elements inside print preview documents as focusable. r=emilio,mstriemer
Previously, IsFocusable returned true on elements in print preview documents, but the element wouldn't accept focus.
This meant that when you tried to tab, focus would get stuck on the document.
Now, IsFocusable returns false.
Thus, tab doesn't try to stop on these elements and can move out of the document.

Differential Revision: https://phabricator.services.mozilla.com/D88000
2020-08-26 04:59:27 +00:00
Joel Maher 27932d4e6e Bug 1661132 - disable a few mochitests on osx opt. r=bc
disable a few mochitests on osx opt

Differential Revision: https://phabricator.services.mozilla.com/D88193
2020-08-25 21:48:25 +00:00
Peter Van der Beken 7f6d4f154e Bug 1660869 - Forward RemoveFromSessionHistory to the parent process for session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88061
2020-08-25 16:20:17 +00:00
Emilio Cobos Álvarez 72730e8e3d Bug 1636728 - Make calling window.print() before load keep deferring the actual printing and closing the window until load. r=smaug
Other engines also do this, but with my previous patch breaks it
(because we only hit print() on the print-content-viewer _after_ doing
the clone).

So move it before triggering all the machinery, and only for
window.print().  Given we didn't check this for print preview etc, I
think it's fine to carry on for user-triggered loads.

Trivial test-case (which I'm not quite sure how to turn into an
automated test...)

    <!doctype html>
    <h1>I do get printed but...</h1>

    <script>
      window.print();
    </script>

    <h2>Do I?</h2>

Note that this is broken with the new print preview UI already, this
fixes it.

Differential Revision: https://phabricator.services.mozilla.com/D87898
2020-08-25 17:45:24 +00:00
Emilio Cobos Álvarez 044b3c4332 Bug 1636728 - Centralize printing entry points in nsGlobalWindowOuter, and move cloning out of nsPrintJob. r=jwatt,geckoview-reviewers,smaug,agi
This centralizes our print and preview setup in nsGlobalWindowOuter so
that we never re-clone a clone, and so that we reuse the window.open()
codepath to create the browsing context to clone into.

For window.print, for both old print dialog / silent printing and new
print preview UI, we now create a hidden browser (as in with visibility:
collapse, which takes no space but still gets a layout box).

 * In the modern UI case, this browser is swapped with the actual print
   preview clone, and the UI takes care of removing the browser.

 * In the print dialog / silent printing case, the printing code calls
   window.close() from nsDocumentViewer::OnDonePrinting().

 * We don't need to care about the old print preview UI for this case
   because it can't be open from window.print().

We need to fall back to an actual window when there's no
nsIBrowserDOMWindow around for WPT print tests and the like, which don't
have one. That seems fine, we could special-case this code path more if
needed but it doesn't seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D87063
2020-08-25 17:45:12 +00:00
Simon Giesecke 7a092a0059 Bug 1660974 - Avoid merging signal slot lists in nsDOMMutationObserver::HandleMutationsInternal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88122
2020-08-25 10:04:03 +00:00
Henri Sivonen 0afda8358d Bug 1660764 - Reset mSetCompleteAfterDOMContentLoaded in Document::Open(). r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D88008
2020-08-25 04:20:42 +00:00
Stephen A Pohl e8197c08de Bug 1660813: Allow for Android to enable the new non-native theme via pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88040
2020-08-24 15:51:53 +00:00
Olli Pettay 5dd6f7cbe3 Bug 1660499 - nsHistory::GetSessionHistory() should use BC tree, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D87890
2020-08-24 13:11:39 +00:00
Emilio Cobos Álvarez 4dba1dc4b6 Bug 1636728 - Make a crashtest properly close its windows. r=smaug
This crashtest opens a gazillion popups via window.open() which then it
never closes.

This becomes a problem because other better-behaved crashtests in the
same subdirectory get their popups blocked by the popup blocker and then
time out when not removing the reftest-wait class, like this:

  https://searchfox.org/mozilla-central/source/dom/base/crashtests/1529203-2.html#17

This didn't happen before the first patch of this bug, because we were
aborting when creating these windows here, and after my patches we fall
back to opening in a new window:

  https://searchfox.org/mozilla-central/rev/3c98465c9d329625c4e1b22a7b832aabeafc4cc3/dom/ipc/ContentParent.cpp#5027-5030

I could restore the abort if preferred, but I don't think that's great.

Differential Revision: https://phabricator.services.mozilla.com/D87965
2020-08-24 12:02:01 +00:00
Kashav Madan 41b078549a Bug 1660537 - Null check mOwnerContent in GetWindowDimensions, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87903
2020-08-21 22:18:59 +00:00
Stephen A Pohl 5f4dc8c6b3 Bug 1657743: Add ability to enable the new non-native theming on Android. r=emilio,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D86268
2020-08-21 14:01:44 +00:00
Honza Bambas 2bc91fef35 Bug 1657974 - MOZ_LOG schedule and run of `FrameRequestCallback`, r=froydnj
Depends on D86740

Differential Revision: https://phabricator.services.mozilla.com/D86741
2020-08-13 14:41:16 +00:00
Honza Bambas b8311edfda Bug 1657968 - MOZ_LOG schedule and run of `mFrameLoaderFinalizers`, r=froydnj
Depends on D86739

Differential Revision: https://phabricator.services.mozilla.com/D86740
2020-08-13 14:41:16 +00:00
Simon Giesecke f77f8fd84c Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-21 09:54:48 +00:00
Razvan Maries 695a7a469b Backed out changeset 0d8222cd72dc (bug 1659897) for perma failures on browser_ext_find.js. CLOSED TREE 2020-08-20 22:59:03 +03:00
Emilio Cobos Álvarez 920d957119 Bug 1659897 - Rewind if needed when hitting a forced break in find-in-page. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D87584
2020-08-20 17:52:16 +00:00
Emilio Cobos Álvarez 54b5a9f5f5 Bug 1659457 - Do clone xml-pretty-printer's UA widget. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87714
2020-08-20 11:29:45 +00:00
Bogdan Tara a904137456 Backed out changeset 0327b662a05f (bug 1659674) for nsStorageStream related central bustage CLOSED TREE 2020-08-20 02:58:41 +03:00
Simon Giesecke cfd7d0ea9c Bug 1659923 - Avoid unnecessary copies around Base64Encode. r=xpcom-reviewers,necko-reviewers,froydnj,valentin
This also adds some more variants of Base64Encode and Base64EncodeAppend.

Differential Revision: https://phabricator.services.mozilla.com/D87559
2020-08-19 17:45:16 +00:00
Simon Giesecke 9352526320 Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-19 14:39:03 +00:00
Emilio Cobos Álvarez f04cda9679 Bug 1602410 - Make window.print() work with tab-modal printing. r=nika,geckoview-reviewers,agi
Do this by spinning the event loop until we've done the clone for
preview as appropriate.

This should be much less risky than finishing the previous patches
which would still be nice, but realistically landing them for 81 is not
going to happen.

This just returns without doing nothing in a couple cases, like when
there's already another modal dialog or such. That seems acceptable to
me, it's not clear what better way to do would be.

Differential Revision: https://phabricator.services.mozilla.com/D87484
2020-08-19 09:27:18 +00:00
Sonia Singla 5f5c9fd7f2 Bug 1659267 - Remove usages of -moz-user-select across the Firefox codebase. r=emilio,marionette-reviewers,geckoview-reviewers,preferences-reviewers,whimboo,agi
Differential Revision: https://phabricator.services.mozilla.com/D87499
2020-08-18 23:37:51 +00:00
Nika Layzell c9967fb452 Bug 1614524 - Part 3: Add a fission.remoteObjectEmbed pref, r=mattwoodrow
With these changes, there are still a number of test failures when remote
object/embed is enabled, due to svg sizing and resource timing tests. In order
to land these changes before those features are fixed, it will be placed behind
a pref.

Differential Revision: https://phabricator.services.mozilla.com/D86582
2020-08-18 16:49:45 +00:00
Nika Layzell d3bf603977 Bug 1614524 - Part 2: Add a test for embed element process selection and navigation, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D86581
2020-08-18 16:49:41 +00:00
Nika Layzell 482d731e3a Bug 1614524 - Part 1: Add support for process-switching object/embed loads, r=mattwoodrow,smaug,kamidphish
By passing a weak reference back to the DocumentChannelParent into
DocumentLoadListener for object loads, we are able to handle process switching
loads by asking the content process to create a BrowsingContext, and delaying
the real process switch until it becomes available.

The load then completes as it would before, acting as a normal process-switching
subframe load.

Differential Revision: https://phabricator.services.mozilla.com/D86580
2020-08-18 16:49:34 +00:00
Jon Coppeard 911a5d3265 Bug 1657850 - Add prefs to control how many background threads are used for GC r=sfink
This adds a thread count for GC parallel tasks calculated from GC parameters
for a helper thread ratio and max helper thread count. It also adds one to
report the number of helper threads used for GC.

This is slightly complicated by the fact that the helper thread system is
per-process and there are potentially many JS runtimes in a process. I
disallowed setting these parameters from workers (i.e. child JS runtimes), but
there may be more than one non-worker JS runtime so this isn't perfect.

I had to swap the mutex order for the GC and helper thread locks.  Whatever
reason they were the other way round seems to have gone and this order makes
more sense to me (I see the GC lock as being 'coarser' than the helper thread
lock).

Differential Revision: https://phabricator.services.mozilla.com/D86725
2020-08-18 15:38:24 +00:00
Kris Maglione 0c976d908a Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-08-17 20:22:12 +00:00
Kris Maglione 3af8c4138c Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-08-17 20:20:50 +00:00
Sean Feng 85bfe3d376 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Depends on D86392

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-17 15:41:19 +00:00
Sean Feng 3e76ddc640 Bug 1200896 - Make TopLayerPush to return void r=emilio
TopLayerPush has always been returning true, so returning it as a
boolean is incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D86392
2020-08-17 15:41:12 +00:00
Edgar Chen 15c713c7ae Bug 1648887 - Part 1: Turn the fuzzing test script into automation test; r=smaug
The assertion crash found by fuzzing is fixed after moving useraction state from
BrowsingContext to WindowContext, see bug 1611961.

Differential Revision: https://phabricator.services.mozilla.com/D85752
2020-08-06 14:49:05 +00:00
Edgar Chen b2ef530476 Bug 1611961 - Move UserActivationState from BrowsingContext to WindowContext; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83126
2020-08-17 11:02:34 +00:00
Kartikaya Gupta 0806eb1e4e Bug 1656223 - When exiting fullscreen, ensure the content viewer size is updated before first reflow. r=emilio
Instead of getting/setting the size on the view manager on a fullscreen
change, this updates the code to get/set the size on the content viewer, which
internally sets the size on the view manager. Doing this ensures that the
content viewer size is updated prior to the reflow, which is required for
the MobileViewportManager to update its internal notions of size and to update
the visual viewport properly.

Differential Revision: https://phabricator.services.mozilla.com/D87161
2020-08-15 20:02:19 +00:00
longsonr 09a2a0f739 Bug 1658455 - Remove eANIMATION and eFILTER from IsNodeOfType r=dholbert
- eANIMATION is the same as testing for SVGAnimationElement
- eFILTER is the same as testing for SVGFE

Differential Revision: https://phabricator.services.mozilla.com/D86695
2020-08-15 10:38:17 +00:00
Emilio Cobos Álvarez 4af1306128 Bug 1658469 - Don't clone UA widgets for printing. r=smaug
We run the widget initialization code regardless on bind, and some of it
doesn't deal with shadow roots being already populated.

Differential Revision: https://phabricator.services.mozilla.com/D86952
2020-08-14 16:27:49 +00:00
Kagami Sascha Rosylight 3742a0a9e0 Bug 1659028 - Move IsDisabled() from nsGeneralHTMLElement to Element r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D87022
2020-08-14 08:36:36 +00:00
Farooq AR 939092e602 Bug 1387355 - EventSource: ignore IDs with U+0000. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D85610
2020-08-13 07:54:15 +00:00
Mihai Alexandru Michis 073a6cee86 Bug 1654657 - Fix bustages caused by the backout of Bug 1200896 and conflicting changes to NotifyFullScreenChangedForMediaElement. a=bustage-fix
CLOSED TREE
2020-08-14 09:36:29 +03:00
Mihai Alexandru Michis fc1c9759fc Backed out 3 changesets (Bug 1200896) for causing Bug 1659042.
CLOSED TREE

Backed out changeset 17df14f0b129 (bug 1200896)
Backed out changeset 5d9e9bd12cd2 (bug 1200896)
Backed out changeset 7f016de8d52f (bug 1200896)
2020-08-14 09:06:45 +03:00
alwu 923ecc4e6a Bug 1658075 - part1 : move testing functions to new namespace 'MediaControlService'. r=smaug,chunmin
Create a new namespace `MediaControlService` to use those helper functions which is used to get the main controller related status.

Then, move those functions from `ChromeUtils` to `MediaControlService`, which give us two benefit. The first is that we can remove redudant test-only enum `MediaSessionPlaybackTestState`, the second is a pref-required work for bug1656398, to fix the build order error when exposing `MediaSessionPlaybackState` in the media controller's webidl.

Differential Revision: https://phabricator.services.mozilla.com/D86620
2020-08-14 01:32:10 +00:00
alwu 5643c8a32f Bug 1654657 - part1 : update fullscreen change in media element. r=chunmin
Calling `NotifyMediaFullScreenState()` is related with updating state on media controller, which is only used for media element. So it'd  be better to move that into media element.

Differential Revision: https://phabricator.services.mozilla.com/D85513
2020-08-14 01:23:28 +00:00
Sean Feng 7f368c5aa7 Bug 1653165 - Update PerformanceNavigationTiming before load event fires r=baku
Currently, we are not only updating the timing, but also sending
the timing to observers, which is not correct. According
to the Processing Modal of PerformanceNavigationTiming
(https://www.w3.org/TR/navigation-timing-2/#processing-model),
Queuing the task should be happened after user agent completes
the load event.

Differential Revision: https://phabricator.services.mozilla.com/D85507
2020-08-13 07:49:50 +00:00
Sean Feng 3f16476b10 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-13 19:05:37 +00:00
Sean Feng 514d0b9647 Bug 1200896 - Make TopLayerPush to return void r=emilio
TopLayerPush has always been returning true, so returning it as a
boolean is incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D86392
2020-08-10 20:11:11 +00:00
Csoregi Natalia c9c139cfd7 Backed out changeset fb664f6d43ed (bug 1657850) for failures on helper-thread-params.js. CLOSED TREE 2020-08-13 21:41:13 +03:00
Csoregi Natalia bd22249ff0 Backed out 2 changesets (bug 1658469) for assertion failures on nsVideoFrame.cpp. CLOSED TREE
Backed out changeset 08a78618c76c (bug 1658469)
Backed out changeset 5c8a07fc83ed (bug 1658469)
2020-08-13 21:13:08 +03:00
Jon Coppeard df6a3dabdf Bug 1657850 - Add prefs to control how many background threads are used for GC r=sfink
This adds a thread count for GC parallel tasks calculated from GC parameters
for a helper thread ratio and max helper thread count. It also adds one to
report the number of helper threads used for GC.

This is slightly complicated by the fact that the helper thread system is
per-process and there are potentially many JS runtimes in a process. I
disallowed setting these parameters from workers (i.e. child JS runtimes), but
there may be more than one non-worker JS runtime so this isn't perfect.

I had to swap the mutex order for the GC and helper thread locks.  Whatever
reason they were the other way round seems to have gone and this order makes
more sense to me (I see the GC lock as being 'coarser' than the helper thread
lock).

Differential Revision: https://phabricator.services.mozilla.com/D86725
2020-08-13 17:35:04 +00:00
Andrea Marchesini f0ba8be9c2 Bug 1658838 - Fix popup_middle_click.html test for fission, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D86973
2020-08-13 14:27:15 +00:00
Emilio Cobos Álvarez 6368b296b2 Bug 1658469 - When cloning a shadow root for printing, also copy the UA-widget-ness. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86952
2020-08-13 13:06:38 +00:00
Emilio Cobos Álvarez 3cc8263836 Bug 1658894 - Move selection range caching to Document::CreateStaticClone(). r=jwatt
This is needed to eventually make the print process able to process the
same static document twice.

Differential Revision: https://phabricator.services.mozilla.com/D86937
2020-08-13 11:11:35 +00:00
Dorel Luca dcd1938a78 Backed out changeset 178fa7e29bb6 (bug 1585070) for Browser-chrome failures in general/browser_windowactivation.js. CLOSED TREE 2020-08-12 20:10:46 +03:00
Andreas Farre 2f88f75c98 Bug 1646539 - Part 2: Add field on WindowContext tracking popup permission. r=nika
Popup permissions initialized with the result of checking if the
constructing WindowContext's principal is allowed to open a popup. The
field is updated for all WindowContexts sharing a principal whenever
the popup permission for that nsIPrincipal changes.

Differential Revision: https://phabricator.services.mozilla.com/D86378
2020-08-12 15:38:12 +00:00
Steven MacLeod 05066e9e52 Bug 1585070 - move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r=farre
A new `BrowsingContext` field, `isActiveBrowserWindow`, has been added
to track the active browser window for the `:-moz-window-inactive`
pseudoclass. This field takes the place of
`nsPIDOMWindowOuter::mIsActive`.

With this change `:-moz-window-inactive` is now fission compatible.

Differential Revision: https://phabricator.services.mozilla.com/D86422
2020-08-11 12:53:57 +00:00
Mirko Brodesser e56085c63f Bug 1649121: part 73) Factor `IsNodeContainedInRange` out. r=masayuki
Removes code duplication, abstracts details away.

Differential Revision: https://phabricator.services.mozilla.com/D86703
2020-08-12 11:10:06 +00:00
Emilio Cobos Álvarez 0c03ba166c Bug 1658471 - Remove dom.security.featurePolicy.enabled. r=baku
We've shipped it on by default since 74 (bug 1617219).

Differential Revision: https://phabricator.services.mozilla.com/D86665
2020-08-12 10:57:04 +00:00
Andrea Marchesini 47a7d0c69b Bug 1657742 - PopupBlocker doesn't block Middle mouse button click, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86801
2020-08-12 10:34:24 +00:00
Emilio Cobos Álvarez 6c008dd4fd Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-11 16:42:46 +00:00
Frederik Braun 6c85c74f16 Bug 1655716 - Introduce TYPE_INTERNAL_FETCH_PRELOAD and use in HTMLLinkElement::AsValueToContentPolicy() - r=emilio,mayhemer,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D85980
2020-08-11 12:33:14 +00:00
Emilio Cobos Álvarez 906c1a7801 Bug 1658470 - Remove layout.css.shadow-parts.enabled. r=heycam
Shipped since 72 (bug 1559074).

Differential Revision: https://phabricator.services.mozilla.com/D86661
2020-08-11 05:54:17 +00:00
Razvan Maries eed7de660b Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html. CLOSED TREE
Backed out changeset 23130282a937 (bug 1639328)
Backed out changeset 8628c5cddd14 (bug 1639328)
2020-08-11 05:13:41 +03:00
Emilio Cobos Álvarez 36a4392364 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 18:39:31 +00:00
Dan Glastonbury 787aa83bd7 Bug 1656925 - DocumentChannel: Don't add download loads to load group. r=mattwoodrow
Starting a load from a link click, to a link with the 'download' attribute
doesn't cancel any existing loads (since it's known to be just a download, not a
navigation, so doesn't need to replace the existing one). But then we have two
DocumentChannels alive at the same time, on the same loadgroup, the loadgroup
copies flags from the old one to the download one, since they're different, and
triggers the assert about setting LoadFlags.

The download one shouldn't really be added to the loadgroup; the progress of the
download should NOT block the 'load' event of the existing navigation.

Differential Revision: https://phabricator.services.mozilla.com/D85964
2020-08-10 15:10:31 +00:00
Razvan Maries 0dc0ced176 Backed out 2 changesets (bug 1200896) for perma failures on browser_pioneer_ui.js. CLOSED TREE
Backed out changeset c7ae88fd1bd7 (bug 1200896)
Backed out changeset 8b57f059e63e (bug 1200896)
2020-08-10 23:08:04 +03:00
Sean Feng 17473c0717 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-10 18:20:51 +00:00
Sean Feng 1f0a10a954 Bug 1200896 - Make TopLayerPush to return void r=emilio
TopLayerPush has always been returning true, so returning it as a
boolean is incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D86392
2020-08-07 17:13:15 +00:00
Emilio Cobos Álvarez b800731028 Bug 1655751 - Invalidate for CSSOM changes in a more fine-grained way. r=heycam
Also, for changes in CSS declarations, like changing
cssRules[i].style.color or something, we end up avoiding a lot of the
work we were doing.

This page still trips us in the sense that they add a stylesheet, then
call getBoundingClientRect(), then insert more rules in the stylesheet,
which causes us to rebuild a lot of the cascade data.

We could try to detect appends to the last stylesheet on the list or
something I guess, and avoid rebuilding the cascade data in some cases.

Depends on D85615

Differential Revision: https://phabricator.services.mozilla.com/D85616
2020-08-10 18:00:44 +00:00
Nika Layzell 28a9513c43 Bug 1656854 - Part 1: Block subframe creation in discarded BCs, r=farre
This should help catch and/or prevent any cases where we're creating a new
subframe at an unfortunate time during `BrowsingContext` or `WindowContext`
teardown.

Differential Revision: https://phabricator.services.mozilla.com/D85896
2020-08-06 14:03:30 +00:00
Razvan Maries b29c16e540 Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html and browser_hidden_iframe.js. CLOSED TREE
Backed out changeset be370bea0702 (bug 1639328)
Backed out changeset 954bf9f3dca5 (bug 1639328)
2020-08-10 21:02:42 +03:00
Emilio Cobos Álvarez f4905cc23b Bug 1639328 - Try to make the test more reliable. CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D86569
2020-08-10 16:20:01 +00:00
Emilio Cobos Álvarez 9d054b84e4 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 14:50:27 +00:00
Mirko Brodesser 1f712acadc Bug 1649121: part 72) Rename `mEndNodes` to `mInclusiveAncestorsOfEndContainer`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84834
2020-08-10 12:54:02 +00:00
Mirko Brodesser 70847b14fc Bug 1649121: part 71) Factor `DetermineLastContent` out. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84833
2020-08-10 12:53:50 +00:00
Mirko Brodesser 343ba883bf Bug 1649121: part 70) Move more code to `DetermineCandidateForLastContent`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84832
2020-08-10 12:43:13 +00:00
Mirko Brodesser 768316041d Bug 1649121: part 69) Factor `DetermineCandidateForLastContent` out. r=masayuki
Please see the following review too, because there more code is moved to
that method.

Differential Revision: https://phabricator.services.mozilla.com/D84831
2020-08-10 12:52:27 +00:00
Mirko Brodesser 2a0f6f803c Bug 1649121: part 68) Factor `DetermineFirstContent` out. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84795
2020-08-10 12:49:41 +00:00
Mirko Brodesser 3850a9eec3 Bug 1649121: part 67) Move more code to `DetermineCandidateForFirstContent`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84794
2020-08-10 12:42:50 +00:00
Mirko Brodesser 4d83d55c27 Bug 1649121: part 66) Factor `DetermineCandidateForFirstContent` out. r=masayuki
Please see the next review too, because it moves more code to that
method.

Differential Revision: https://phabricator.services.mozilla.com/D84793
2020-08-10 12:48:36 +00:00
Mirko Brodesser 14102fe248 Bug 1649121: part 65) Declare more methods in `ContentIteratorBase` `static`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84792
2020-08-10 12:42:40 +00:00
Mirko Brodesser a596885d18 Bug 1649121: part 64) Don't reuse local `offset` variable in `InitWithRange`. r=masayuki
Simplifies factoring determining `firstCandidate` and `lastCandidate`
out.

Differential Revision: https://phabricator.services.mozilla.com/D84791
2020-08-10 12:42:32 +00:00
Mirko Brodesser c864ad17c6 Bug 1649121: part 63) Factor `CacheInclusiveAncestorsOfEndContainer` out. r=masayuki
Hides details and "inclusive" ancestors is more precise.

Differential Revision: https://phabricator.services.mozilla.com/D84790
2020-08-10 12:47:05 +00:00
Mirko Brodesser c5b7430f3b Bug 1649121: part 62) Replace `bool ContentIterator::mPre` with `enum class`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84522
2020-08-10 12:46:29 +00:00
Mirko Brodesser 81b2cf7d74 Bug 1649121: part 61) Rename `mCommonParent` to `mClosestCommonInclusiveAncestor`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84510
2020-08-10 09:40:41 +00:00
Mirko Brodesser a280d7bf1f Bug 1649121: part 60) Declare some methods in `ContentIteratorBase` `static`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84509
2020-08-10 09:40:38 +00:00
Mirko Brodesser 568c938b9d Bug 1649121: part 59) Declare `mPre` `const`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D84491
2020-08-10 09:40:31 +00:00
Mirko Brodesser 59d52d5f33 Bug 1649121: part 58) Change `DetermineLastNode` to return the found node. r=masayuki
Clearer.

Differential Revision: https://phabricator.services.mozilla.com/D84371
2020-08-10 10:03:24 +00:00
Mirko Brodesser 3c61cc9fd4 Bug 1649121: part 57) Change `DetermineFirstNode` to return the found node. r=masayuki
Clearer.

Differential Revision: https://phabricator.services.mozilla.com/D84370
2020-08-10 09:40:15 +00:00
Frederik Braun 7c16ddcc54 Bug 1655714 - Add TYPE_INTERNAL_FRAME_MESSAGEMANAGER_SCRIPT and use in TryCacheLoadAndCompileScript(), r=kmag
The main point of this change is to not use TYPE_OTHER in `TryCacheLoadAndCompileScript()`,
for extra clarity, we're not using a catch-all TYPE_INTERNAL_SCRIPT.
This is why the changeset introduces a new type TYPE_INTERNAL_FRAME_MESSAGEMANAGER_SCRIPT
which in itself adds lots of changes to various files.

Differential Revision: https://phabricator.services.mozilla.com/D85977
2020-08-10 09:04:37 +00:00
longsonr 914ea37ede Bug 1653858 - Introduce concept of valid target for use elements and use it rather than listing out all elements r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D84104
2020-08-08 15:47:04 +00:00
Timothy Nikkel 2de46c6ff5 Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
AFAICT the spec says that these layout scrollbars that take up no layout space that scroll the visual viewport do affect the size of the visual viewport. (Double check this)

Most other users don't care about the size of these special scrollbars.

I left nsIDOMWindowUtils::getScrollbarSize unchanged (NB different from nsIDOMWindowUtils::getScrollbarSizes which is modified by this patch) because I'm less sure. I will file a followup about it.

Differential Revision: https://phabricator.services.mozilla.com/D85708
2020-08-07 11:40:52 +00:00
Kris Maglione 6dc4123fea Bug 1646519: Fix GetInProcessTopInternal usage in GetZone. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80092
2020-08-07 22:02:02 +00:00
Emilio Cobos Álvarez ac5f577b39 Bug 1657989 - Expose Document::mComposedShadowRoots to front-end code. r=smaug
Seems it's going to be useful for autofill / password-manager.

Differential Revision: https://phabricator.services.mozilla.com/D86415
2020-08-07 21:03:16 +00:00
Bogdan Tara 06a9a6d13f Backed out 11 changesets (bug 1656802) for async-scrolling reftests failures CLOSED TREE
Backed out changeset 941ee8aa9735 (bug 1656802)
Backed out changeset c5b1b38d1d35 (bug 1656802)
Backed out changeset fe2dd5de83ef (bug 1656802)
Backed out changeset 8e217fc1c6d4 (bug 1656802)
Backed out changeset 21f574f6acb4 (bug 1656802)
Backed out changeset 753f93dffe07 (bug 1656802)
Backed out changeset 386554110008 (bug 1656802)
Backed out changeset 2d3576ace2f1 (bug 1656802)
Backed out changeset 06a47c35c531 (bug 1656802)
Backed out changeset 57fa48542435 (bug 1656802)
Backed out changeset b1517bc33eff (bug 1656802)
2020-08-07 14:36:21 +03:00
Timothy Nikkel 2f60aa099a Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
AFAICT the spec says that these layout scrollbars that take up no layout space that scroll the visual viewport do affect the size of the visual viewport. (Double check this)

Most other users don't care about the size of these special scrollbars.

I left nsIDOMWindowUtils::getScrollbarSize unchanged (NB different from nsIDOMWindowUtils::getScrollbarSizes which is modified by this patch) because I'm less sure. I will file a followup about it.

Differential Revision: https://phabricator.services.mozilla.com/D85708
2020-08-07 10:05:10 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke dea5b543db Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83812
2020-08-07 07:42:50 +00:00
Marcos Cáceres 879706d3df Bug 1657788 - Refactor SendShare() to use promise instead of callback r=jya
Differential Revision: https://phabricator.services.mozilla.com/D85986
2020-08-07 02:38:41 +00:00
Marcos Cáceres 62d3c9edb3 Bug 1657071 - Restrict getGamepads() to secure contexts for Beta r=kip
release SecureContext restriction to 81 beta channel.

Differential Revision: https://phabricator.services.mozilla.com/D85830
2020-08-07 02:30:25 +00:00
Nika Layzell c366c291b9 Bug 1589517 - Part 4: Remove sameProcessAsFrameLoader, r=zombie,mconley,farre,smacleod
The functionality has been fully subsumed by the new
initialBrowsingContextGroupId attribute, so it is no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D85653
2020-08-06 17:01:13 +00:00
Nika Layzell 3759dc8c87 Bug 1589517 - Part 1: Add initialBrowsingContextGroupId attribute, r=farre
This attribute will subsume the existing sameProcessAsFrameLoader attribute. It
works by specifying the BrowsingContextGroup which the initial BrowsingContext
in a <browser> should be created within.

Due to bug 1652144, all documents within the same BrowsingContextGroup with the
same remote type will be loaded in the same process, meaning that specifying
both "initialBrowsingContextGroupId" and "remoteType" will cause the initial
about:blank document to be loaded in a specific content process.

Differential Revision: https://phabricator.services.mozilla.com/D85650
2020-08-06 17:01:06 +00:00
Emilio Cobos Álvarez 56efc18556 Bug 1657599 - Remove mozallowfullscreen code. r=smaug
I realized this was broken because feature policy was not accounting for
it (I fixed that in 79), but I _thought_ we weren't shipping
feature policy. It turns out we've been shipping it for a while (since 74),
so I'd rather remove support for it officially.

Differential Revision: https://phabricator.services.mozilla.com/D86191
2020-08-06 15:11:37 +00:00
Csoregi Natalia 8fa5e9e957 Backed out 3 changesets (bug 1648887, bug 1611961) for assertion failures on WindowContext.cpp. CLOSED TREE
Backed out changeset 3719f7db339d (bug 1648887)
Backed out changeset b7c7fcb5df37 (bug 1648887)
Backed out changeset ab82a9c613f8 (bug 1611961)
2020-08-06 17:43:51 +03:00
Edgar Chen a3e3fac3e8 Bug 1648887 - Part 1: Turn the fuzzing test script into automation test; r=smaug
The assertion crash found by fuzzing is fixed after moving useraction state from
BrowsingContext to WindowContext, see bug 1611961.

Differential Revision: https://phabricator.services.mozilla.com/D85752
2020-08-03 16:58:39 +00:00
Edgar Chen d2c2f39bd2 Bug 1611961 - Move UserActivationState from BrowsingContext to WindowContext; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83126
2020-08-06 10:25:00 +00:00
Butkovits Atila 3bd0e5497c Backed out 10 changesets (bug 1589102) for failure at browser_saveHeapSnapshot_e10s_01.js CLOSED TREE
Backed out changeset 0d22ad297b19 (bug 1589102)
Backed out changeset 14bcaf2a452c (bug 1589102)
Backed out changeset 20905f91e2bb (bug 1589102)
Backed out changeset 29ee0fbe855f (bug 1589102)
Backed out changeset d1f6185030af (bug 1589102)
Backed out changeset 31949872cc1d (bug 1589102)
Backed out changeset ec04e1a20597 (bug 1589102)
Backed out changeset ffe8da473b91 (bug 1589102)
Backed out changeset 3b92f7306c64 (bug 1589102)
Backed out changeset b187548e258f (bug 1589102)
2020-08-05 21:47:50 +03:00
Anny Gakhokidze 1f4b006e42 Bug 1589102 - Part 3: Enable about:blank loads to take place via DocumentChannel, r=mattwoodrow
In process selection logic, ensure that we don't use the original URI for
about:blank and instead use the result principal. If the about:blank load has a
null principal, then revert to using the original URI.

Also, remove an extra about:blank load when an nsFrameLoaderOwner is changing
remoteness to prevent races.

Differential Revision: https://phabricator.services.mozilla.com/D85081
2020-08-05 16:44:11 +00:00
Anny Gakhokidze e903c66d34 Bug 1589102 - Part 1: Enable about:srcdoc loads via DocumentChannel, r=mattwoodrow
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.

Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.

We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.

Differential Revision: https://phabricator.services.mozilla.com/D85079
2020-08-05 16:44:01 +00:00
Sean Feng 75047f597c Bug 1653474 - Process META elements when it's inserted r=smaug
Unlike other engine vendors, we process meta elements
at parser, instead of when they are inserted. This
leads some web compact issues.

This patch aligns us with other vendors.

Differential Revision: https://phabricator.services.mozilla.com/D84545
2020-08-05 16:32:57 +00:00
Sonia Singla 7e4a582215 Bug 1528649 - Remove the context parameter from nsInputStreamPump::AsyncRead. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D85154
2020-08-05 11:21:51 +00:00
John Dai 7e2fb3fe0d Bug 1556342 - Implement customElements.define's form-associated; r=edgar,smaug
Differential Revision: https://phabricator.services.mozilla.com/D85734
2020-08-05 09:35:56 +00:00
Simon Giesecke 1e6ec7ec86 Bug 1656117 - Reduce include dependencies on nsRefreshDriver.h. r=mstange
The abstract observer base classes are moved to a separate header file
nsRefreshObservers.h and the includes are adjusted accordingly.

Some method implementations are moved to the corresponding implementation files
to avoid the need to include the nsRefreshDriver.h file in the header.

Differential Revision: https://phabricator.services.mozilla.com/D85764
2020-08-04 21:17:50 +00:00
Henri Sivonen 4277dac0fe Bug 1656858 - Obtain principals differently in the parent process in SetFocusInner(). r=farre
Differential Revision: https://phabricator.services.mozilla.com/D85747
2020-08-05 06:30:44 +00:00
Cameron McCormack bca8782a80 Bug 1656801 - Fix typo in UserInteractionTimer name. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D85696
2020-08-04 15:06:11 +00:00
Nika Layzell 94ef7ca811 Bug 1653729 - Part 3: Add nsIDOMProcessChild::GetSingleton helper, r=kmag
This should make it easier to get an XPCOM interface from a JSProcessActorChild
in the current process, when combined with the do_QueryActor overloads from p2.

Differential Revision: https://phabricator.services.mozilla.com/D84069
2020-08-04 21:35:09 +00:00
Nika Layzell 1c71a222fc Bug 1653729 - Part 1: Generalize do_QueryActor API, r=kmag
This changes the set of types which can be passed as the second argument to
do_QueryActor to ones which can be unambiguously converted to a JSActorManager,
and combines nsCOMPtr_helper implementations.

Differential Revision: https://phabricator.services.mozilla.com/D84067
2020-08-04 21:34:29 +00:00
Anny Gakhokidze 2d1151529c Bug 1654922 - Part 1: Remove DocumentChannel pref usage from tests and document navigation code, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D85483
2020-08-01 16:36:12 +00:00
Andrew McCreight 3d43d61e95 Bug 1656953 - Add remoteType to nsIDOMProcessParent. r=nika
This will let people get information about the process more easily.

remoteType can't be infallible because it is a ACString.

Differential Revision: https://phabricator.services.mozilla.com/D85776
2020-08-04 16:50:00 +00:00
Sebastian Streich bf58055b03 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-08-04 11:10:41 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Marcos Cáceres c40f16142f Bug 1653199 - Add web-share permission policy r=ckerschb
Restrict navigator.share() to web-share permission policy

Differential Revision: https://phabricator.services.mozilla.com/D83903
2020-08-04 05:30:35 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
alwu 5d9d1322dd Bug 1656025 - Remove plugin related audio tests. r=baku
We're going to stop supporting Flash plugin soon, and we won't update the related code anymore. So we can remove those related tests which blocks Fission.

Differential Revision: https://phabricator.services.mozilla.com/D85312
2020-08-03 10:36:35 +00:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Sylvestre Ledru 843f943758 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D85678
2020-08-02 15:29:15 +00:00
Chris Peterson 25ffb2031c Bug 1655285 - Part 2: Return an "Intel" User-Agent string on ARM64 macOS. r=smaug
Safari returns an "Intel" User-Agent string (and "MacIntel" navigator.platform) on ARM64 macOS (presumably for web compat) and on iPadOS (so sites serve desktop page layouts). We should follow Safari's lead for Firefox on ARM64 macOS.

Note that I do not have an Apple Silicon DTK so I have not personally tested this change on ARM64 macOS. Based on visual inspection of our User-Agent string code, I expect Firefox's current User-Agent string on ARM64 macOS is "Mozilla/5.0 (Macintosh;  Mac OS X 10.16; rv:80.0) Gecko/20100101 Firefox/80.0" (and navigator.oscpu is " Mac OS X 10.16"). Note the missing "Intel" and extra space before "Mac OS X".

Example webcompat breakage even in mozilla-central: the Octane JS benchmark assumes Firefox's macOS navigator.platform will never return any values other than "MacIntel" or "MacPPC":

https://searchfox.org/mozilla-central/rev/dcd9c2d2bc19d96d487825eb70c2333a4d60994e/js/src/octane/gbemu-part1.js#659-669

Differential Revision: https://phabricator.services.mozilla.com/D84912
2020-08-01 06:04:33 +00:00
Chris Peterson 6f377421d2 Bug 1655285 - Part 1: Remove dead code for Mac PPC User-Agent string. r=necko-reviewers,smaug,dragana
Differential Revision: https://phabricator.services.mozilla.com/D84911
2020-08-01 06:04:10 +00:00
Emilio Cobos Álvarez 865d72310e Bug 1656596 - Add another missing null-check in our printing code. r=nordzilla
This code needs fuzzing desperately...

Differential Revision: https://phabricator.services.mozilla.com/D85631
2020-07-31 21:53:02 +00:00
Kashav Madan 49add6eaa8 Bug 1655520 - Replace nsDocShell::GetAllDocShellsInSubtree in OnPrefChange, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D85342
2020-07-31 18:16:32 +00:00
Jeff Walden e8f3f74ef6 Bug 1656411 - Move typed array, ArrayBuffer, and dataview-related functions out of jsfriendapi.h to two new headers. r=mgaudet,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D85524
2020-07-31 16:37:27 +00:00
Jeff Walden 15d7edd1cc Bug 1656411 - Move various stack limit-related functions (including reporting overrecursion) out of jsfriendapi.h to a new header. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D85523
2020-07-31 16:33:40 +00:00
Jeff Walden c9ab0ce005 Bug 1656411 - Move WindowProxy-related functions out of jsfriendapi.h to their own header. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D85521
2020-07-31 16:11:36 +00:00
Andreas Farre b13577d8e4 Bug 1613431 - Part 3: Handle synced setters return value. r=nika
Depends on D83646

Differential Revision: https://phabricator.services.mozilla.com/D83647
2020-07-31 13:37:13 +00:00
Andreas Farre 8d7d0ec85c Bug 1613431 - Part 2: Ignore synced setters return value. r=nika
Depends on D83645

Differential Revision: https://phabricator.services.mozilla.com/D83646
2020-07-31 13:37:00 +00:00
Alexey Izbyshev 21cd9b3b9c Bug 1652092 - Fix potential use of uninitialized value in Document::TopLayerPop(). r=sefeng,emilio
Differential Revision: https://phabricator.services.mozilla.com/D83155
2020-07-31 11:04:08 +00:00
Emilio Cobos Álvarez e7efd73f94 Bug 1581876 - Fix IntersectionObserver's rect to include all continuations. r=mstange
This does the same thing that getBoundingClientRect() does, which is
what the spec asks for, and thus fixes the intersection ratio for split
inlines where the first continuation is empty for example.

Differential Revision: https://phabricator.services.mozilla.com/D85385
2020-07-30 19:43:35 +00:00
Emilio Cobos Álvarez 28aa61be0a Bug 1655746 - Avoid crashing when getting error notifications from printing. r=jwatt
We could legitimately get multiple error notifications and we'd try to
reject the promise twice and crash.

Differential Revision: https://phabricator.services.mozilla.com/D85441
2020-07-30 17:32:03 +00:00
Stephen A Pohl 09651af1bd Bug 1640195: Address UX feedback for non-native widget styling. r=geckoview-reviewers,emilio,agi
Differential Revision: https://phabricator.services.mozilla.com/D76509
2020-07-30 17:02:02 +00:00
Steven MacLeod 2855b53b55 Bug 1587418 - check shortcuts permission using WindowContext. r=farre
We now use the cached value of the shortcuts permission from
`WindowContext` if we cannot get a `Browser`. This will now work
when calling from a child where the top-level document is OOP.

Differential Revision: https://phabricator.services.mozilla.com/D84183
2020-07-29 13:39:02 +00:00
Steven MacLeod baee2f562d Bug 1587418 - cache shortcuts permission on WindowContext. r=farre
We now cache the shortcuts permission in a synced field on
`WindowContext`. This will allow checking the permission quickly and
without IPC when Fission is enabled and the top-level document is
in another process.

Differential Revision: https://phabricator.services.mozilla.com/D84182
2020-07-30 12:26:24 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Nika Layzell d0686776d2 Bug 1648955 - Check parent WC is in-proc rather than parent BC nsDocShell to tree, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D85309
2020-07-30 12:27:12 +00:00
Noemi Erli 4d01914553 Backed out changeset 4fbc6775e743 (bug 1640195) for causing multiple failures CLOSED TREE 2020-07-30 02:58:03 +03:00
Stephen A Pohl 597bb7d3e0 Bug 1640195: Address UX feedback for non-native widget styling. r=geckoview-reviewers,emilio,agi
Differential Revision: https://phabricator.services.mozilla.com/D76509
2020-07-29 22:16:06 +00:00
Noemi Erli 5cebe61c77 Backed out changeset 4ed7b13fb7a5 (bug 1633710) for causing failures in browser_amosigned_url.js CLOSED TREE 2020-07-29 22:34:42 +03:00
Sebastian Streich ea482d8e73 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-07-29 17:33:10 +00:00
Emilio Cobos Álvarez 4379af48a1 Bug 1655741 - Don't assert that there's a primary frame as long as there's a scroll frame for the root scroll frame. r=mats
There's no correctness issue here, but the assertion is just wrong. For
the scrolling element we may get the root scrollable frame even though
the primary frame is null.

Differential Revision: https://phabricator.services.mozilla.com/D85160
2020-07-29 17:28:09 +00:00
Sebastian Streich 9644a40740 Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-07-29 11:50:09 +00:00
Sebastian Streich fb1d1dc1df Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

***
Fix triggeringSandboxflags passing

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-07-29 11:43:23 +00:00
Brad Werth f825199513 Bug 1228985 Part 1: Extend HTMLStyleElement to allow devtools to become the triggering principal. r=ckerschb,emilio
Differential Revision: https://phabricator.services.mozilla.com/D77557
2020-07-28 15:45:35 +00:00
Emilio Cobos Álvarez c685d51914 Bug 1655398 - Don't move the client area rect for the root scroll frame. r=mats
The spec really asks us to put the rect at GetUsedBorder().{top,left} in
this case, but I don't think that really makes sense, see
https://github.com/w3c/csswg-drafts/issues/5363.

Differential Revision: https://phabricator.services.mozilla.com/D84959
2020-07-28 11:17:36 +00:00
Narcis Beleuzu 6f07a2d9b7 Backed out changeset 31ebee098292 (bug 1655398) for wpt failure on client-props-root.html . CLOSED TREE 2020-07-28 03:49:28 +03:00
Olli Pettay bccd166233 Bug 1654088, make WindowWatcher methods to use CStrings and not char and make window.open throw the correct exception, r=farre,geckoview-reviewers,agi*
Differential Revision: https://phabricator.services.mozilla.com/D84604
2020-07-27 21:36:24 +00:00
Emilio Cobos Álvarez 85e37ee2ca Bug 1655474 - Prevent static documents from using l10n. r=zbraniecki
When we create a static document for printing, we clone all elements,
including <link rel=localization>. This means that
LocalizationLinkAdded/Removed etc do run for these documents.

However these documents don't come from the parser, which means that
we do block layout, but TriggerInitialTranslation and such do not run.

So we leave a stray onload blocker that we wait for as of bug 1648064,
so we wait forever and that is obviously not good.

Prevent these documents from using l10n, so as to avoid the problematic
situation.

Differential Revision: https://phabricator.services.mozilla.com/D85038
2020-07-27 20:15:14 +00:00
Emilio Cobos Álvarez 5b7c21f21b Bug 1655398 - Don't move the client area rect for the root scroll frame. r=mats
The spec really asks us to put the rect at GetUsedBorder().{top,left} in
this case, but I don't think that really makes sense, see
https://github.com/w3c/csswg-drafts/issues/5363.

Differential Revision: https://phabricator.services.mozilla.com/D84959
2020-07-27 20:07:19 +00:00
Narcis Beleuzu c6676771df Bug 1651357 - Disable browser_force_process_selector.js on Win10 & Linux1804 asan. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D84895
2020-07-27 03:20:43 +00:00
Emilio Cobos Álvarez 33defe2786 Bug 1654769 - Make clientRect offsets relative to the primary frame of the element. r=mats
We're returning offsets relative to the scroll target frame, which for
inputs and such is not the primary frame, and thus they never have
border or padding or what not.

Offsets should be relative to the primary frame however, so move the
rect appropriately.

Differential Revision: https://phabricator.services.mozilla.com/D84919
2020-07-26 18:56:37 +00:00
Emilio Cobos Álvarez 36cd507c54 Bug 1654683 - Avoid failing to set the search range for find due to nsRange security checks. r=smaug
We should probably switch nsRange to use CallerType instead of implicit
JSContext checks?

Differential Revision: https://phabricator.services.mozilla.com/D84803
2020-07-24 16:52:33 +00:00
Olli Pettay 9d7df9a34d Bug 1646799 - setInterval(..., 0) is not clamped, unlike setTimeout(..., 0), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D84395
2020-07-24 15:29:07 +00:00
Emilio Cobos Álvarez 05bbb6ac23 Bug 1652618 - Ensure UA widgets are attached and detached synchronously. r=smaug
This changes the UA widget setup (again). What is going on in this
test-case is that we have a marquee inside a video, two things that have
their own UA widget. Given how the code is currently written, the
runnable to attach and set up the marquee's widget is posted before than
the video one (which is potentially reasonable).

However that means that the marquee one runs before and flushes layout,
and catches the video in an inconsistent state (in the composed doc, but
without a shadow root). That in turn messes up reflow because
nsVideoFrame assumes stuff.

Rather than putting the attach / detach logic in script runners, just
run that bit synchronously, and post only the event async. I audited the
consumers of those events and it seems fine to me, they either already
deal with the possibility of the shadow root being already detached or
they don't care.

For teardown, none of the destructors of the UA widgets rely on the
shadow root being still attached to the element.

Differential Revision: https://phabricator.services.mozilla.com/D84487
2020-07-24 15:43:20 +00:00
Emilio Cobos Álvarez e8e49cddfa Bug 1358633 - Enable window.find on GeckoView. r=geckoview-reviewers,snorp
I just tested it on Fenix nightly and it works great. It better do
actually, as most of the code is shared with find-in-page.

See bug 750051 for when this was blocked. I don't think that was
properly understood at the time, but at this point the divergence from
desktop seems gratuitous.

This has caused compat issues in the past.

Differential Revision: https://phabricator.services.mozilla.com/D84758
2020-07-24 14:23:14 +00:00
Frederik Braun 887dadabf0 Bug 1648764 - map chromescripts into their own internal contentpolicytype r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D81336
2020-07-24 11:52:02 +00:00
alwu f54871ea84 Bug 1654959 - part1 : start listener when media enters fullscreen. r=bryce
When a media enters fullscreen mode, we should consider it as an important one which user might want to control. Therefore, start the listener in order to notify the media has been started, then we would update the fullscreen state [1] which would activate the controller.

[1] https://searchfox.org/mozilla-central/rev/9b282b34b5aa0f836beb735656c55efb2cc4c617/dom/base/Document.cpp#13429

Differential Revision: https://phabricator.services.mozilla.com/D84118
2020-07-24 02:43:33 +00:00
Gijs Kruitbosch 90ef37ddc1 Bug 1652613 - report slow script hang durations and only clear hang data after the observer notification, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D83989
2020-07-24 00:01:57 +00:00
Brad Werth 016fd9fee6 Bug 1648344 Part 3: Update test expectations for viewport tags width no width or initial-scale. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D84013
2020-07-24 00:16:32 +00:00
Brad Werth ab43f75521 Bug 1648344 Part 2: Cleanup Document to remove NoValidContent viewport type. r=hiro
The NoValidContent type was added to detect cases where we needed to apply
default width the viewport. That approach is no longer needed, and this
enum can be removed, as well as the code that sets and checks that enum.

Differential Revision: https://phabricator.services.mozilla.com/D84447
2020-07-22 23:11:42 +00:00
Brad Werth 3862a35baa Bug 1648344 Part 1: Apply default viewport width in more circumstances, matching Chrome. r=hiro
Setting the effective max-width to the default viewport width value this way
matches Chrome behavior and improves web compatibility.

https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/page/viewport_description.cc;l=94-101;drc=f668b0ef8c8813fd06387ec215a08f2df7dd1234?originalUrl=https:%2F%2Fcs.chromium.org%2F

Differential Revision: https://phabricator.services.mozilla.com/D84446
2020-07-22 23:46:18 +00:00
Dorel Luca 54d5f1c9ed Backed out 4 changesets (bug 1652613) for Browser-chrome failures in browser/browser_ProcessHangNotifications.js. CLOSED TREE
Backed out changeset 76b5a5d243d1 (bug 1652613)
Backed out changeset 6f98c9b01920 (bug 1652613)
Backed out changeset 1255237ce2e7 (bug 1652613)
Backed out changeset bdf59854c900 (bug 1652613)
2020-07-24 02:58:22 +03:00
Gijs Kruitbosch a75ccccec2 Bug 1652613 - report slow script hang durations and only clear hang data after the observer notification, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D83989
2020-07-23 22:12:16 +00:00
tkhan e778811453 Bug 1653400 - Add xorigin and fission annotations, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D84006
2020-07-23 18:05:05 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Cameron McCormack a2cd10927b Bug 1654099 - Look to the correct frame when determining root element styles for "potentially scrollable" check. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D84280
2020-07-23 00:59:16 +00:00
Jonathan Watt b7e932192e Bug 1652270. Convert nsFrameLoader::Print to return a Promise. r=farre,remote-protocol-reviewers,marionette-reviewers,jgraham,whimboo,mixedpuppy
(Instead of requiring callers to pass an nsIWebProgressListener.)

Differential Revision: https://phabricator.services.mozilla.com/D83249
2020-07-22 23:17:45 +00:00
Andrea Marchesini 6f244480a8 Bug 1612308 - Add a comment to BodyStream explaining why an expected state can't be asserted in a particular place. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D62409
2020-07-22 22:26:34 +00:00
Narcis Beleuzu ce05a24710 Backed out changeset 8323b7bb5e1a (bug 1652618) for mochitest failures on test_audiocontrols_dimensions.html . CLOSED TREE 2020-07-23 00:49:31 +03:00
Emilio Cobos Álvarez ae92038d84 Bug 1648064 - Make service workers of the original document intercept the static document's requests. r=smaug,asuth
We need to set the original document ASAP so images triggered from the
clone use the right service worker.

It is a bit unfortunate to have the static document checks twice, but we
may get to Document::GetClientInfo before the cloned doc has a window,
so it's not 100% clear to me how we could avoid it.

Differential Revision: https://phabricator.services.mozilla.com/D82081
2020-07-22 20:29:41 +00:00
Emilio Cobos Álvarez a52f803f4d Bug 1648064 - Make static clones have the CSP of the original doc. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D81997
2020-07-22 20:29:23 +00:00
Emilio Cobos Álvarez a1687ac170 Bug 1648064 - Make print preview documents wait properly for the document to be loaded. r=smaug
Otherwise my test fails intermittently on CI. We need to block on all
the load blockers because stuff like responsive images doesn't fire the
load directly but they do that as a micro task (blocking the load
event).

Differential Revision: https://phabricator.services.mozilla.com/D81989
2020-07-22 20:29:16 +00:00
Emilio Cobos Álvarez c965f056a3 Bug 1648064 - Disable lazy loading for print documents. r=hiro
This, along with the previous patches, allow lazy-loaded images to show
up in print, even if they haven't been loaded otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D81780
2020-07-22 20:29:08 +00:00
Emilio Cobos Álvarez 5f53233ca1 Bug 1648064 - Switch DOM images to work like CSS images for the purposes of printing. r=tnikkel,smaug
Make them perform the image load (if needed), instead of copying the
image requests from the original document.

This is needed for CSS for stuff like:

@media print {
  #foo::before {
    content: url(bar.png);
  }
}

And so on. For images, we should do this as well. Nothing prevents you
from doing:

  <picture>
    <source srcset="print.png" media="print">
    <source srcset="screen.png" media="not print">
    <img>
  </picture>

And that should in theory work. It works after this patch, and I added a
test for that.

This patch is a bit bigger than I'd like, but I didn't find a more
reasonable way to split it up.

Making static docs able to do image loads is most of the patch and is
mostly straight-forward. This allows to remove the hacky "change the
loading document" thing that CSS images do, which is just working around
the CSP of the print document.

I need to enable background colors in printpreview_helper so as to be
able to have a reference page for all the different image types.

Differential Revision: https://phabricator.services.mozilla.com/D81779
2020-07-22 20:29:00 +00:00
Emilio Cobos Álvarez 312039fb70 Bug 1652618 - Ensure UA widgets are attached and detached synchronously. r=smaug
This changes the UA widget setup (again). What is going on in this
test-case is that we have a marquee inside a video, two things that have
their own UA widget. Given how the code is currently written, the
runnable to attach and set up the marquee's widget is posted before than
the video one (which is potentially reasonable).

However that means that the marquee one runs before and flushes layout,
and catches the video in an inconsistent state (in the composed doc, but
without a shadow root). That in turn messes up reflow because
nsVideoFrame assumes stuff.

Rather than putting the attach / detach logic in script runners, just
run that bit synchronously, and post only the event async. I audited the
consumers of those events and it seems fine to me, they either already
deal with the possibility of the shadow root being already detached or
they don't care.

For teardown, none of the destructors of the UA widgets rely on the
shadow root being still attached to the element.

Differential Revision: https://phabricator.services.mozilla.com/D84487
2020-07-22 19:42:37 +00:00
Narcis Beleuzu 46367e2f7d Backed out 6 changesets (bug 1648064) for wp failures on test_printpreview.xhtml . CLOSED TREE
Backed out changeset 8ac892c60eda (bug 1648064)
Backed out changeset 189401f7b6e8 (bug 1648064)
Backed out changeset 2598e2706bd0 (bug 1648064)
Backed out changeset 4ec12eb9788c (bug 1648064)
Backed out changeset f735d4f6b21f (bug 1648064)
Backed out changeset 0fed6928b53d (bug 1648064)
2020-07-22 21:28:10 +03:00
Narcis Beleuzu 687f235fbc Backed out changeset f95c19e45ab2 (bug 1652270) for reftest failures on test-text.html . CLOSED TREE 2020-07-22 20:36:53 +03:00
Emilio Cobos Álvarez 91062db9ac Bug 1648064 - Make service workers of the original document intercept the static document's requests. r=smaug,asuth
We need to set the original document ASAP so images triggered from the
clone use the right service worker.

It is a bit unfortunate to have the static document checks twice, but we
may get to Document::GetClientInfo before the cloned doc has a window,
so it's not 100% clear to me how we could avoid it.

Differential Revision: https://phabricator.services.mozilla.com/D82081
2020-07-22 14:39:53 +00:00
Emilio Cobos Álvarez d088111466 Bug 1648064 - Make static clones have the CSP of the original doc. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D81997
2020-07-22 14:39:50 +00:00
Emilio Cobos Álvarez 636792f039 Bug 1648064 - Make print preview documents wait properly for the document to be loaded. r=smaug
Otherwise my test fails intermittently on CI. We need to block on all
the load blockers because stuff like responsive images doesn't fire the
load directly but they do that as a micro task (blocking the load
event).

Differential Revision: https://phabricator.services.mozilla.com/D81989
2020-07-22 14:39:47 +00:00
Emilio Cobos Álvarez c1dbabcffa Bug 1648064 - Disable lazy loading for print documents. r=hiro
This, along with the previous patches, allow lazy-loaded images to show
up in print, even if they haven't been loaded otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D81780
2020-07-22 14:39:45 +00:00
Emilio Cobos Álvarez 08db8b4b15 Bug 1648064 - Switch DOM images to work like CSS images for the purposes of printing. r=tnikkel,smaug
Make them perform the image load (if needed), instead of copying the
image requests from the original document.

This is needed for CSS for stuff like:

@media print {
  #foo::before {
    content: url(bar.png);
  }
}

And so on. For images, we should do this as well. Nothing prevents you
from doing:

  <picture>
    <source srcset="print.png" media="print">
    <source srcset="screen.png" media="not print">
    <img>
  </picture>

And that should in theory work. It works after this patch, and I added a
test for that.

This patch is a bit bigger than I'd like, but I didn't find a more
reasonable way to split it up.

Making static docs able to do image loads is most of the patch and is
mostly straight-forward. This allows to remove the hacky "change the
loading document" thing that CSS images do, which is just working around
the CSP of the print document.

I need to enable background colors in printpreview_helper so as to be
able to have a reference page for all the different image types.

Differential Revision: https://phabricator.services.mozilla.com/D81779
2020-07-22 14:39:43 +00:00
Jonathan Watt 8c0fb25348 Bug 1652270. Convert nsFrameLoader::Print to return a Promise. r=farre,remote-protocol-reviewers,marionette-reviewers,jgraham,whimboo,mixedpuppy
(Instead of requiring callers to pass an nsIWebProgressListener.)

Differential Revision: https://phabricator.services.mozilla.com/D83249
2020-07-22 15:54:01 +00:00
Simon Giesecke e443211b53 Bug 1653229 - Remove unnecessary includes for BindingUtils.h. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D83771
2020-07-22 15:12:10 +00:00
Emilio Cobos Álvarez 29d1c62b2a Bug 1654402 - Move window.matchMedia to the inner window. r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D84442
2020-07-22 10:09:50 +00:00
Bruno Bartolomasi 31220a63a4 Bug 1649686 - Test whether webCOOP+COEP is a prefix before testing whether web is a prefix;r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D83386
2020-07-22 09:38:49 +00:00
Mirko Brodesser 864cb782b0 Bug 1649121: part 56) Factor `DetermineFirstNode` out of `ContentIteratorBase::Initializer`. r=masayuki
Hides details.

Differential Revision: https://phabricator.services.mozilla.com/D84160
2020-07-22 00:54:31 +00:00
Mirko Brodesser 9f2b9f55fa Bug 1649121: part 55) Factor `DetermineLastNode` out of `ContentIteratorBase::Initializer`. r=masayuki
Hides details.

Differential Revision: https://phabricator.services.mozilla.com/D84161
2020-07-22 00:56:14 +00:00
Mirko Brodesser 34a8164638 Bug 1649121: part 54) Assert range boundaries in `ContentIteratorBase::Initializer` are set and valid. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D83968
2020-07-21 15:12:06 +00:00
Dorel Luca 990d081d9f Backed out 2 changesets (bug 1651519) for WPT failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 7b973a0e7be9 (bug 1651519)
Backed out changeset 55e9184c5617 (bug 1651519)
2020-07-22 02:47:34 +03:00
Kris Maglione d182c95351 Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-07-21 22:19:19 +00:00
Kris Maglione e7d942c77f Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 19:02:27 +00:00
Emilio Cobos Álvarez 2cee4550de Bug 1602347 - When asked for the DPI from an undisplayed subdocument, try to get it from ancestor documents before giving up and returning 1.0. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D84437
2020-07-21 22:01:10 +00:00
James Willcox ecaad75230 Bug 1639577 - Only suspend GeckoView tabs that are alone in their BrowsingContextGroup r=nika,geckoview-reviewers,agi
This avoids problems where a foreground tab tries to communicate with a background
tab via `window.opener`, but is unable to because the background tab
is suspended.

Differential Revision: https://phabricator.services.mozilla.com/D83693
2020-07-21 21:04:53 +00:00
Dorel Luca d91c6dc40b Backed out 2 changesets (bug 1651519) for wpt failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 52317abc5c68 (bug 1651519)
Backed out changeset 45448dca59a4 (bug 1651519)
2020-07-21 21:55:57 +03:00
Edgar Chen 2003a00dfc Bug 1608501 - Part 3: Clean up image request in DestroyContent; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D82875
2020-07-21 12:08:14 +00:00
Edgar Chen 797c3c86a1 Bug 1608501 - Part 2: Rename nsObjectLoadingContent::DestroyContent to ::Destroy; r=smaug
Depends on D82729

Differential Revision: https://phabricator.services.mozilla.com/D84341
2020-07-21 16:11:29 +00:00
Edgar Chen e10324adb1 Bug 1608501 - Part 1: Rename nsImageLoadingContent::DestroyImageLoadingContent to ::Destroy; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D82729
2020-07-21 12:08:14 +00:00
Kris Maglione 4a25531b4a Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-07-21 16:59:33 +00:00
Kris Maglione 9c2c147159 Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 16:59:28 +00:00
Kashav Madan ae956c4eef Bug 1653674 - Unskip passing fission tests, r=kmag
It's possible that some of these are still failing intermittently. We can't
really know without first unskipping them.

https://github.com/annygakh/audit-tests

Differential Revision: https://phabricator.services.mozilla.com/D84017
2020-07-21 15:42:48 +00:00
Paul Bone 291ecec432 Bug 1482089 - pt 1. Remove DOM code for processing GCTelemetry r=mccr8
This code glues the JS GC code that creates the telemetry with a JS module
that processes it.  This patch removes this code unhooking these
components.

Differential Revision: https://phabricator.services.mozilla.com/D84163
2020-07-21 05:18:28 +00:00
Doug Thayer 8f54209ef6 Bug 1651165 - Rename idle service r=Gijs,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83413
2020-07-20 16:06:59 +00:00
Dan Glastonbury 3aeba733f0 Bug 1646899 - P5: Fix test_bug375314. r=heycam
Move check from content to parent process.



Depends on D80407

Differential Revision: https://phabricator.services.mozilla.com/D80408
2020-07-21 01:01:07 +00:00
Dan Glastonbury 081870285c Bug 1646899 - P4: Handle object & embed via DocumentChannel. r=mattwoodrow,jya
Pass internal content policy type to DLL and switch behavior depending on type
being loaded. This implementation immediately redirects channel back to the
content process for further handling.



Depends on D80406

Differential Revision: https://phabricator.services.mozilla.com/D80407
2020-07-21 01:01:05 +00:00
Hiroyuki Ikezoe a6522ef178 Bug 1652190 - Set nsPresContext::mDynamicToolbarHeight in nsPresContext::SetDynamicToolbarMaxHeight. r=botond
nsPreContext::mDynamicToolbarHeight is representing the state of the dynamic
toolbar in transition or is being collapsed. So if we leave the value as it is,
we misrecognize the state, the visual viewport width/height are significantly
affected by the misrecognition, it returns 0 because in the collapsed or the
transition state, it returns the special value [1] which is never properly set
without calling nsPresContext::UpdateDynamicToolbarOffset.

This mismatching state doesn't much matter in the real sites since we don't
often change the max height of the dynamic toolbar but in automated tests it's
a big problem. In fact a test case which will be introduced in the next commit
will not work properly without this fix.

[1] https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/dom/base/VisualViewport.cpp#78

Differential Revision: https://phabricator.services.mozilla.com/D83902
2020-07-21 02:52:51 +00:00
Bogdan Tara f501f298c3 Backed out changeset e4b17772c446 (bug 1653199) for test_featureList.html failures CLOSED TREE 2020-07-21 02:27:55 +03:00
Marcos Cáceres 44767c82af Bug 1653199 - Add web-share permissions policy r=ckerschb
Adds "web-share" permissions policy

Differential Revision: https://phabricator.services.mozilla.com/D84121
2020-07-20 07:35:33 +00:00
Kris Maglione 375393a54d Bug 1653922: Add missing null check. r=nika
IsSameOrAncestor used to accidentally do this when it walked the parent chain
using docshells rather than BrowsingContexts.

Differential Revision: https://phabricator.services.mozilla.com/D84237
2020-07-20 20:39:11 +00:00
Mirko Brodesser 01f0739a5b Bug 1649121: part 53) Rename local variable `endIsData` in `ContentIteratorBase::InitInternal`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D83966
2020-07-20 12:26:09 +00:00
Mirko Brodesser f16296808d Bug 1649121: part 52) Factor `IsCollapsedNonCharacterRange` out. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D83965
2020-07-20 12:26:02 +00:00
Mirko Brodesser 11484d03fc Bug 1649121: part 51) Factor `IsSingleNodeCharacterRange` out. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D83964
2020-07-20 12:25:54 +00:00
Mirko Brodesser a8183a4452 Bug 1649121: part 50) Add members for start and end. r=masayuki
Allows adding methods operating on them.

Differential Revision: https://phabricator.services.mozilla.com/D83963
2020-07-20 12:27:15 +00:00
Mirko Brodesser 92d3e395ba Bug 1649121: part 49) Break a method object out for `ContentIteratorBase::InitInternal`. r=masayuki
Preparatory step to make that code readable.

Differential Revision: https://phabricator.services.mozilla.com/D83962
2020-07-20 12:25:37 +00:00
David Teller 94b50d3de1 Bug 1652000 - A little lifetime documentation;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83337
2020-07-20 09:42:48 +00:00
David Teller 23a82b7187 Bug 1652000 - Refactoring ChromeUtils::RequestProcInfo to place a single request to GetProcInfo;r=tarek,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D83335
2020-07-20 09:42:23 +00:00
Mirko Brodesser aee46efef9 Bug 1649121: part 48) Rename `MakeEmpty` in `ContentIteratorBase::InitInternal`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D83951
2020-07-20 01:35:57 +00:00
Mirko Brodesser 61c722d5cd Bug 1649121: part 47) Rename local variable `startIsData` in `ContentIteratorBase::InitInternal`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D83950
2020-07-20 08:59:08 +00:00
Marcos Cáceres e81cf9e516 Bug 1640086 - Add "gamepad" permission policy as self r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D81651
2020-07-20 03:08:23 +00:00
Cameron McCormack 938328e6b5 Bug 1650409 - Null check preload URL parsing. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D84035
2020-07-18 13:54:22 +00:00
Cosmin Sabou c562fee6cd Backed out 2 changesets (bug 1652000) for causing Bug 1653749.
Backed out changeset 69dbf38f4071 (bug 1652000)
Backed out changeset 0a6cb920a247 (bug 1652000)
2020-07-19 05:54:07 +03:00
Marco Bonardo 9717edb569 Bug 1637745. r=Gijs,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D80345
2020-07-17 13:45:58 +00:00
David Teller 15c3a336eb Bug 1652000 - A little lifetime documentation;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83337
2020-07-17 19:48:21 +00:00
David Teller 8c1c6283d4 Bug 1652000 - Refactoring ChromeUtils::RequestProcInfo to place a single request to GetProcInfo;r=tarek,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D83335
2020-07-17 20:32:43 +00:00
Alexander Surkov ebae5810be Bug 1647296 - ARIA reflection attributes are not nullable r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D82948
2020-07-17 14:48:09 +00:00
Jon Coppeard 3cd1ede76a Bug 1648453 - Fix build errors caused by MacOS headers defining check macro r=smaug
These patches have triggered a case where a MacOS header defines 'check' as a macro which then conflicts with use of 'check' as a method name in AccessCheck.h, probably due to unified builds.

This was fixed independently in a couple of places before, but I think it makes sense to move the fix to AccessCheck.h itself.

Differential Revision: https://phabricator.services.mozilla.com/D83796
2020-07-17 17:36:04 +00:00
Narcis Beleuzu a475e11422 Backed out 2 changesets (bug 1652000) for bustages on ChromeUtils.cpp . CLOSED TREE
Backed out changeset 5f02a357671c (bug 1652000)
Backed out changeset 22bb2a5032b7 (bug 1652000)
2020-07-17 20:16:32 +03:00
David Teller 37dd44228b Bug 1652000 - A little lifetime documentation;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83337
2020-07-17 16:21:26 +00:00
David Teller 7c291bdfd1 Bug 1652000 - Refactoring ChromeUtils::RequestProcInfo to place a single request to GetProcInfo;r=tarek
Differential Revision: https://phabricator.services.mozilla.com/D83335
2020-07-17 15:17:52 +00:00
Mirko Brodesser 16bc18dd68 Bug 1649121: part 46) Reference spec in `nsINode::AppendChild`'s documentation. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D83784
2020-07-17 08:44:40 +00:00
Cameron McCormack 4e13fec003 Bug 1620467 - Part 1: Remove appearance use counters. r=emilio
They have served their purpose.

Differential Revision: https://phabricator.services.mozilla.com/D83427
2020-07-16 22:03:54 +00:00
Kris Maglione 5cad4b348e Bug 1652849: Use NotifyWhenScriptSafe for some additional observers. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83845
2020-07-16 20:44:51 +00:00
Edgar Chen beeae4cb08 Bug 1653214 - Part 1: Merge implementations of nsDocShell::Create into nsDocShell::InitWindow; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83766
2020-07-16 20:42:02 +00:00
Razvan Maries 6767314b95 Backed out 4 changesets (bug 1648453) for hazzard bustages on CycleCollectedJSContext.cpp. CLOSED TREE
Backed out changeset 9598a75cca47 (bug 1648453)
Backed out changeset 473e7d55a25e (bug 1648453)
Backed out changeset 0afcee198ecd (bug 1648453)
Backed out changeset 623252539387 (bug 1648453)
2020-07-17 00:01:11 +03:00
alwu 6879e655b6 Bug 1647430 - part3 : remove `DocTreeHadPlayRevoked` related variable and method. r=nika
The telemetry probe, which is related with `mDocTreeHadPlayRevoked`, has already been removed, so we don't need these code anymore.

Differential Revision: https://phabricator.services.mozilla.com/D83163
2020-07-13 15:16:29 +00:00
alwu 37f08f36a0 Bug 1647430 - part2 : store `DocTreeHadAudibleMedia` in WindowContext. r=nika
After we enable Fissions, we can't always access the top level document because it might be in another process.

Therefore, we should move `mDocTreeHadAudibleMedia` from document to the top window context, which can ensure that we set the value correctly even if setting `mDocTreeHadAudibleMedia` happens in a different process which is different from the process where the top level document exists.

Differential Revision: https://phabricator.services.mozilla.com/D83162
2020-07-16 19:53:49 +00:00
alwu f88c326e31 Bug 1647430 - part1 : add a method to get top level window context. r=nika
Reuse same code and reduce the duplication.

Differential Revision: https://phabricator.services.mozilla.com/D83161
2020-07-14 02:18:22 +00:00
Kris Maglione c75a803c6e Bug 1646542: Fix GetInProcessParent usage in IsSameOrAncestor. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80097
2020-07-15 20:17:52 +00:00
Frederik Braun 38b4de3c94 Bug 1653232 implement GetInnerHTML() for DocFragments r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83775
2020-07-16 17:31:10 +00:00
Jon Coppeard f283a08ed4 Bug 1648453 - Fix build errors caused by MacOS headers defining check macro r=smaug
These patches have triggered a case where a MacOS header defines 'check' as a macro which then conflicts with use of 'check' as a method name in AccessCheck.h, probably due to unified builds.

This was fixed independently in a couple of places before, but I think it makes sense to move the fix to AccessCheck.h itself.

Differential Revision: https://phabricator.services.mozilla.com/D83796
2020-07-16 15:37:42 +00:00
Johann Hofmann d3d2546bda Bug 1645234 - Add more warnings to document.requestStorageAccess(). r=annevk,englehardt,baku
The only common failure case that's not being warned about now is when the user
rejected the prompt, which I think is expected behavior.

Differential Revision: https://phabricator.services.mozilla.com/D79597
2020-07-15 18:52:12 +00:00
Simon Giesecke 202c188ca0 Bug 1652960 - Remove unnecessary includes from Document.h. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83634
2020-07-15 15:48:53 +00:00
Simon Giesecke d39b639f56 Bug 1652942 - Remove some unnecessary includes of Element.h. r=smaug
Depends on D83632

Differential Revision: https://phabricator.services.mozilla.com/D83633
2020-07-15 13:55:24 +00:00
Simon Giesecke da069e50be Bug 1652942 - Remove unnecessary includes from Element.h. r=smaug
Depends on D83114

Differential Revision: https://phabricator.services.mozilla.com/D83632
2020-07-15 14:09:01 +00:00
Simon Giesecke 4e8c935384 Bug 1652023 - Remove unnecessary includes from PresShell.h. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83114
2020-07-15 13:53:02 +00:00
Simon Giesecke d017d73cd9 Bug 1652022 - Remove unnecessary includes from WritingModes.h. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D83113
2020-07-15 13:56:31 +00:00
Simon Giesecke 96fb649d21 Bug 1652017 - Remove unnecessary includes for expensive nsIFrame.h. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83111
2020-07-15 13:44:39 +00:00
Simon Giesecke 4d226e1175 Bug 1652020 - Remove unnecessary includes from nsIContent.h. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83109
2020-07-15 12:48:28 +00:00
Simon Giesecke 7701ae7587 Bug 1652003 - Remove unnecessary includes from gfxFont.h. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D83100
2020-07-15 12:47:28 +00:00
Simon Giesecke 1cd5c68592 Bug 1652002 - Remove some unnecessary includes from BindingUtils.h. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D83098
2020-07-15 15:34:49 +00:00
Dorel Luca 4681060e62 Backed out 3 changesets (bug 1367251) for Mda failures in /test_background_video_tainted_by_createimagebitmap.html. CLOSED TREE
Backed out changeset 871379f9b194 (bug 1367251)
Backed out changeset a76c2c98b33c (bug 1367251)
Backed out changeset a55cda2431fc (bug 1367251)
2020-07-15 16:37:32 +03:00
aardgoose b01831ccc4 Bug 1367251 - add bindings for options to createImageBitmap and support flipY r=bzbarsky,aosmond,baku
implementation of imageOrientation: none|flipY.
implementation of premultiplyAlpha: none|premultiply|default.

Differential Revision: https://phabricator.services.mozilla.com/D29562
2020-07-15 11:03:51 +00:00
Frederik Braun a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
Tim Huang 375ba2f130 Bug 1650655 - Don't get PermissionDelegateHandler if the document is not ready yet in nsGlobalWindowInner.cpp. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D83609
2020-07-15 10:04:40 +00:00
Edgar Chen a68dba13f7 Bug 1652921 - Remove notifying `inprocess-browser-shown` observer; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83607
2020-07-15 09:28:55 +00:00
alwu c52528ea6f Bug 1652460 - part2 : add a test. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D83550
2020-07-14 22:36:19 +00:00
Logan Smyth 283fb0d42d Bug 1196089 - Treat script sources introduced by DOM timers as anonymous. r=davidwalsh
Differential Revision: https://phabricator.services.mozilla.com/D83410
2020-07-14 15:03:53 +00:00
Jonathan Watt fc4433e514 Bug 1652683. Minor cleanup in nsGlobalWindowOuter::PrintOuter. r=bobowen CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D83468
2020-07-14 10:09:30 +00:00
Razvan Maries a62e79a7e8 Backed out changeset a246c21f820d (bug 1652683) for perma failures on nsCOMPtr.h. CLOSED TREE 2020-07-14 16:03:41 +03:00
Olli Pettay 58ab7096a2 Bug 1647431, make ReportShadowDOMUsage Fission compatible, r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D83471
2020-07-14 11:22:20 +00:00
Jonathan Watt 1f80851418 Bug 1652683. Minor cleanup in nsGlobalWindowOuter::PrintOuter. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D83468
2020-07-14 10:09:30 +00:00
tkhan 75ea54bf01 Bug 1650919 - Adding manifest annotations for xorigin test harness. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82763
2020-07-13 20:34:46 +00:00
Kris Maglione f57f59c446 Bug 1650562: Add missing null check for document BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D82988
2020-07-13 18:39:52 +00:00