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

22163 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez c3b7227771 Bug 1639392 - Merge nsIStyleSheetLinkingElement and nsStyleLinkElement, and call it LinkStyle. r=jwatt
Which is the spec term. nsIStyleSheetLinkingElement is even more
confusing since it may not be an element at all (see: processing
instructions).

Differential Revision: https://phabricator.services.mozilla.com/D76071
2020-05-21 03:07:16 +00:00
Emilio Cobos Álvarez 9bf325345b Bug 1639392 - Move nsIStyleSheetLinkingElement::OverrideBaseURI to its only implementation. r=jwatt
It's a PI thing, so keep it there.

Differential Revision: https://phabricator.services.mozilla.com/D76070
2020-05-21 00:40:31 +00:00
Emilio Cobos Álvarez 22b5f93899 Bug 1639392 - Make some nsStyleLinkElement methods final. r=jwatt
Depends on D76068

Differential Revision: https://phabricator.services.mozilla.com/D76069
2020-05-20 17:35:25 +00:00
Emilio Cobos Álvarez 7353713339 Bug 1639392 - Remove nsIStyleSheetLinkingElement::InitStyleLinkElement. r=jwatt
Always gets false as an argument, and the value starts false, so it's
just dead code.

Depends on D76067

Differential Revision: https://phabricator.services.mozilla.com/D76068
2020-05-20 17:35:25 +00:00
Emilio Cobos Álvarez 8fa3b075e8 Bug 1639392 - Remove unused nsIStyleSheetLinkingElement::GetStyleSheet. r=jwatt
Depends on D76003

Differential Revision: https://phabricator.services.mozilla.com/D76067
2020-05-20 17:35:25 +00:00
Csoregi Natalia 40b453bd7c Backed out 7 changesets (bug 1602757, bug 1612063) for browser-chrome failures on browser_resource_uri.js. CLOSED TREE
Backed out changeset 2556e3876602 (bug 1602757)
Backed out changeset 1c98ac1c4283 (bug 1602757)
Backed out changeset 2c7bf6206bb4 (bug 1602757)
Backed out changeset a0142f6bb65f (bug 1602757)
Backed out changeset 7f114ce6b98d (bug 1612063)
Backed out changeset d9b4b2cffaa5 (bug 1602757)
Backed out changeset 33515632a7db (bug 1602757)
2020-05-21 04:09:56 +03:00
Randell Jesup ce46a60d0a Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-20 22:38:42 +00:00
Andrea Marchesini e69aa140ef Bug 1639247 - Isolate DNS cache per first-party when privacy.partition.network_state is set to true - part 3 - implementation, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75985
2020-05-20 17:27:43 +00:00
Razvan Maries 958490b3c1 Backed out 4 changesets (bug 1639392) for build bustages on nsCOMPtr.h. CLOSED TREE
Backed out changeset 379e2c6c0491 (bug 1639392)
Backed out changeset ce2500faad38 (bug 1639392)
Backed out changeset cee5116fbef3 (bug 1639392)
Backed out changeset 7c5823c53db8 (bug 1639392)
2020-05-20 19:36:00 +03:00
Razvan Maries 02e0a1d9a4 Backed out 3 changesets (bug 1639247) for build bustages on on StoragePrincipalHelper.cpp. CLOSED TREE
Backed out changeset 48a854ee6710 (bug 1639247)
Backed out changeset 032d302608e4 (bug 1639247)
Backed out changeset 2d2ff22a0ea4 (bug 1639247)
2020-05-20 19:34:22 +03:00
Andrea Marchesini de934d0d8f Bug 1639247 - Isolate DNS cache per first-party when privacy.partition.network_state is set to true - part 2 - implementation, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75985
2020-05-20 15:25:35 +00:00
Emilio Cobos Álvarez 0b3825c885 Bug 1639392 - Move nsIStyleSheetLinkingElement::OverrideBaseURI to its only implementation. r=jwatt
It's a PI thing, so keep it there.

Depends on D76069

Differential Revision: https://phabricator.services.mozilla.com/D76070
2020-05-20 10:32:14 +00:00
Emilio Cobos Álvarez 824dca2f33 Bug 1639392 - Make some nsStyleLinkElement methods final. r=jwatt
Depends on D76068

Differential Revision: https://phabricator.services.mozilla.com/D76069
2020-05-20 10:32:12 +00:00
Emilio Cobos Álvarez 4b6f3e905b Bug 1639392 - Remove nsIStyleSheetLinkingElement::InitStyleLinkElement. r=jwatt
Always gets false as an argument, and the value starts false, so it's
just dead code.

Depends on D76067

Differential Revision: https://phabricator.services.mozilla.com/D76068
2020-05-20 10:30:32 +00:00
Emilio Cobos Álvarez a56ff6f29c Bug 1639392 - Remove unused nsIStyleSheetLinkingElement::GetStyleSheet. r=jwatt
Depends on D76003

Differential Revision: https://phabricator.services.mozilla.com/D76067
2020-05-20 15:39:33 +00:00
Brad Werth 823a2b0645 Bug 1638773: Allow initial-scale clamping when user-scalable=no, add WPT. r=hiro
This corrects the handling of user-scalable=no to first clamp scale (whether
specified or default) between min and max scales, then applies the resulting
value to initial-scale, min and max.

Differential Revision: https://phabricator.services.mozilla.com/D76056
2020-05-20 15:15:07 +00:00
Olli Pettay 9a394a854e Bug 1637712 - Consider to move *Ancestor* API to nsINode r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75169
2020-05-20 14:55:15 +00:00
Tom Tung d9d34b2983 Bug 1605176 - Send a error message data and cause a message error on the receiver side when the message data contains a shared memory object in BrowsingContext::PostMessageMoz; r=baku,kmag
Differential Revision: https://phabricator.services.mozilla.com/D75035
2020-05-20 08:27:16 +00:00
Tim Huang 4b67d42692 Bug 1639195 - Part 1: Make BrowserChild::RecvLoadURL() to use the correct triggering princpal. r=ckerschb,mattwoodrow
This patch makes the triggering princpal to be propagated to the
BrowserChild when calling LoadURL in nsFrameLoader. And use it as the
triggering principal for loading instead of the system principal.

Differential Revision: https://phabricator.services.mozilla.com/D75965
2020-05-19 20:22:34 +00:00
Peter Van der Beken ef557497ca Bug 1629866 - Store ChildSHistory on the BrowsingContext. r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D70997
2020-05-19 08:57:44 +00:00
Peter Van der Beken af82496fc7 Bug 1639310 - Remove unnecessary implicitJSContext annotations. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D76020
2020-05-19 20:48:21 +00:00
Coroiu Cristina a9c2a2b735 Backed out changeset bb7c330d407f (bug 1637307) for wpt failures at layout/generic/ViewportFrame.cpp on s CLOSED TREE 2020-05-20 00:01:55 +03:00
Dorel Luca 134e648c76 Backed out 6 changesets (bug 1631593) for Assertion failure in xpcom/base/nsCycleCollector.cpp. CLOSED TREE
Backed out changeset 35b4cd4bb12a (bug 1631593)
Backed out changeset a20b9fb485fc (bug 1631593)
Backed out changeset 8ade55be1042 (bug 1631593)
Backed out changeset ee3255e55ab3 (bug 1631593)
Backed out changeset 7d5a3d1035dc (bug 1631593)
Backed out changeset 90972e768c33 (bug 1631593)
2020-05-19 20:02:59 +03:00
Zibi Braniecki 3e0c621a68 Bug 1631593 - Lazify JSM initialization. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71834
2020-05-19 16:28:28 +00:00
Zibi Braniecki 907ab624b4 Bug 1631593 - Move generateBundles to be stored on Localization C++. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71814
2020-05-19 16:28:05 +00:00
Liang-Heng Chen 60404d1a7a Bug 1631676 - Part 3: Use global cookie behavior getter; r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D74214
2020-05-19 14:48:07 +00:00
Liang-Heng Chen 466189ebb4 Bug 1631676 - Part 2: remember FPI state in CookieJarSettings; r=baku,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D74050
2020-05-19 14:47:57 +00:00
sefeng ca6d5ba134 Bug 1637307 - Push/Pop dialog to top layer when needed r=smaug
This patch completes the top layer requirement for showModal()
Spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dom-dialog-showmodal

Differential Revision: https://phabricator.services.mozilla.com/D74922
2020-05-19 15:40:08 +00:00
Sebastian Streich 159ab546db Bug 1625845 - Remove GetUri in Navigator.cpp r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D68749
2020-05-19 14:51:40 +00:00
Dimi Lee 27c0acc692 Bug 1637194 - P4. Inherit the first-party domain from the parent document when creating CookieJarSetting in document r=timhuang,baku
This fixes a issue that about:blank page can't get correct first-party
domain when fission is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D75784
2020-05-19 09:47:42 +00:00
Tilden Windsor 6f2e45cfda Bug 1629604 - Fixed phrase not found in visible <script> and added a test for visible <script>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75824
2020-05-18 21:28:46 +00:00
Barret Rennie b042e254ba Bug 1635885 - Remove debug assertions that fail during process switch r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D75395
2020-05-18 20:47:56 +00:00
Honza Bambas d88ed92c5f Bug 1618548 - Make `Link: rel=preload` response header work with preload-as-speculative-load, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D75133
2020-05-18 17:33:57 +00:00
Jon Coppeard 5a5b2daeba Bug 1627711 - Remove unused nsDOMWindowUtils::IsIncrementalGCEnabled method r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75810
2020-05-18 16:09:45 +00:00
Emilio Cobos Álvarez 2c3b3a6166 Bug 1638127 - Fix a typo in an ifdef on a CLOSED TREE.
MANUAL PUSH: Mac bustage
2020-05-18 15:26:10 +02:00
Dimi Lee 267aee84fa Bug 1624269 - P4. Not using permission manager to sync HasStorageAccess. r=timhuang,baku
We already have an architecture to sync the storage access granted
result to all 3rd-party frames with the same tracking origin.
We use the same way to sync HasStorageAccess flag instead of relying
on permission manager update permissions to child processes.

Differential Revision: https://phabricator.services.mozilla.com/D73711
2020-05-18 11:04:48 +00:00
Dimi Lee 3cd4188086 Bug 1624269 - P3. Inform all the windows whose storage permission is granted. r=timhuang,baku
Before this patch, we only call StorageAccessGranted on windows that
triggers the storage heuristics. So even if we sync storage permission to the
other frames, their data will not be refreshed. For example, if a document
has a worker, we don't propagate the permission to the worker.

In this patch, we call ::StorageAccessGranted as long as we update
the window's storage permission.

Differential Revision: https://phabricator.services.mozilla.com/D74321
2020-05-18 11:58:25 +00:00
Dimi Lee 3ad661e06a Bug 1624269 - P2. Cache access granted result in the 3rd-party window instead of top-level window in fission mode. r=timhuang,baku
Before this patch, in non-fission mode, we cache storage access granted result
in the top-level window so we don't have to iterate all the browsing contexts
in the same tree while syncing the storage permission granted decision.

However, since we plan to rely on the current update mechanism to sync
mHasStorageAccess flag for different documents in the same tab (instead of using
the syncing mechanism of permission manager), we will eventually need to iterate
the browsing context tree to find all the documents to sync. Base on this,
we no longer have to maintain different method for fission and non-fission.

In this patch, we store the permission granted result in the inner
window instead of using permission key and store the key in the top-level
window.

Differential Revision: https://phabricator.services.mozilla.com/D73710
2020-05-18 11:04:50 +00:00
Emilio Cobos Álvarez 16af962c7e Bug 1638127 - Make Linux focus ring behavior match Windows, rather than Mac. r=karlt
The Mac focus model is a bit different (mouse doesn't focus form
controls for example).

This matches GTK3 to my knowledge, where outlines are not shown until
you've navigated with the keyboard.

We should maybe consider changing Android as well (and maybe all
platforms, actually), but that's a bit of a bigger endeavour.

Differential Revision: https://phabricator.services.mozilla.com/D75505
2020-05-18 10:33:14 +00:00
Csoregi Natalia 88ab085eff Backed out 5 changesets (bug 1624269) for browser-chrome failures on browser_storageAccessWithHeuristics.js. CLOSED TREE
Backed out changeset 59cdba115447 (bug 1624269)
Backed out changeset 23b5c53f4be8 (bug 1624269)
Backed out changeset be697a5bc0fd (bug 1624269)
Backed out changeset 81420bca683c (bug 1624269)
Backed out changeset 599db5acefe1 (bug 1624269)
2020-05-18 13:59:44 +03:00
Dimi Lee 76cd40637d Bug 1624269 - P4. Not using permission manager to sync HasStorageAccess. r=timhuang,baku
We already have an architecture to sync the storage access granted
result to all 3rd-party frames with the same tracking origin.
We use the same way to sync HasStorageAccess flag instead of relying
on permission manager update permissions to child processes.

Differential Revision: https://phabricator.services.mozilla.com/D73711
2020-05-18 09:14:09 +00:00
Dimi Lee 1f96287d53 Bug 1624269 - P3. Inform all the windows whose storage permission is granted. r=timhuang,baku
Before this patch, we only call StorageAccessGranted on windows that
triggers the storage heuristics. So even if we sync storage permission to the
other frames, their data will not be refreshed. For example, if a document
has a worker, we don't propagate the permission to the worker.

In this patch, we call ::StorageAccessGranted as long as we update
the window's storage permission.

Differential Revision: https://phabricator.services.mozilla.com/D74321
2020-05-18 09:09:57 +00:00
Dimi Lee 6960df4b88 Bug 1624269 - P2. Cache access granted result in the 3rd-party window instead of top-level window in fission mode. r=timhuang,baku
Before this patch, in non-fission mode, we cache storage access granted result
in the top-level window so we don't have to iterate all the browsing contexts
in the same tree while syncing the storage permission granted decision.

However, since we plan to rely on the current update mechanism to sync
mHasStorageAccess flag for different documents in the same tab (instead of using
the syncing mechanism of permission manager), we will eventually need to iterate
the browsing context tree to find all the documents to sync. Base on this,
we no longer have to maintain different method for fission and non-fission.

In this patch, we store the permission granted result in the inner
window instead of using permission key and store the key in the top-level
window.

Differential Revision: https://phabricator.services.mozilla.com/D73710
2020-05-18 09:14:09 +00:00
Botond Ballo ba458447b3 Bug 1638458 - Remove the ignoreRootScrollFrame parameter of FrameLoader.sendCrossProcessMouseEvent(). r=tnikkel
No one is setting this parameter to true any more.

Depends on D75734

Differential Revision: https://phabricator.services.mozilla.com/D75735
2020-05-18 03:05:32 +00:00
Emilio Cobos Álvarez a0a895f5d1 Bug 1638677 - Remove some minor dead code in Document::QueryCommandState. r=masayuki
Local compiler warns about the return being unreached. Remove one of the
two copy-pasta links.

Differential Revision: https://phabricator.services.mozilla.com/D75708
2020-05-17 23:52:05 +00:00
Emilio Cobos Álvarez 74f2dc7de8 Bug 1638127 - Remove nsGlobalWindowInner::mShowFocusRingForContent. r=edgar
Instead move the check to the focus manager, more similar to how
focus-visible works.

Now nsGlobalWindowInner::ShouldShowFocusRing means "Should we show focus
ring for anything in this window", that is: Have we keyboard-navigated
in this window, or do we have a pref that says that we should always
show focus rings.

Fix some callers appropriately (some of them that were not properly
accounting for the element being focused in the first place...).

Differential Revision: https://phabricator.services.mozilla.com/D75504
2020-05-16 18:03:54 +00:00
David Teller a0afcb3d4b Bug 1638138 - Restoring missing thread names in requestProcInfo;r=tarek
ChromeUtils::requestProcInfo was dropping thread names for the process process. This patch restores them and tests that at least *one* thread is named. Unfortunately, at the time of this writing, we cannot assume that *all*
threads are named. Investigation pending.

Differential Revision: https://phabricator.services.mozilla.com/D75420
2020-05-15 20:19:25 +00:00
alwu f9e89ee7ae Bug 1597450 - part1 : store autoplay permission on the WindowContext. r=nika
This patch will do :
- create a sync field `AutoplayPermission` on WindowContext
- update the field whenever site's the autoplay permission changes

The advantage of doing so :
- to help determine the result of the blocking autoplay correctly.

More details :
As the field would be automatically synced between processes, then we can know the correct site's autoplay permission for the whole page even if we're in the different process if the iframe is in different origin after we enable Fission.

Differential Revision: https://phabricator.services.mozilla.com/D74511
2020-05-15 21:18:07 +00:00
Csoregi Natalia 4302fa80f7 Backed out changeset a8850a0ffab1 (bug 1638127) for failures on test_focusrings.xhtml. CLOSED TREE 2020-05-16 00:44:59 +03:00
Emilio Cobos Álvarez f1b1884de4 Bug 1638127 - Remove nsGlobalWindowInner::mShowFocusRingForContent. r=edgar
Instead move the check to the focus manager, more similar to how
focus-visible works.

Now nsGlobalWindowInner::ShouldShowFocusRing means "Should we show focus
ring for anything in this window", that is: Have we keyboard-navigated
in this window, or do we have a pref that says that we should always
show focus rings.

Fix some callers appropriately (some of them that were not properly
accounting for the element being focused in the first place...).

Differential Revision: https://phabricator.services.mozilla.com/D75504
2020-05-15 20:12:14 +00:00
Emilio Cobos Álvarez ab92960118 Bug 1638127 - Minor cleanup around nsWindowRoot. r=edgar
Depends on D75501

Differential Revision: https://phabricator.services.mozilla.com/D75502
2020-05-15 19:04:42 +00:00
Razvan Maries 481517ce87 Backed out 2 changesets (bug 1558394) for perma failures on iframe_sandbox_anchor_download_block_downloads.sub.tentative.html. CLOSED TREE
Backed out changeset 79046ff8143b (bug 1558394)
Backed out changeset e13ede3c68d4 (bug 1558394)
2020-05-15 19:18:34 +03:00
Sebastian Streich 6733f1311c Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-05-15 14:03:43 +00:00
Sebastian Streich bb0855332f Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-15 14:03:28 +00:00
Razvan Maries e744ca1ac5 Backed out changeset ccd3a06efe81 (bug 1638138) for perma failures on browser_test_procinfo.js. CLOSED TREE 2020-05-15 17:48:53 +03:00
David Teller 62b04861d5 Bug 1638138 - Restoring missing thread names in requestProcInfo;r=tarek
ChromeUtils::requestProcInfo was dropping thread names for the process process. This patch restores them and tests that at least *one* thread is named. Unfortunately, at the time of this writing, we cannot assume that *all*
threads are named. Investigation pending.

Differential Revision: https://phabricator.services.mozilla.com/D75420
2020-05-15 10:41:29 +00:00
Emily McDonough c161bb67d3 Bug 1564128 part 2 - Copy animations to static document clones r=emilio,hiro
This also requires changing the EffectCompositor to allow animations in print
and print preview, and setting up a document timeline for the cloned document

Differential Revision: https://phabricator.services.mozilla.com/D69069
2020-05-14 19:41:03 +00:00
Sebastian Streich 1ec5974790 Bug 1636148 - "BandAid" - Cast Remaining Callers To BasePrincipal r=ckerschb,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74248
2020-05-14 19:42:57 +00:00
Emilio Cobos Álvarez b9c1bf761c Bug 312971 - Unprefix -moz-read-write / -moz-read-only. r=edgar
And remove some duplicated tests from WPT.

Differential Revision: https://phabricator.services.mozilla.com/D75231
2020-05-14 16:46:08 +00:00
Zibi Braniecki 749612612f Bug 1629291 - Don't set l10n as cached if there was any error during initial translation. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D74818
2020-05-14 16:56:57 +00:00
sanketh d66dab82a7 Bug 1621433 - In RFP mode, turn canvas image extraction into a random 'poison pill' for fingerprinters r=tjr,jrmuizel
In RFP mode, canvas image extraction leads to an all-white image, replace that
with a random (sample 32 bytes of randomness and fill the buffer with that)
'poison pill'. This helps defeat naive fingerprinters by producing a random
image on every try. This feature is toggled using a new, default on, pref
`privacy.resistFingerprinting.randomDataOnCanvasExtract`.

Updated `browser_canvas_fingerprinting_resistance.js` to test this new feature
as well.

Updates and replaces D66308.

Differential Revision: https://phabricator.services.mozilla.com/D72716
2020-05-14 13:56:55 +00:00
Bogdan Tara edcb53f163 Backed out 2 changesets (bug 1558394) for nsDocShellLoadState related bustage CLOSED TREE
Backed out changeset 5889105bd089 (bug 1558394)
Backed out changeset 80a0ea17c9f8 (bug 1558394)
2020-05-14 15:17:32 +03:00
Sebastian Streich bb85ae41b1 Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-05-14 10:05:55 +00:00
Sebastian Streich 9ce86dc585 Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-14 10:04:44 +00:00
Mirko Brodesser cb9ee320b9 Bug 1635709: part 18) Correct assignment to `aDidAddRange` in `Selection::MaybeAddTableCellRange`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D75100
2020-05-14 10:08:55 +00:00
Mirko Brodesser 1f8f4485a5 Bug 1635709: part 16) Replace `GetTableCellLocationFromRange` with `GetTableSelectionMode`. r=masayuki
The location wasn't used from the caller of
`GetTableCellLocationFromRange`.

However, `GetTableCellLocationFromRange`
included flushing frames, this is now done in
`HTMLEditor::CellIndexes::Update`.

Differential Revision: https://phabricator.services.mozilla.com/D75098
2020-05-14 10:08:32 +00:00
Matt Woodrow 98b902004c Bug 1637487 - Store mixed content security flags as a flags word on Document instead of bools. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75026
2020-05-14 01:27:42 +00:00
Narcis Beleuzu 53167b2819 Backed out 9 changesets (bug 1637487) for bustages on nsMixedContentBlocker.cpp . CLOSED TREE
Backed out changeset 5633cc2aaa9b (bug 1637487)
Backed out changeset c4f0c757cae0 (bug 1637487)
Backed out changeset 65bb1114df87 (bug 1637487)
Backed out changeset 1a64ef10e773 (bug 1637487)
Backed out changeset d1709ebb7f46 (bug 1637487)
Backed out changeset 286e5ee6517f (bug 1637487)
Backed out changeset 83362625c297 (bug 1637487)
Backed out changeset ab9df2f2d11f (bug 1637487)
Backed out changeset b83f49bc11b0 (bug 1637487)
2020-05-14 02:41:40 +03:00
Matt Woodrow 4f25f45f1f Bug 1637487 - Store mixed content security flags as a flags word on Document instead of bools. r=ckerschb
Depends on D75025

Differential Revision: https://phabricator.services.mozilla.com/D75026
2020-05-13 17:50:34 +00:00
Matt Woodrow 3a20271225 Bug 1570243 - Support checking IsSecureContext on OOP ancestors. r=kmag,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73998
2020-05-13 21:52:39 +00:00
Csoregi Natalia 517e830522 Backed out 4 changesets (bug 1629866, bug 1570255) for assertion failures on DocumentChannelChild.cpp. CLOSED TREE
Backed out changeset 214e4a11be0d (bug 1570255)
Backed out changeset db066dda1bb8 (bug 1570255)
Backed out changeset d9f75d88613e (bug 1570255)
Backed out changeset fe2d4790b73a (bug 1629866)
2020-05-13 18:30:42 +03:00
Gijs Kruitbosch 228e52aebe Bug 1196151 - use BrowsingContext for external helper app handling of protocols, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74434
2020-05-11 13:13:03 +00:00
Iain Ireland 42da623014 Bug 1636495: Use JS::CheckRegExpSyntax in nsContentUtils::IsPatternMatching r=emilio
nsContentUtils::IsPatternMatching calls into SpiderMonkey several times to validate and execute a regexp. It assumes that JS::NewUCRegExpObject can only fail if the pattern is invalid. However, in the case of OOM or stack overflow, this is false.

In the previous patch, we added a new API for pattern matching. This patch uses the new function to clean up the error handling in IsPatternMatching.

Differential Revision: https://phabricator.services.mozilla.com/D74501
2020-05-12 17:23:03 +00:00
Peter Van der Beken 482735363d Bug 1629866 - Store ChildSHistory on the BrowsingContext. r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D70997
2020-05-13 13:41:16 +00:00
Mirko Brodesser 589cc5004b Bug 1635709: part 15) Rename `GetTableSelectionType` to `GetTableSelectionMode`. r=masayuki
Depends on D75058

Differential Revision: https://phabricator.services.mozilla.com/D75059
2020-05-13 11:11:31 +00:00
Mirko Brodesser a79747a173 Bug 1635709: part 14) Change `nsRange` argument from `const` pointer to `const` reference around table selection. r=masayuki
Helps to get rid of unnecessary `nsresult`s later.

Depends on D75057

Differential Revision: https://phabricator.services.mozilla.com/D75058
2020-05-13 11:11:08 +00:00
Csoregi Natalia 0da2867bf2 Backed out 5 changesets (bug 1625372) for assertion failures on GraphDriver.cpp. CLOSED TREE
Backed out changeset b9feee4f447c (bug 1625372)
Backed out changeset d86f066bd68b (bug 1625372)
Backed out changeset 7a38398623f8 (bug 1625372)
Backed out changeset 6e9928fb37d1 (bug 1625372)
Backed out changeset ca93e9921c05 (bug 1625372)
2020-05-13 13:09:22 +03:00
Christoph Kerschbaumer 026a7442f3 Bug 1636900: Remove TYPE_XBL from nsIContentPolicy. r=remote-protocol-reviewers,emilio,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D74835
2020-05-13 06:53:28 +00:00
Karl Tomlinson ef208899b1 Bug 1625372 shut down MediaTrackGraph from AudioContext when window will be destroyed r=padenot
Depends on D74813

Differential Revision: https://phabricator.services.mozilla.com/D74814
2020-05-12 08:44:46 +00:00
Csoregi Natalia 9f074fab9b Backed out changeset 4309266ff43d (bug 1629291) for frequent assertion failures on ErrorResult.h. CLOSED TREE 2020-05-13 10:23:18 +03:00
Zibi Braniecki fabff274c8 Bug 1629291 - Don't set l10n as cached if there was any error during initial translation. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D74818
2020-05-12 23:22:03 +00:00
ssengupta cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Johann Hofmann b59132460a Bug 1632474 - Consider src in unsafe allow all checks for feature policy. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D73147
2020-05-12 19:43:23 +00:00
Denis Palmeiro d1ffff7a12 Bug 1501608 - Remove the ELEMENT_SLOT in the ScriptSourceObject and instead use a callback function to return the script element based on the value of the privateValue in the SSO. r=jonco,smaug
We can reduce the size of the SSO by removing the element slot entirely, and instead retrieve the element through a callback function.  The callback will take in the value in the private slot of the SSO, which is either a LoadedScript* (from the browser) or a JSObject* (from the shell).  In addition, this removes the requirement of having a script dom element ready when parsing a JS script which can open up new opportunities for performance.

Differential Revision: https://phabricator.services.mozilla.com/D70417
2020-05-12 19:28:15 +00:00
Mike Conley 8d34859a49 Bug 1634703 - Add a parent-process-only method to nsIDOMWindowUtils to get the native window ID from a window. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D73481
2020-05-12 14:50:21 +00:00
Razvan Maries a1b92d521b Backed out 3 changesets (bug 1636495) for SM bustages at huge-01.binjs. CLOSED TREE
Backed out changeset 5be0a4315674 (bug 1636495)
Backed out changeset 7ac33283a786 (bug 1636495)
Backed out changeset 4b98c08423c9 (bug 1636495)
2020-05-12 20:19:37 +03:00
Sebastian Hengst 8d6dfb7be7 Backed out changeset ea15e5bb899e (bug 1625845) for causing bug 1634056. a=backout 2020-05-12 18:48:22 +02:00
Iain Ireland 7837df3291 Bug 1636495: Use JS::CheckRegExpSyntax in nsContentUtils::IsPatternMatching r=emilio
nsContentUtils::IsPatternMatching calls into SpiderMonkey several times to validate and execute a regexp. It assumes that JS::NewUCRegExpObject can only fail if the pattern is invalid. However, in the case of OOM or stack overflow, this is false.

In the previous patch, we added a new API for pattern matching. This patch uses the new function to clean up the error handling in IsPatternMatching.

Differential Revision: https://phabricator.services.mozilla.com/D74501
2020-05-12 14:08:40 +00:00
Emilio Cobos Álvarez 099b4efd86 Bug 1637240 - Clean up iteration to find closest ancestor dialog in dialog form submission. r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D74845
2020-05-12 14:37:12 +00:00
Dorel Luca 609e319c24 Merge mozilla-central to autoland. CLOSED TREE 2020-05-12 17:32:56 +03:00
Sebastian Hengst 211cd02676 Backed out 3 changesets (bug 1636495) for crashes when e.g. a url gets pasted into Slack (bug 1637243). a=backout
Backed out changeset 4cbaef432cb8 (bug 1636495)
Backed out changeset 87f9a3035dd8 (bug 1636495)
Backed out changeset cb0d2a799a63 (bug 1636495)
2020-05-12 16:01:28 +02:00
Alexandre Poirot 718bf89e62 Bug 1620966 - Move DocShell.watchedByDevtools to BrowsingContext and rename it to watchedByDevTools. r=nika,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D66037
2020-05-12 09:18:26 +00:00
Mikael Urankar ac39857ed9 Bug 1634852 - remove the register storage class specifier, it's deprecated in C++17. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D74418
2020-05-12 11:07:07 +00:00
Christoph Kerschbaumer 9b6415635d Bug 1637193: Warn not only once but every time we are loading mixed object subrequest including the soon to be blocked URI. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74824
2020-05-12 10:16:52 +00:00
Mirko Brodesser ca24d8b332 Bug 1635709: part 6) Rename `nsFrameSelection::*DesiredPos` to `*DesiredCaretPos`. r=masayuki
`nsFrameSelection` has (too) many responsibilites, this adds some
clarification.

Differential Revision: https://phabricator.services.mozilla.com/D74615
2020-05-12 09:42:01 +00:00
Emilio Cobos Álvarez fcb6f227f2 Bug 1636516 - When moving an element to another document, don't drop nsMappedAttributes from its sheet. r=edgar
That is, drop the reference to the sheet pointer. GetModifiableMapped
doesn't ever return anything that's on the hash. But trying to
DropMappedAttributes it will remove not that instance, but any other
instance that's already in the hash and matches it.

ThisDropSheetReference is always done in MakeMappedUnique if relevant.

On the original test-case it was about the -moz-user-modify property
that contenteditable maps, but it reproduces with any mapped attribute
like hidden, so I used that for WPT.

Differential Revision: https://phabricator.services.mozilla.com/D74498
2020-05-11 19:28:24 +00:00
Bogdan Tara 8c5c4f1dd7 Backed out 7 changesets (bug 1634703) for testDeviceRecordingEventAudioAndVideo failures CLOSED TREE
Backed out changeset b982f5d74610 (bug 1634703)
Backed out changeset 59229853930e (bug 1634703)
Backed out changeset e017380f5539 (bug 1634703)
Backed out changeset 47a3a96b969b (bug 1634703)
Backed out changeset b4af76cfbdaf (bug 1634703)
Backed out changeset 7ef57434b09d (bug 1634703)
Backed out changeset 9df87d346b0f (bug 1634703)
2020-05-11 23:04:54 +03:00
Iain Ireland 96b0cd7868 Bug 1636495: Use JS::CheckRegExpSyntax in nsContentUtils::IsPatternMatching r=emilio
nsContentUtils::IsPatternMatching calls into SpiderMonkey several times to validate and execute a regexp. It assumes that JS::NewUCRegExpObject can only fail if the pattern is invalid. However, in the case of OOM or stack overflow, this is false.

In the previous patch, we added a new API for pattern matching. This patch uses the new function to clean up the error handling in IsPatternMatching.

Differential Revision: https://phabricator.services.mozilla.com/D74501
2020-05-11 17:44:08 +00:00
Mike Conley 364a058417 Bug 1634703 - Add a parent-process-only method to nsIDOMWindowUtils to get the native window ID from a window. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D73481
2020-05-08 22:31:19 +00:00
Valentin Gosu db062a7e3b Bug 1572513 - Set the embedder policy when intializing the Document object r=nika
This patch persists the CrossOriginEmbedderPolicy on the Document and
WindowContext.
The WindowContext's embedder policy is set in
WindowGlobalActor::BaseInitializer by either adopting the policy of the HTTP
channel that loaded the document, or in WindowGlobalChild::OnNewDocument
by inheriting the one from the browsingContext's windowContext.

Differential Revision: https://phabricator.services.mozilla.com/D46903
2020-05-11 18:41:16 +00:00
Jonathan Watt b4d984f71a Bug 1636730. Centralize saving of the print setting the user chooses from the print dialog. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D74550
2020-05-11 15:34:36 +00:00
Mihai Alexandru Michis 51de98c001 Backed out changeset 8bef822368a0 (bug 1613899) for causing failures in test_bug976673.html
CLOSED TREE
2020-05-11 18:00:07 +03:00
Honza Bambas 739cdadbb3 Bug 1631045 - Re-enable and fix `dom/base/test/test_bug1222633.html`, r=dragana
Depends on D72119

Differential Revision: https://phabricator.services.mozilla.com/D71379
2020-05-11 14:17:00 +00:00
Honza Bambas ef0d4e6dd1 Bug 1618536 - Introduce nsIContentPolicy::TYPE_INTERNAL_FONT_PRELOAD representing preload of font, mapping to TYPE_FONT externally, r=baku
Depends on D69628

Differential Revision: https://phabricator.services.mozilla.com/D72118
2020-05-11 14:13:16 +00:00
Edgar Chen 3f250fba44 Bug 1618295 - Make imgRequestProxy implement and use PreloaderBase to support the preload as speculative load feature; r=tnikkel,smaug,mayhemer
Depends on D72083

Differential Revision: https://phabricator.services.mozilla.com/D69860
2020-05-11 14:43:05 +00:00
Honza Bambas c0418846f3 Bug 1631044 - Temporarily disable `dom/base/test/test_bug1222633.html`, r=dragana
Depends on D67482

Differential Revision: https://phabricator.services.mozilla.com/D71378
2020-05-11 14:06:41 +00:00
Honza Bambas 2d65fbb465 Bug 1618298 - Update PreloadService to provide APIs to integrate with link DOM element, r=smaug
Depends on D67480

Differential Revision: https://phabricator.services.mozilla.com/D67482
2020-05-11 14:05:22 +00:00
Honza Bambas 0f372316ea Bug 1618289 - Have PreloadService hanging off dom::Document, r=smaug
Depends on D67479

Differential Revision: https://phabricator.services.mozilla.com/D67480
2020-05-11 14:04:36 +00:00
Henri Sivonen a364362ce0 Bug 1613899 - Re-enable test_bug976673.html for Fission. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D69943
2020-04-07 22:13:41 +00:00
Mirko Brodesser 194a3b964e Bug 1635709: part 5) Annotate `Selection::ReplaceAnchorFocusRange` with `MOZ_CAN_RUN_SCRIPT`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D74383
2020-05-11 09:39:33 +00:00
Mirko Brodesser 6ddb867610 Bug 1635709: part 4) Transform `Selection::DoAutoScroll` to `AutoScroller::DoAutoScroll`. r=masayuki
Allows defriending `AutoScroller` from `Selection` and removes the
direct dependency of `AutoScroller` to `Selection`.

Differential Revision: https://phabricator.services.mozilla.com/D74382
2020-05-11 09:38:00 +00:00
Simon Giesecke e6422e2afd Bug 1626570 - Remove obsolete copy enabling machinery. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D72176
2020-05-11 08:23:03 +00:00
Christoph Kerschbaumer c65e97cd1c Bug 1635365: Move field mixed content IsSecure from BrowsingContext to WindowContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74269
2020-05-11 08:11:17 +00:00
Andrea Marchesini 871dd4ea6a Bug 1632187 - Introduce nsICookieService::setCookieStringFromDocument - part 2 - implementation, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D71974
2020-05-09 20:26:13 +00:00
Coroiu Cristina b2935aef35 Backed out 5 changesets (bug 1632187) for xpcshell failures at netwerk/test/unit/test_proxyconnect.js
Backed out changeset c0e6dad41b74 (bug 1632187)
Backed out changeset 328ee0899987 (bug 1632187)
Backed out changeset cb775f75ff1f (bug 1632187)
Backed out changeset de6907618ac9 (bug 1632187)
Backed out changeset 1070e843071c (bug 1632187)
2020-05-09 23:22:06 +03:00
Andrea Marchesini 5dbb73b13c Bug 1632187 - Introduce nsICookieService::setCookieStringFromDocument - part 2 - implementation, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D71974
2020-05-09 19:02:44 +00:00
Sylvestre Ledru 1929dd1ab3 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D73347
2020-05-09 14:51:53 +00:00
Nika Layzell 3615e45be9 Bug 1636279 - Part 2: Unify WindowContext new document state updating code, r=farre
When a new document is loaded in a WindowContext, various pieces of state need
to be updated in the parent process. This is currently done in an ad-hoc manner
in nsGlobalWindowOuter::SetNewDocument. This change moves the updating logic
into a common method on WindowGlobalChild.

Differential Revision: https://phabricator.services.mozilla.com/D74325
2020-05-08 20:42:06 +00:00
Nika Layzell 2b70befb83 Bug 1636186 - Remove unnecessary CookieJarSettingsArgs data from WindowContext, r=timhuang
The entire CookieJarSettingsArgs is currently being synced into every content
process, when only two fields of that structure are actually needed.

Those two fields are extracted from the CookieJarSettingsArgs and synchronized
separately to avoid leaking information such as principals into every content
process.

Differential Revision: https://phabricator.services.mozilla.com/D74258
2020-05-08 20:10:56 +00:00
Tom Schuster 4f64f475f2 Bug 1595046 - Make it possible to inspect every exception value in the web console. r=jonco,baku,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D64437
2020-05-08 20:54:17 +00:00
Anny Gakhokidze 5fc9601f29 Bug 1633471 - Do not reuse inner window when printing, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74261
2020-05-08 20:13:16 +00:00
Brindusan Cristian dbbdb12921 Backed out changeset ef394674c1b8 (bug 1636186) for bustages at WindowContext.h. CLOSED TREE 2020-05-08 21:42:46 +03:00
Nika Layzell 6995af532e Bug 1636186 - Remove unnecessary CookieJarSettingsArgs data from WindowContext, r=timhuang
The entire CookieJarSettingsArgs is currently being synced into every content
process, when only two fields of that structure are actually needed.

Those two fields are extracted from the CookieJarSettingsArgs and synchronized
separately to avoid leaking information such as principals into every content
process.

Differential Revision: https://phabricator.services.mozilla.com/D74258
2020-05-08 18:05:11 +00:00
Csoregi Natalia cd28d94be1 Backed out changeset 59a45d8c0fbb (bug 1635365) for browser-chrome failures on browser_bug902156.js. CLOSED TREE 2020-05-08 19:09:20 +03:00
Christoph Kerschbaumer 1470386f05 Bug 1635365: Move field mixed content IsSecure from BrowsingContext to WindowContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74269
2020-05-08 14:05:18 +00:00
Henri Sivonen 45aad1c320 Bug 1617788 - Restore focus in out-of-focus iframe after switching to another app and back even for non-keyboard causes. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D67878
2020-05-08 00:20:51 +00:00
Csoregi Natalia 4bb1a50963 Backed out changeset 8a48a3a488ab (bug 1621433) for hazard failures on CanvasRenderingContext2D.cpp CLOSED TREE 2020-05-08 09:39:25 +03:00
sanketh 44762b8054 Bug 1621433 - In RFP mode, turn canvas image extraction into a random 'poison pill' for fingerprinters r=tjr,jrmuizel
In RFP mode, canvas image extraction leads to an all-white image, replace that
with a random (sample 32 bytes of randomness and fill the buffer with that)
'poison pill'. This helps defeat naive fingerprinters by producing a random
image on every try. This feature is toggled using a new, default on, pref
`privacy.resistFingerprinting.randomDataOnCanvasExtract`.

Updated `browser_canvas_fingerprinting_resistance.js` to test this new feature
as well.

Updates and replaces D66308.

Differential Revision: https://phabricator.services.mozilla.com/D72716
2020-05-07 22:45:27 +00:00
Emilio Cobos Álvarez e3519d3aa1 Bug 1636226 - Flush frames in nsFrameLoader::SwapWithOtherLoader. r=mattwoodrow
This fixes various tab-dragging tests with LazyFC enabled.

Depends on D74280

Differential Revision: https://phabricator.services.mozilla.com/D74281
2020-05-08 03:21:24 +00:00
Nika Layzell 9e0032b97f Bug 1633820 - Part 5: Get rid of UnsafeIPCTabContext, r=kmag
This variant was only used for service workers' openWindow method, which has
been changed to no longer behave in this way, meaning that the type can be
removed. The follow-up simplification of removing
'ContentChild::ProvideWindowCommon', and moving the logic directly into
'BrowserChild' is not done in this bug, and will be done in a follow-up instead.

Differential Revision: https://phabricator.services.mozilla.com/D72935
2020-05-07 22:18:56 +00:00
Nika Layzell 6cb771c699 Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-07 22:18:54 +00:00
Nika Layzell 76b1144754 Bug 1633820 - Part 2: Avoid creating an extra LoadContext when we already have a BrowsingContext, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72932
2020-05-07 22:18:50 +00:00
Daniel Holbert 481774503b Bug 1635941 followup: Drop some more debugging printfs. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D74342
2020-05-07 23:13:51 +00:00
sefeng 9ce53561fa Bug 1636012 - Remove TYPES_OF_USER_CLICKS probe r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D74250
2020-05-07 22:12:52 +00:00
Razvan Maries 7a5b66f9b6 Backed out 5 changesets (bug 1633820) for build bustages at TabContext.cpp. CLOSED TREE
Backed out changeset 0a20dd1935d7 (bug 1633820)
Backed out changeset 626e834293ed (bug 1633820)
Backed out changeset 14cc454a8cbc (bug 1633820)
Backed out changeset 7bbcb9266b87 (bug 1633820)
Backed out changeset ef99672bd2af (bug 1633820)
2020-05-08 00:59:20 +03:00
Nika Layzell 6f9f8ba6b2 Bug 1633820 - Part 5: Get rid of UnsafeIPCTabContext, r=kmag
This variant was only used for service workers' openWindow method, which has
been changed to no longer behave in this way, meaning that the type can be
removed. The follow-up simplification of removing
'ContentChild::ProvideWindowCommon', and moving the logic directly into
'BrowserChild' is not done in this bug, and will be done in a follow-up instead.

Differential Revision: https://phabricator.services.mozilla.com/D72935
2020-05-07 17:18:58 +00:00
Nika Layzell d6a082e20a Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-07 17:18:48 +00:00
Nika Layzell 51df83bff7 Bug 1633820 - Part 2: Avoid creating an extra LoadContext when we already have a BrowsingContext, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72932
2020-05-07 17:18:44 +00:00
Mirko Brodesser 6092b43712 Bug 1635709: part 3) Add unit to `Selection::StartAutoScrollTimer`'s delay argument. r=hsivonen
Depends on D74052

Differential Revision: https://phabricator.services.mozilla.com/D74053
2020-05-06 15:24:59 +00:00
Mirko Brodesser 193ee7189e Bug 1635709: part 1) Rename `nsFrameSelection::SetCaretBidiLevel` to `SetCaretBidiLevelAndMaybeSchedulePaint`. r=hsivonen
The old name was misleading.

Differential Revision: https://phabricator.services.mozilla.com/D74051
2020-05-06 15:26:07 +00:00
Emilio Cobos Álvarez b2ac522be5 Bug 1636004 - Flush frames in nsFrameLoader::TryRemoteBrowser. r=mattwoodrow
With LazyFC in the parent process enabled, we can get here more easily
without frames for the <browser> element.

This causes some assertion failures because we start parenting the
remote browsers to the wrong layer manager when inside a popup.

If we get to nsFrameLoader::TryRemoteBrowser without a frame,
GetLayerManager (which uses GetWidgetForContent) will just fall back to
GetWidgetForDocument. Badness ensues if the widget should actually not
be that one.

Make sure to flush frames when we load an event, so that we can
initialize stuff properly.

We could try to only flush if inside a popup or something, but this code
is a bit tricky so if possible I'd prefer not to diverge.

Differential Revision: https://phabricator.services.mozilla.com/D74177
2020-05-07 13:46:16 +00:00
Christoph Kerschbaumer 43baaddaab Bug 1632160: Remove GetAllowMixedContentAndConnectionData from nsIDocShell and expose similar functionality on BrowsingContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72901
2020-05-07 07:22:17 +00:00
Dana Keeler e8ebc73d50 Bug 1630038 - remove HPKP entirely r=kjacobs,bbeurdouche
This removes processing of HTTP Public Key Pinning headers, remotely modifying
pinning information, and using cached pinning information, all of which was
already disabled in bug 1412438. Static pins that ship with the browser are
still enforced.

Differential Revision: https://phabricator.services.mozilla.com/D73352
2020-05-06 22:57:50 +00:00
Hiroyuki Ikezoe 974267b082 Bug 1635941 - Drop debug printf. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D74141
2020-05-06 21:21:46 +00:00
David Teller e67467e850 Bug 1632794 - Expose full remoteType through ChromeUtils.requestProcInfo;
The current `type` field doesn't expose all information such as the origin. Let's fix this.

Differential Revision: https://phabricator.services.mozilla.com/D72616
2020-05-06 20:11:55 +00:00
Dale Harvey 3fa67b082d Bug 1627538 - Extract getRegion into its own jsm r=mikedeboer,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D71165
2020-05-06 12:07:53 +00:00
Bogdan Tara 7fce40912d Backed out 5 changesets (bug 1633820) for bustages complaining about TabContext CLOSED TREE
Backed out changeset 4982d41d5e6b (bug 1633820)
Backed out changeset 9803c41e42f9 (bug 1633820)
Backed out changeset 2475bbab03a8 (bug 1633820)
Backed out changeset 762f0b2c154c (bug 1633820)
Backed out changeset f9ea871a0227 (bug 1633820)
2020-05-06 22:39:46 +03:00
Nika Layzell 44d7330cea Bug 1633820 - Part 5: Get rid of UnsafeIPCTabContext, r=kmag
This variant was only used for service workers' openWindow method, which has
been changed to no longer behave in this way, meaning that the type can be
removed. The follow-up simplification of removing
'ContentChild::ProvideWindowCommon', and moving the logic directly into
'BrowserChild' is not done in this bug, and will be done in a follow-up instead.

Differential Revision: https://phabricator.services.mozilla.com/D72935
2020-05-06 17:42:51 +00:00
Nika Layzell e6c0899f5d Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-06 17:41:02 +00:00
Nika Layzell ae47d770a2 Bug 1633820 - Part 2: Avoid creating an extra LoadContext when we already have a BrowsingContext, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72932
2020-05-06 17:45:59 +00:00
Bogdan Tara 86530eabd1 Backed out changeset 049df3990b16 (bug 1627538) for test_autocomplete_basic_form_formActionOrigin.html failures CLOSED TREE 2020-05-06 22:09:46 +03:00
Dale Harvey ee1b1349f7 Bug 1627538 - Extract getRegion into its own jsm r=mikedeboer,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D71165
2020-05-06 12:07:53 +00:00
Steve Fink 3b17c8c75a Bug 1633176 - re-land incremental weakmap marking
Differential Revision: https://phabricator.services.mozilla.com/D74079
2020-05-06 16:38:33 +00:00
Kartikaya Gupta b498c75baa Bug 1627010 - Disallow user from zooming out past initial zoom on desktop. r=botond
THis should continue allowing users to zoom out in RDM mode, or any time that
we are respecting the meta-viewport tag. It's only when we don't respect the
meta-viewport tag that we disable zooming out past initial zoom.

Differential Revision: https://phabricator.services.mozilla.com/D73461
2020-05-06 14:40:23 +00:00
Valentin Gosu 90060db218 Bug 1629882 - COEP requires a secure context r=JuniorHsu,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D71617
2020-05-06 11:43:24 +00:00
Narcis Beleuzu 84754c6344 Backed out 2 changesets (bug 1632794) for build bustages on ChromeUtils.cpp . CLOSED TREE
Backed out changeset 28f67adaba65 (bug 1632794)
Backed out changeset e3c323874e2e (bug 1632794)
2020-05-06 14:12:54 +03:00
David Teller c31471641d Bug 1632794 - Expose full remoteType through ChromeUtils.requestProcInfo;r=tarek
The current `type` field doesn't expose all information such as the origin. Let's fix this.

Differential Revision: https://phabricator.services.mozilla.com/D72616
2020-05-06 10:03:45 +00:00
Narcis Beleuzu cdf603f65b Backed out 2 changesets (bug 1632794) for build bustages on ChromeUtils.cpp . CLOSED TREE
Backed out changeset 846b78435f92 (bug 1632794)
Backed out changeset 937d7ef96c5d (bug 1632794)
2020-05-06 13:00:15 +03:00
David Teller ab091e0ddf Bug 1632794 - Expose full remoteType through ChromeUtils.requestProcInfo;r=tarek
The current `type` field doesn't expose all information such as the origin. Let's fix this.

Differential Revision: https://phabricator.services.mozilla.com/D72616
2020-05-05 22:41:00 +00:00
Hiroyuki Ikezoe df5af7007e Bug 1634943 - Move animation related stuff in nsDisplayList.cpp into AnimationInfo class. r=boris
Depends on D73573

Differential Revision: https://phabricator.services.mozilla.com/D73574
2020-05-06 01:42:05 +00:00
Hiroyuki Ikezoe c0d7369ef3 Bug 1634943 - Export nsDOMMutationObserver.h since it's used in layout/style/. r=boris
I have no idea why compilers don't complain about it.

Depends on D73567

Differential Revision: https://phabricator.services.mozilla.com/D73568
2020-05-05 22:39:37 +00:00
Andrea Marchesini fcc5266a9e Bug 1635193 - StoragePrincipalHelper::GetOriginAttributes instead of NS_GetOriginAttributes, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D73727
2020-05-05 20:56:04 +00:00
Botond Ballo 5cffd06241 Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-05-05 15:24:12 +00:00
Botond Ballo 551a4602dc Bug 1556556 - Miscellaneous fixes related to event coordinate transformations. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69639
2020-05-05 19:28:15 +00:00
Botond Ballo 173d001b86 Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-05-05 19:26:38 +00:00
Botond Ballo 8f18aa54b4 Bug 1556556 - Add a "relative to layout viewport" option for display list building. r=mstange,mattwoodrow
Use it in document.elementFromPoint().

Differential Revision: https://phabricator.services.mozilla.com/D68914
2020-05-05 19:24:08 +00:00
Ian Moody 011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Tom Schuster f77a3af47a Bug 1277799 - Define @@toStringTag on all DOM interface prototype objects. r=peterv
Instead of manually defining toStringTag we now add the toStringTag symbol to the list of properties.
This is also how we usually define toStringTag in the JS engine.
Even though this changes more code I like this approach better. Everything is centralized in the generated bindings file.

Differential Revision: https://phabricator.services.mozilla.com/D72179
2020-05-05 17:54:51 +00:00
Razvan Maries 0c308b94ae Backed out 2 changesets (bug 1632794) for build bustages on aboutProcesses.ftl. CLOSED TREE
Backed out changeset e616abcb192d (bug 1632794)
Backed out changeset 47701348412d (bug 1632794)
2020-05-05 19:21:24 +03:00
David Teller 615c6f8762 Bug 1632794 - Expose full remoteType through ChromeUtils.requestProcInfo;r=tarek
The current `type` field doesn't expose all information such as the origin. Let's fix this.

Differential Revision: https://phabricator.services.mozilla.com/D72616
2020-05-05 15:36:02 +00:00
Simon Giesecke f458cd246a Bug 1626570 - Improve handling of copying arrays in dom/base/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73625
2020-05-05 10:08:02 +00:00
Razvan Maries 0a5bb478ea Backed out 8 changesets (bug 1634943) for build bustages on AnimationInfo.h. CLOSED TREE
Backed out changeset 2ee9c0fc07bf (bug 1634943)
Backed out changeset 812f8cfff1b2 (bug 1634943)
Backed out changeset c446c1edc943 (bug 1634943)
Backed out changeset 6ef1fcc1d428 (bug 1634943)
Backed out changeset 5e4ccd0bffac (bug 1634943)
Backed out changeset bf3c4e7b4691 (bug 1634943)
Backed out changeset 8f310f49a366 (bug 1634943)
Backed out changeset 421cd778da3d (bug 1634943)
2020-05-05 13:50:47 +03:00
Hiroyuki Ikezoe c12c2e810c Bug 1634943 - Export nsDOMMutationObserver.h since it's used in layout/style/. r=boris
I have no idea why compilers don't complain about it.

Differential Revision: https://phabricator.services.mozilla.com/D73568
2020-05-05 10:00:21 +00:00
Mirko Brodesser 82f7f93e17 Bug 1633448: part 11) Add const-correctness to `Selection::CollapseToStart` and `CollapseToEnd`. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D73434
2020-05-04 10:11:14 +00:00
Mirko Brodesser 2d12323c40 Bug 1633448: part 10) Add `StyledRanges::Clear`. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D73433
2020-05-04 10:11:13 +00:00
Mirko Brodesser d0cba89c40 Bug 1633448: part 9) Add `StyledRanges::Length`. r=hsivonen
Another step towards privatizing `StyledRanges::mRanges`.

Differential Revision: https://phabricator.services.mozilla.com/D73432
2020-05-04 10:11:13 +00:00
Mirko Brodesser 36148ce9a8 Bug 1633448: part 8) Add `StyledRanges::RemoveCollapsedRanges`. r=hsivonen
Another step towards privatizing `StyledRanges::mRanges`.

Depends on D73430

Differential Revision: https://phabricator.services.mozilla.com/D73431
2020-05-04 10:11:13 +00:00
Mirko Brodesser c4ed6f536e Bug 1633448: part 7) Add `StyledRanges::UnregisterSelection`. r=hsivonen
One step closer towards privatizing `StyledRanges::mRanges`.

Depends on D73234

Differential Revision: https://phabricator.services.mozilla.com/D73430
2020-05-04 10:11:13 +00:00
Mirko Brodesser c6b90540b1 Bug 1633448: part 6) Change `IsUserSelectionNotCollapsed` to `IsUserSelectionCollapsed`. r=hsivonen
Removes unnecessary double negations.

Differential Revision: https://phabricator.services.mozilla.com/D73234
2020-05-04 10:11:13 +00:00
Mirko Brodesser 6aabdca219 Bug 1633448: part 5) Rename `AreUserSelectedRangesNonEmpty` to `IsUserSelectionNotCollapsed`. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D73233
2020-05-04 10:11:12 +00:00
Emilio Cobos Álvarez c9dbf72d3b Bug 1635082 - Remove nsImageLoadingContent::GetImageReferrerPolicy. r=edgar
It's useless now, the relevant check lives in
ReferrerInfo::InitFromNode.

Differential Revision: https://phabricator.services.mozilla.com/D73620
2020-05-04 21:26:38 +00:00
Andrea Marchesini a994746ca5 Bug 1634664 - BlobURLs should not be considered 3rd parties, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73435
2020-05-04 16:02:38 +00:00
Emilio Cobos Álvarez 761e9dfe4c Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 18:50:20 +00:00
Cosmin Sabou 71a40eae48 Backed out 2 changesets (bug 1635094) for build bustages on nsMacShellService.cpp. CLOSED TREE
Backed out changeset 0a2b0c6ea19a (bug 1635094)
Backed out changeset ead4f26f76ee (bug 1635094)
2020-05-04 20:04:06 +03:00
Emilio Cobos Álvarez 6dde680742 Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 16:26:51 +00:00
Mirko Brodesser daa39ed7db Bug 1584170: part 3) Add test for 101 `<ol>`s. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D47239
2019-12-05 21:24:21 +00:00
Mirko Brodesser b880ce0b21 Bug 1634663: part 2) Declare callers of `GetRangeAt` around `EditorBase` `const`. r=masayuki
Depends on D73444

Differential Revision: https://phabricator.services.mozilla.com/D73445
2020-05-02 23:44:46 +00:00
Mirko Brodesser 81a6751c80 Bug 1634663: part 1) Declare `Selection::GetRangeAt`'s callers `const` around dom/ code. r=masayuki
Only where possible, of course.

Differential Revision: https://phabricator.services.mozilla.com/D73444
2020-05-02 23:43:02 +00:00
Tom Tung 684a5d3947 Bug 1624266 - Use IsSharedMemoryAllowed to decide whether should the CTOR SharedArrayBuffer be defined for Worklets; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D71536
2020-05-01 11:36:08 +00:00
Tom Tung 15a7628e26 Bug 1624266 - Use IsSharedMemoryAllowed to decide whether should the CTOR SharedArrayBuffer be defined for Workers; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D71535
2020-05-01 11:36:05 +00:00
Tom Tung 66326fe6f1 Bug 1624266 - Use IsSharedMemoryAllowed to decide whether should the CTOR SharedArrayBuffer be defined for Window; r=nika
We set opener policy from the channel of the new document when creating a
WindowGlobalChild. However, we need to check if it's crossOriginIsolated even
when the WindowGlobalChild hasn't been created for the new inner window in some
cases.

To avoid checking the unset value of opener policy from the BrowsingContext,
this patch moves the setting the opener policy right before creating a native
global for a new inner window. So that the value of opener policy should always
be correct when validating it (IsSharedMemoryAllowed).

Differential Revision: https://phabricator.services.mozilla.com/D71534
2020-05-01 11:36:03 +00:00
Zibi Braniecki 7c0d8613fc Bug 1634732 - Unblock layout if nullifying DocumentL10n in LocalizationLinkRemoved. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D73472
2020-05-03 20:11:21 +00:00
Tetsuharu Ohzeki 537c14cca8 Bug 1585078 - part 2: Remove calling `GetRootWindow()` from the the child process. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D71962
2020-05-02 11:26:43 +00:00
Tetsuharu Ohzeki 5f73b12af7 Bug 1585078 - part 1: Divide `Document::RequestFullScreen()` into seperate path to clarify the case in content process. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D71961
2020-05-02 12:01:44 +00:00
Dorel Luca 159241fe4b Backed out changeset 4107b758e7ae (bug 1501608) as requested by dev 2020-05-02 15:03:19 +03:00
Andrea Marchesini 90d7351a6b Bug 1629436 - requests with webExtension loading principal are not 3rd party, r=ckerschb,robwu,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D73027
2020-05-01 21:35:59 +00:00
Nika Layzell c507cc54ac Bug 1633812 - Simplify the subframe crash codepath, r=farre
Previously the BrowsingContext was also being sent down, despite it being
obvious from the PBrowserBridge actor which the message was sent over.

Differential Revision: https://phabricator.services.mozilla.com/D72929
2020-04-29 09:58:50 +00:00
Ciure Andrei c7af299990 Backed out 2 changesets (bug 1629436) for causing test_chrome_ext_trackingprotection.html failures CLOSED TREE
Backed out changeset 18d21d5f63dd (bug 1629436)
Backed out changeset d14b4bb75db7 (bug 1629436)
2020-05-01 23:43:02 +03:00
Andrea Marchesini 72b4bf0489 Bug 1629436 - requests with webExtension loading principal are not 3rd party, r=ckerschb,robwu,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D73027
2020-05-01 19:21:03 +00:00
Magnus Melin 3175ad44ed Bug 1634665 - nullcheck mDocumentL10n in Document::InitialTranslationCompleted. r=zbraniecki,emilio
Differential Revision: https://phabricator.services.mozilla.com/D73449
2020-05-01 17:22:37 +00:00
Steve Fink 685bd6c5b0 Backed out incremental weakmap marking (bug 1167452 and bug 1633176) to postpone until after Fx77
Differential Revision: https://phabricator.services.mozilla.com/D73394
2020-05-01 00:53:15 +00:00
Brad Werth fb1e4b36af Bug 1598145 Part 1: For user-scalable=no, force min and max zoom to match initial zoom, add WPT. r=hiro
This provides web compatability with Chrome's interpretation of the spec at
https://drafts.csswg.org/css-device-adapt/#user-zoom-desc. This changes makes
us treat "the user cannot interactively change the zoom factor" as inclusive
of ANY method of the user agent changing zoom levels, regardless of whether or
not the user initiated an action.

So, in addition to preventing things like double-tap-to-zoom and pinch-zoom,
this change prevents zoom changes to fit all content into the viewport, or to
maintain visible content proportionality if the viewport is resized dynamically.

This also adds an assert to cases where Document::GetViewportInfo returns a
viewport with a non-positive scale factor that it also sets the auto scale
flag.

This also adds a tentative web-platform test.

Differential Revision: https://phabricator.services.mozilla.com/D72004
2020-04-30 23:25:53 +00:00
Zibi Braniecki 816c29ddb0 Bug 1627809 - Make the DocumentL10n translate the document when initialized lazily. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71224
2020-04-30 17:57:06 +00:00
Zibi Braniecki 4084d5c48b Bug 1627809 - Move DocumentL10n construction earlier. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D70976
2020-04-30 17:56:41 +00:00
Zibi Braniecki fe12cd1036 Bug 1627809 - Add Localization::AddResourceId and Localization::RemoveResourceId for DOM to use. r=stas
Differential Revision: https://phabricator.services.mozilla.com/D70975
2020-04-30 17:56:24 +00:00
Zibi Braniecki 9a24b61c50 Bug 1627809 - Rename Document::TriggerInitialTranslation to Document::OnParsingCompleted. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D70974
2020-04-30 17:56:11 +00:00
Zibi Braniecki 1427870732 Bug 1627809 - Move Localization.jsm construction to Localization constructor. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D70973
2020-04-30 18:22:38 +00:00
Zibi Braniecki 9211c5cc8a Bug 1627809 - Remove unncessary eager attribute from Localization API. r=stas
Differential Revision: https://phabricator.services.mozilla.com/D70972
2020-04-30 17:55:38 +00:00
Zibi Braniecki 30bcee56da Bug 1627809 - Rename *DocumentTranslation to *Translation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D70971
2020-04-30 17:55:26 +00:00
David Teller 038fcc44b3 Bug 1580448 - ChromeUtils.{register, unregister}ProcessActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69786
2020-04-30 16:43:31 +00:00
David Teller cd067d3c2e Bug 1580448 - Rename JSWindowActor into JSActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70038
2020-04-30 16:42:53 +00:00
Denis Palmeiro 792169d380 Bug 1501608 - Remove the ELEMENT_SLOT in the ScriptSourceObject and instead use a callback function to return the script element based on the value of the privateValue in the SSO. r=jonco,smaug
We can reduce the size of the SSO by removing the element slot entirely, and instead retrieve the element through a callback function.  The callback will take in the value in the private slot of the SSO, which is either a LoadedScript* (from the browser) or a JSObject* (from the shell).  In addition, this removes the requirement of having a script dom element ready when parsing a JS script which can open up new opportunities for performance.

Differential Revision: https://phabricator.services.mozilla.com/D70417
2020-04-30 16:21:23 +00:00
Stefan Hindli 9d278a82c2 Backed out changeset 8a194fc3bf96 (bug 1634411) for causing perma bc2 failure in browser/components/originattributes/test/browser/browser_postMessage.js CLOSED TREE 2020-04-30 19:08:34 +03:00
Andrea Marchesini 51cf3a80ab Bug 1634411 - Relax principal checks in PostMessageEvent, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D73268
2020-04-30 14:22:25 +00:00
Masayuki Nakano 11af44e544 Bug 1632726 - part 2: Remove some unused `nsISelectionController` methods r=smaug
Even in comm-central and BlueGriffon, `nsISelectionController::*ForDelete()`
are not used.  Therefore, we can remove them safely.

Differential Revision: https://phabricator.services.mozilla.com/D72296
2020-04-27 06:20:31 +00:00
Tim Huang 12244573a1 Bug 1633401 - Make Document.HasStorageAccess fission compatible. r=baku
In Document::HasStorageAccess(), we try to get the top-level document.
To check if the document is first-party to the top-level document. But,
this won't work for Fission since the top-level document could be
out-of-process.

In this patch, we use broswing context to get the top-level principal to
test if the document is thrid-party. If we cannot get the top-level
outer window, the top-level document should be cross-origin. So, we know
the answer. If the top-level document is available, we check the
principal to see if the document is first-party.

Differential Revision: https://phabricator.services.mozilla.com/D72664
2020-04-30 09:54:15 +00:00
Liang-Heng Chen 72da9842fb Bug 1629707 - use `StoragePrincipal` for `SessionStorage`; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D72765
2020-04-30 07:31:16 +00:00
Liang-Heng Chen 9d2d8bbeb9 Bug 1629707 - add `IntrinsicStoragePrincipal` to `nsIScriptObjectPrincipal`; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D73132
2020-04-30 05:24:10 +00:00
Stefan Hindli e791b2e3f6 Backed out 2 changesets (bug 1633401) for perma wpt failures in /storage-access-api/hasStorageAccess.sub.window.html CLOSED TREE
Backed out changeset 51411fecaf48 (bug 1633401)
Backed out changeset c06a6718ad5f (bug 1633401)
2020-04-30 12:51:11 +03:00
Andrea Marchesini f5b1872f05 Bug 1634251 - Propagate the IntrinsicStoragePrincipal when cloning a document, r=xeonchen
Differential Revision: https://phabricator.services.mozilla.com/D73189
2020-04-30 07:27:41 +00:00
Stefan Hindli e22cd35728 Backed out 9 changesets (bug 1580448) for linux build bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/dom/JSWindowActorChild.h CLOSED TREE
Backed out changeset 6b4db1a501df (bug 1580448)
Backed out changeset 677257a41457 (bug 1580448)
Backed out changeset 6db8de5fc125 (bug 1580448)
Backed out changeset fd7527c86239 (bug 1580448)
Backed out changeset bfbd3330b0a5 (bug 1580448)
Backed out changeset dafa80c63322 (bug 1580448)
Backed out changeset 2a1701831a6a (bug 1580448)
Backed out changeset 9b548bd38671 (bug 1580448)
Backed out changeset 358f764ae48b (bug 1580448)
2020-04-30 10:58:27 +03:00
Jon Coppeard 72eac88fe9 Bug 1633752 - Calculate non-incremental threshold based on heap size and increase it for smaller heaps r=sfink
This adds a splits the non-incremental threshold parameter into one for small heaps and one for large.  What counts as large and small are controlled by the existing parameters that were previously used for dynamic heap growth.  I also renamed the parameter from "non-incremental threshold" to "incremental limit".

The small heap parameter is increased to 1.4.  This avoids non-incremental GC on facebook and reddit as reported in the dependent bugs and allows us to remove the splay latency hack that was previously necessary.

Differential Revision: https://phabricator.services.mozilla.com/D72903
2020-04-29 07:45:19 +00:00
Jon Coppeard d92a182d73 Bug 1633457 - Rename some GC parameters for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D73012
2020-04-29 21:54:22 +00:00
David Teller 6fc81ee749 Bug 1580448 - ChromeUtils.{register, unregister}ProcessActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69786
2020-04-30 07:35:24 +00:00
David Teller e3ac58091c Bug 1580448 - Rename JSWindowActor into JSActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70038
2020-04-30 07:33:28 +00:00
Tim Huang 5640a727d1 Bug 1633401 - Make Document.HasStorageAccess fission compatible. r=baku
In Document::HasStorageAccess(), we try to get the top-level document.
To check if the document is first-party to the top-level document. But,
this won't work for Fission since the top-level document could be
out-of-process.

In this patch, we use broswing context to get the top-level principal to
test if the document is thrid-party. If we cannot get the top-level
outer window, the top-level document should be cross-origin. So, we know
the answer. If the top-level document is available, we check the
principal to see if the document is first-party.

Differential Revision: https://phabricator.services.mozilla.com/D72664
2020-04-29 19:34:25 +00:00
Erik Nordin e31f1c4b45 Bug 1633027 - Refactor Traversing/Unlinking StyleSheets r=emilio
- Add functions for traversing stylesheets in DocumentOrShadowRoot
- Add functions for unlinking stylesheets in DocumentOrShadowRoot
- Traverse and Unlink Document::mAdditionalSheets

Differential Revision: https://phabricator.services.mozilla.com/D72708
2020-04-29 16:40:55 +00:00
Emilio Cobos Álvarez 9a9ab94bc2 Bug 1578008 - Remove various hacks to restore resolution only after a full zoom change. r=bradwerth
This is no longer needed now that MVM doesn't restore the zoom.

Differential Revision: https://phabricator.services.mozilla.com/D72551
2020-04-30 01:21:26 +00:00
Dorel Luca 8e7e7136a3 Backed out 4 changesets (bug 1633938, bug 1578008, bug 1633488) for Devtool failures in browser/base/content/test/static/browser_parsable_css.js. CLOSED TREE
Backed out changeset e690c4cf8848 (bug 1633938)
Backed out changeset c999ecad3be8 (bug 1633488)
Backed out changeset abbc47ce1451 (bug 1578008)
Backed out changeset 9e6925ea790f (bug 1578008)
2020-04-30 04:13:42 +03:00
Emilio Cobos Álvarez 0169492da2 Bug 1578008 - Remove various hacks to restore resolution only after a full zoom change. r=bradwerth
This is no longer needed now that MVM doesn't restore the zoom.

Differential Revision: https://phabricator.services.mozilla.com/D72551
2020-04-29 21:44:01 +00:00
Kris Maglione c5353a7809 Bug 1630691: Part 1 - Get rid of most of the remaining mozbrowser API. r=nika,mtigley,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D71226
2020-04-29 19:29:06 +00:00
Simon Giesecke 876336129a Bug 1628692 - Prepare dom/base for making FallibleTArray uncopyable. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D72625
2020-04-29 08:42:37 +00:00
Eric Rahm 46564057be Bug 1610067 - Remove nsAutoPtr. r=xpcom-reviewers,nika'
`nsAutoPtr` has been deprecated for 6 years. All remaining references are gone and it can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D72930
2020-04-29 17:28:06 +00:00
Ciure Andrei fe22666be2 Backed out changeset 74edce9ec6a3 (bug 1633401) for hasStorageAccess.sub.window.html failures CLOSED TREE 2020-04-29 18:31:51 +03:00
Dimi Lee f0e37815cd Bug 1612376 - P5. Remove HasStoragePermission from WindowContext r=timhuang,baku
We don't access HasStoragePermission across process, so we don't need to
store the permission in WindowContext.

After this patch, HasStoragePermission will only be stored in the
channel's LoadInfo, which is set when a channel is created in the parent
and it won't be updated.

Depends on D71985

Differential Revision: https://phabricator.services.mozilla.com/D72305
2020-04-29 14:48:39 +00:00
Dimi Lee 8d06cbe7df Bug 1612376 - P4. ShouldAllowAccessFor use ContentBlocking::HasStorageAccessGranted r=timhuang,baku
There are two places where we save storage permission:
1. LoadInfo hasStoragePermission attribute
2. mStorageAccessGranted in nsPIDOMWindowInner

For LoadInfo.hasStoragePermission, it is set during channel creation and
its value remains the same even when the storage permission is granted
afterward.

The updated storage permission for a window is saved in
mStorageAccessGranted, which has a different meaning for fission and
non-fission mode.
In non-fission mode, mStorageAccessGranted is saved in the top-level
window and it is an array containing all tracking subframes that
are allowed to access storage.

In fission mode, mStorageAccessGranted is set in individual tracking
windows that we have granted its storage permission. Although it works
like a boolean flag in fission, we still keep using an array to compatible
with the use case in non-fission mode.

Depends on D71984

Differential Revision: https://phabricator.services.mozilla.com/D71985
2020-04-29 14:48:35 +00:00
Tim Huang 3855d7cc9a Bug 1633401 - Make Document.HasStorageAccess fission compatible. r=baku
In Document::HasStorageAccess(), we try to get the top-level document.
To check if the document is first-party to the top-level document. But,
this won't work for Fission since the top-level document could be
out-of-process.

In this patch, we use broswing context to get the top-level principal to
test if the document is thrid-party. If we cannot get the top-level
outer window, the top-level document should be cross-origin. So, we know
the answer. If the top-level document is available, we check the
principal to see if the document is first-party.

Differential Revision: https://phabricator.services.mozilla.com/D72664
2020-04-29 14:18:07 +00:00
Bogdan Tara f734fa692f Backed out changeset 09f0bd3285b9 (bug 1633401) for hasStorageAccess.sub.window.html failures CLOSED TREE 2020-04-29 16:07:13 +03:00
Tim Huang d07646ca8c Bug 1633401 - Make Document.HasStorageAccess fission compatible. r=baku
In Document::HasStorageAccess(), we try to get the top-level document.
To check if the document is first-party to the top-level document. But,
this won't work for Fission since the top-level document could be
out-of-process.

In this patch, we use broswing context to get the top-level principal to
test if the document is thrid-party. If we cannot get the top-level
outer window, the top-level document should be cross-origin. So, we know
the answer. If the top-level document is available, we check the
principal to see if the document is first-party.

Differential Revision: https://phabricator.services.mozilla.com/D72664
2020-04-29 05:26:47 +00:00
Andi-Bogdan Postelnicu 38afb32dc5 Bug 1626555 - Make `dom/base` buildable outside of `unified-build` environment. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D69183
2020-04-29 09:02:05 +00:00
Mirko Brodesser 3ecc9f7fd9 Bug 1633448: part 4) Annotate `Selection::SetAnchorFocusToRange` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Depends on D72803

Differential Revision: https://phabricator.services.mozilla.com/D72804
2020-04-28 16:15:52 +00:00
Mirko Brodesser c3cb9d2c3f Bug 1633448: part 3) Annotate `Selection::AddRangesForUserSelectableNodes` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D72803
2020-04-28 16:15:31 +00:00
Matt Woodrow 9bc5c5b884 Bug 1633310 - Don't do pre-load shouldLoadURI process switches for leaving about:newtab in the web process. r=nika,mconley
Differential Revision: https://phabricator.services.mozilla.com/D72583
2020-04-28 19:45:43 +00:00
Erik Nordin cacf520bf8 Bug 1631057 - Remove adopted sheets from styles on unlink r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D71377
2020-04-28 18:38:39 +00:00
Michael Kaply 350170619f Bug 1415146 - Use getExposedWebLocales for navigator.language(s) if there are no accept languages. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D59565
2020-04-27 20:16:04 +00:00
Nika Layzell 62cc378f74 Bug 1580565 - Part 8: Re-enable disabled tests, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D72763
2020-04-28 15:33:20 +00:00
Sebastian Streich f5bf1cde94 Bug 1625845 - Remove GetUri in Navigator.cpp r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D68749
2020-04-28 14:52:09 +00:00
Jon Coppeard 3f616ab772 Bug 1633405 - Remove dynamic GC options that are enabled everywhere r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D72696
2020-04-28 07:59:47 +00:00
Christoph Kerschbaumer af3bb17589 Bug 1575356: Update Mixed Content Blocker to rely on BrowsingContext instead of nsIDocShellTreeItem. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D71547
2020-04-28 13:08:57 +00:00
Timothy Gu 6407f13ce3 Bug 1628500 - Remove aIgnoreTabindex argument from Element::IsInteractiveHTMLContent(). r=edgar
This argument is set to true everywhere, and soon HTML will no longer consider
tabindex for interactive content: https://github.com/whatwg/html/pull/5457.

Differential Revision: https://phabricator.services.mozilla.com/D72568
2020-04-28 11:22:32 +00:00