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

22905 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 4efeec4b9d Bug 1663411 - Improve the speed of find-in-page when ending a pseudo-element mid-match. r=jfkthame
So what's going on here is that there are pseudo-elements that contain
stuff like content: "Note" or content: "Example".

So when you're searching for "entry", we find the `e`, and then all the
text nodes afterwards are of course in a different subtree... So we end
up ignoring them, but after having iterated through all the DOM first.

To avoid this, change a bit the code so that we check for different
blocks _before_ checking for different subtrees. There's no point to
keep matching once you're done with a block.

Differential Revision: https://phabricator.services.mozilla.com/D89365
2020-09-07 13:40:36 +00:00
David Teller 7ffc3a3d91 Bug 1652785 - Extract title, uri, window id for content processes;r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87972
2020-09-07 10:26:30 +00:00
Emilio Cobos Álvarez 938d1e79b0 Bug 1662259 - Don't create a non-extant docshell when doing static clones. r=kmag
If the docshell is not there already, it's probably not displayed or
what not.

Differential Revision: https://phabricator.services.mozilla.com/D89161
2020-09-07 00:54:38 +00:00
Emilio Cobos Álvarez a517c1994a Bug 1663283 - Fix printing of nested iframes. r=smaug
Cloning of the nested documents should be recursive, I am dum dum.

Differential Revision: https://phabricator.services.mozilla.com/D89313
2020-09-06 17:56:05 +00:00
Dorel Luca 2c75053824 Backed out changeset e4e4c1c090c5 (bug 1662259) as requested by dev. 2020-09-07 02:47:01 +03:00
Dorel Luca e2729fcc1b Backed out changeset 6645926d8c62 (bug 1663283) for web platform test failures in /html/browsers/windows/iframe-nested-print.html. CLOSED TREE 2020-09-06 20:52:15 +03:00
Emilio Cobos Álvarez 5721e02e22 Bug 1663283 - Fix printing of nested iframes. r=smaug
Cloning of the nested documents should be recursive, I am dum dum.

Differential Revision: https://phabricator.services.mozilla.com/D89313
2020-09-06 16:34:46 +00:00
Bogdan Tara 9d94551083 Backed out changeset 697a0ad573c6 (bug 1661174) for PromptDelegateTest failures CLOSED TREE 2020-09-06 14:21:38 +03:00
Emilio Cobos Álvarez e3494dcc5d Bug 1663140 - Don't block on window.print() if there are print callbacks. r=smaug
Not really a fan of this, but I can't think of a better alternative
really... Ideas welcome :)

The main issue is that in bug 1662975 we made window.print() not return
until the user has closed the print / print preview dialog (as it is
needed for some use cases). This matches other browsers, too.

We use an nsAutoSyncOperation here, in order not to violate the
run-to-completion invariants, which turns off micro-tasks, timers,
etc... However we'd still want promises inside mozPrintCallback to
resolve and such, which is a bit contradictory. It is really awkward to
have this behavior change based on whether we have a print callback...

Differential Revision: https://phabricator.services.mozilla.com/D89298
2020-09-06 10:57:48 +00:00
Emilio Cobos Álvarez f3c0650b5b Bug 1662259 - Don't create a non-extant docshell when doing static clones. r=kmag
If the docshell is not there already, it's probably not displayed or
what not.

Differential Revision: https://phabricator.services.mozilla.com/D89161
2020-09-02 23:16:34 +00:00
Marcos Cáceres d7901374c5 Bug 1661174 - restrict schemes supported by Web Share API r=edgar
Restrict to "loadable" URLs. Also exclude blob URLs.

Edgar,

This includes Marcos' fix.  Apparently I can push revisions without commandeering it, so the last few are mine alone.  What appears to have happened is that the fix bounced due to Windows builders not being configured to support sharing (I ran these locally and they pass).  Including these as expected failures on Windows seems to work (I ran this on try, and missed a test, as you can see from history).

Try run here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3ebecf71d5732d4dc0438f4d7b714f94b881353a (I since added wss to the expected failures).

Differential Revision: https://phabricator.services.mozilla.com/D88371
2020-09-02 11:52:16 +00:00
Narcis Beleuzu ace5336843 Backed out changeset 45df7207f4e1 (bug 1663140) for bc failure on browser_window_print.js 2020-09-06 05:43:56 +03:00
Emilio Cobos Álvarez 8e44628eb6 Bug 1663140 - Don't block on window.print() if there are print callbacks. r=smaug
Not really a fan of this, but I can't think of a better alternative
really... Ideas welcome :)

The main issue is that in bug 1662975 we made window.print() not return
until the user has closed the print / print preview dialog (as it is
needed for some use cases). This matches other browsers, too.

We use an nsAutoSyncOperation here, in order not to violate the
run-to-completion invariants, which turns off micro-tasks, timers,
etc... However we'd still want promises inside mozPrintCallback to
resolve and such, which is a bit contradictory. It is really awkward to
have this behavior change based on whether we have a print callback...

Differential Revision: https://phabricator.services.mozilla.com/D89298
2020-09-06 00:54:08 +00:00
Andreea Pavel bbb2c47458 Bug 1658791 - disable test_setting_opener.html on xorig fission r#?intermittent-reviewers r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D89090
2020-09-02 13:59:59 +00:00
Narcis Beleuzu 2fb77a351a Backed out 2 changesets (bug 1652785) for bc failure on browser_test_procinfo.js
Backed out changeset 7e71f3cff603 (bug 1652785)
Backed out changeset efdd8cffde2b (bug 1652785)
2020-09-04 11:57:28 +03:00
David Teller e071745684 Bug 1652785 - Extract title, uri, window id for content processes;r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87972
2020-09-02 12:59:49 +00:00
Emilio Cobos Álvarez c0f4091be3 Bug 1662975 - Don't return from window.print() until the print dialog is closed. r=jwatt
As much as I hate nested event loops, I think we need to do it for this
case :)

Hopefully print() already assumes nested event loops can happen because
of the native dialog so it's already properly set up for this.

Differential Revision: https://phabricator.services.mozilla.com/D89254
2020-09-03 17:03:06 +00:00
Bogdan Tara 473f41370a Backed out changeset 52d0f9a901a9 (bug 1662975) for nested_fullscreen.https.html failures CLOSED TREE 2020-09-03 23:41:38 +03:00
Emilio Cobos Álvarez 0d73b10ab3 Bug 1662975 - Don't return from window.print() until the print dialog is closed. r=jwatt
As much as I hate nested event loops, I think we need to do it for this
case :)

Hopefully print() already assumes nested event loops can happen because
of the native dialog so it's already properly set up for this.

Differential Revision: https://phabricator.services.mozilla.com/D89254
2020-09-03 17:03:06 +00:00
Kagami Sascha Rosylight 22b54c0d15 Bug 1623413 - Part 3: Skip limiter check in CollapseToStart/End r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D88992
2020-09-03 03:45:24 +00:00
Kagami Sascha Rosylight 11ef0ef23e Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki
Depends on D88702

Differential Revision: https://phabricator.services.mozilla.com/D88920
2020-09-03 03:45:26 +00:00
Kagami Sascha Rosylight 8fb6badd8c Bug 1623413 - Part 1: Skip selection point check when called from JS r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D88702
2020-09-03 11:55:22 +00:00
Mihai Alexandru Michis 0600dacd03 Backed out 3 changesets (bug 1623413) for causing failures in Selection_collapse.html
CLOSED TREE

Backed out changeset d3d67293f115 (bug 1623413)
Backed out changeset 75ed1b8a5c67 (bug 1623413)
Backed out changeset 0eef32d6a454 (bug 1623413)
2020-09-03 05:37:49 +03:00
Kagami Sascha Rosylight e71291f1c8 Bug 1623413 - Part 3: Skip limiter check in CollapseToStart/End r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D88992
2020-09-02 23:42:27 +00:00
Kagami Sascha Rosylight 010d7de462 Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki
Depends on D88702

Differential Revision: https://phabricator.services.mozilla.com/D88920
2020-09-02 23:42:27 +00:00
Kagami Sascha Rosylight 1e311a886d Bug 1623413 - Part 1: Skip selection point check when called from JS r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D88702
2020-09-01 09:28:26 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Mirko Brodesser efa71ec384 Bug 1662700: enable "test_gsp-qualified.html" for xorigin iframes with Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89155
2020-09-02 17:10:26 +00:00
Emilio Cobos Álvarez 33caaa4bbb Bug 1661838 - Fix builds with --disable-printing. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D89166
2020-09-02 16:13:01 +00:00
Henri Sivonen d8f0184fa3 Bug 1613054 part 1 - Synchronously request frame focus when .contentWindow.focus() called on OOP iframe. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70800
2020-09-02 15:05:53 +00:00
Bob Owen 5cb94890b3 Bug 1661975: Add whether we have a selection to PrintPreviewResultInfo. r=jwatt
This is then used in the front end to set the option in the settings.

Differential Revision: https://phabricator.services.mozilla.com/D89045
2020-09-02 08:15:35 +00:00
Olli Pettay 185a44504b Bug 1661835 - DocShell::Initialize may change the state of nsFrameLoader, r=kmag
This is a guess fix based on possible reason for the crash.
Use of AutoScriptBlocker would be one option too, but better to return as early as possible.

Differential Revision: https://phabricator.services.mozilla.com/D88808
2020-09-02 03:21:34 +00:00
Emilio Cobos Álvarez 8a9cac4917 Bug 1662277 - Make IntersectionObserver entries have the same timestamp as other timestamp-returning things during the "update the rendering steps". r=sefeng
This is per spec, see the link in the test. I wouldn't see much point on
doing this for IntersectionObserver on its own, see:

  https://bugzilla.mozilla.org/show_bug.cgi?id=1518999#c28

Though I see the point of doing this for the paint timing API, and I
guess for consistency we should do it here too.

Differential Revision: https://phabricator.services.mozilla.com/D88926
2020-09-01 15:02:54 +00:00
Jonathan Watt ad76c1dcba Bug 1653340. Add new FrameLoader.printPreview() API. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88703
2020-09-01 11:00:36 +00:00
Mirko Brodesser 19b0c05274 Bug 1649121: part 86) Follow-up for part 79. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D88582
2020-08-31 12:30:57 +00:00
Mirko Brodesser 2b7b597062 Bug 1649121: part 84) Change some arguments of `SerializeNodePartiallyContainedInRange` from pointers to references. r=masayuki
Clearer.

Differential Revision: https://phabricator.services.mozilla.com/D88428
2020-08-31 12:30:52 +00:00
Mirko Brodesser ab5e8c5546 Bug 1649121: part 83) Rename arguments of `SerializeNodePartiallyContainedInRange` to conform to style-guide. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D88263
2020-08-31 12:30:49 +00:00
Mirko Brodesser 620047b95d Bug 1649121: part 82) Factor serializing node partially contained in range out. r=masayuki
Hides details. The new methods' arguments are renamed in the next
review.

Differential Revision: https://phabricator.services.mozilla.com/D88262
2020-08-31 12:56:31 +00:00
Mirko Brodesser 8011404f75 Bug 1649121: part 81) Factor serializing text node out of `RangeSerializer`. r=masayuki
Hides details.

Differential Revision: https://phabricator.services.mozilla.com/D88261
2020-08-31 12:30:44 +00:00
Mirko Brodesser c06429306a Bug 1649121: part 80) Factor determing start- and end-content out of `SerializeRangeNodes`. r=masayuki
Hides details.

Differential Revision: https://phabricator.services.mozilla.com/D88260
2020-08-31 12:30:41 +00:00
Mirko Brodesser 7cdff09446 Bug 1649121: part 79) Pass reference to `IncludeInContext` instead of pointer. r=masayuki
It's clearer.

Differential Revision: https://phabricator.services.mozilla.com/D88259
2020-08-31 12:30:39 +00:00
Edgar Chen 2990a39c60 Bug 1662124 - element.setPointerCapture should throw NotFoundError if the pointer id is invalid; r=smaug
https://github.com/w3c/pointerevents/issues/256

Differential Revision: https://phabricator.services.mozilla.com/D88859
2020-09-01 09:13:56 +00:00
Jan de Mooij 46f865b1a5 Bug 1661930 - Add GetScriptTranscodingBuildId and use it for both XDR and bytecode cache MIME type. r=nbp,tcampbell
This lets us include some extra flags in the MIME type that's used by the bytecode
cache. It also simplifies the XDR code a bit.

The approach is similar to Wasm's GetOptimizedEncodingBuildId.

Differential Revision: https://phabricator.services.mozilla.com/D88726
2020-08-31 19:38:31 +00:00
Alphan Chen 500f5e4d7c Bug 1585074 - Audit usage of nsIDocShellTreeItem in PendingFullscreenChangeList::Iterator::Iterator r=smaug,nika,xidorn
Differential Revision: https://phabricator.services.mozilla.com/D85988
2020-09-01 01:48:06 +00:00
Narcis Beleuzu 390c295af2 Backed out changeset 0f0b1fa85339 (bug 1662124) for morchitest failures on test_bug1080361.html . CLOSED TREE 2020-09-01 00:07:28 +03:00
Emilio Cobos Álvarez 28231ea1e1 Bug 1662204 - Prevent all printed documents, not just print preview, from getting a regular non-print presentation. r=jwatt
Before bug 1636728 this couldn't happen because print documents weren't
hosted in an <browser>. The presentation of documents that are being
printed should be managed by the print job.

We should, in fact, probably just make mDocument->IsStaticDocument() the
condition, or such.

Differential Revision: https://phabricator.services.mozilla.com/D88901
2020-08-31 20:16:11 +00:00
Edgar Chen 259f4671dd Bug 1662124 - element.setPointerCapture should throw NotFoundError if the pointer id is invalid; r=smaug
https://github.com/w3c/pointerevents/issues/256

Differential Revision: https://phabricator.services.mozilla.com/D88859
2020-08-31 19:10:23 +00:00
Kris Maglione c2c6945169 Bug 1650257: Part 2 - Abort SetNewDocument() if ancestors are discarded/cached. r=nika,smaug,sg
Differential Revision: https://phabricator.services.mozilla.com/D87486
2020-08-31 18:51:56 +00:00
Mihai Alexandru Michis 79a31b4702 Backed out changeset a2f86092c968 (bug 1661174) for causing wpt failures in share-url-invalid.https.html
CLOSED TREE
2020-08-31 17:12:24 +03:00
Marcos Cáceres 2428a9d35d Bug 1661174 - restrict schemes supported by Web Share API r=mt
Restrict to "loadable" URLs. Also exclude blob URLs.

Differential Revision: https://phabricator.services.mozilla.com/D88371
2020-08-27 06:11:54 +00:00
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