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

651 Коммитов

Автор SHA1 Сообщение Дата
Benjamin VanderSloot bd2812cf84 Bug 1734026 - Grant storageAccessAPI permission on user interaction in iframes with storage access, r=anti-tracking-reviewers,pbz
- Add Synchronous version of HasStorageAccess
- Use this synchronous version as an additional way to be granted the StorageAccessAPI permission on user interaction
- Test that storageAccessAPI permission is granted on user interaction

Differential Revision: https://phabricator.services.mozilla.com/D132024
2021-12-08 12:10:51 +00:00
Emilio Cobos Álvarez a86e7625ac Bug 1580394 - Add an InsertAnonymousContent version which tries to update layout synchronously if needed. r=nchevobbe,smaug
Differential Revision: https://phabricator.services.mozilla.com/D132034
2021-12-02 08:39:22 +00:00
Sandor Molnar 41e90a1bee Backed out 2 changesets (bug 1580394) for causing dt failures in browser_dbg-paused-overlay-loading. CLOSED TREE
Backed out changeset e692ec7d440f (bug 1580394)
Backed out changeset 0ceda05fc737 (bug 1580394)
2021-12-01 11:20:15 +02:00
Emilio Cobos Álvarez a198b03c34 Bug 1580394 - Add an InsertAnonymousContent version which tries to update layout synchronously if needed. r=nchevobbe,smaug
Differential Revision: https://phabricator.services.mozilla.com/D132034
2021-12-01 08:11:22 +00:00
Butkovits Atila 724754167c Backed out 2 changesets (bug 1580394) for causing failures at browser_dbg-paused-overlay-loading.js. CLOSED TREE
Backed out changeset 6d96da07e581 (bug 1580394)
Backed out changeset db068d3108a2 (bug 1580394)
2021-11-30 12:44:44 +02:00
Emilio Cobos Álvarez 4253a7fa88 Bug 1580394 - Add an InsertAnonymousContent version which tries to update layout synchronously if needed. r=nchevobbe,smaug
Differential Revision: https://phabricator.services.mozilla.com/D132034
2021-11-30 09:33:19 +00:00
Kagami Sascha Rosylight 11ebe98845 Bug 1741181 - Move lock counter to WindowInner r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131975
2021-11-24 11:55:38 +00:00
Paul Zuehlcke 16be926c53 Bug 1638383 - Add a shim for the dFPI Microsoft login breakage. r=anti-tracking-reviewers,twisniewski,webcompat-reviewers,timhuang,denschub,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D131643
2021-11-23 12:42:25 +00:00
Kagami Sascha Rosylight 220a38db00 Bug 1741181 - NotifyRequestDestroy() only when the manager is alive r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131535
2021-11-22 22:30:34 +00:00
Emilio Cobos Álvarez a3a1b27924 Bug 1740230 - Refactor :-moz-lwtheme pseudo-classes to get invalidated correctly. r=dholbert
Use the same document state mechanism we have for :moz-locale-dir. Also,
simplify the setup of the later to be the same as :dir(), allowing the
matching code to be less repetitive.

This should fix some flakiness in chrome mochitests, but we have no existing
tests for these pseudo-classes more generally and since they're just
chrome-only I'm not super-excited about adding more.

Differential Revision: https://phabricator.services.mozilla.com/D130735
2021-11-09 20:59:11 +00:00
Kagami Sascha Rosylight fffe2b14cb Bug 1738905 - Part 2: Prevent bfcache in SharedWorker r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D129886
2021-11-06 00:06:03 +00:00
olaoluwa a12c2c2e59 Bug 1575191- Make callers to Document::SetContentType with ASCII literal using SetContentTypeInternal.. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129697
2021-11-04 06:47:05 +00:00
Emilio Cobos Álvarez 1421e7f545 Bug 1525107 - Make Canvas/CanvasText and Link colors color-scheme-aware. r=dholbert
For that, add `.dark` version of the browser.display* prefs that control
the light version of these colors.

The default for background/foreground colors are taken from the
GenericDarkColors used in LookAndFeel.

The defaults for links are based on this discussion:

  https://github.com/whatwg/html/issues/5426#issuecomment-904021675

(So they effectively match Chrome).

Whether the dark colors should be exposed in about:preferences (like the
light colors are) is TBD.

With this patch, we pass all the tests in:

  /html/semantics/document-metadata/the-meta-element/color-scheme/

Use the colors to paint the default canvas background and the default
colors.

There are three "regressions", though they are really progressions: we
now render the reference as the test expects (before we rendered a light
canvas background even for the reference).

Apart of these iframe tests (which we should look into, I filed
https://bugzilla.mozilla.org/show_bug.cgi?id=1738380), there are three
remaining test failures.

Two of them are due to `color: initial` not changing based on the
color-scheme. Safari also fails these tests, and the thing they're
really testing is whether system colors are preserved at computed-value
time:

  https://github.com/w3c/csswg-drafts/issues/3847

Regarding that change, I'm not so sure the trade-offs there are worth
it, as that not only complicates interpolation (we wouldn't be able to
use system colors in color-mix among others, see
https://github.com/w3c/csswg-drafts/issues/5780) plus it changes
inheritance behavior in sorta unexpected ways, see:

  https://github.com/w3c/csswg-drafts/issues/6773

Which I just filed because apparently no browser implements this
correctly. So for now will punt on those (keep matching Safari).

There's an svg-as-image test:

  https://searchfox.org/mozilla-central/rev/f8576fec48d866c5f988baaf1fa8d2f8cce2a82f/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html

Which isn't using the feature at all and I'm not sure why is it supposed
to pass (why prefers-color-scheme: dark is supposed to match that SVG
image). This test fails in all browsers apparently:

  https://wpt.fyi/results/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html?label=master&label=experimental&aligned

I sent https://github.com/web-platform-tests/wpt/pull/31407 to remove
it and hopefully get it reviewed by some Chromium folks.

Differential Revision: https://phabricator.services.mozilla.com/D129746
2021-10-29 19:58:25 +00:00
Emilio Cobos Álvarez f85c48f96d Bug 1525107 - Implement <meta name=color-scheme>. r=dholbert
There are still tests failing because
https://bugzilla.mozilla.org/show_bug.cgi?id=1736034 hasn't been synced
yet.

Once that lands, they will still fail because we don't change
Canvas/CanvasText based on color-scheme, but that I'm attaching
patches for after this one.

Differential Revision: https://phabricator.services.mozilla.com/D129743
2021-10-29 19:58:24 +00:00
Kagami Sascha Rosylight 6e35d50813 Bug 1736563 - Part 3: Prevent bfcache when active lock request exists r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D129015
2021-10-28 22:20:00 +00:00
Kagami Sascha Rosylight eb885f2262 Bug 1736563 - Part 1: Use uint32_t for bfcache status flags r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D129013
2021-10-28 22:19:59 +00:00
Emilio Cobos Álvarez bc56938456 Bug 1731714 - Add a document.getWireframe() API that gets some relevant rects in the viewport. r=mconley
I added an option to return also the nodes because it's very helpful for
debugging. A bunch of the "unknown" ones are just elements with
transparent backgrounds (but still hit-testable), so we probably want to
exclude them from the result list or what not to massively reduce the
size of the returned object.

But anyhow, this probably does for a prototype.

Differential Revision: https://phabricator.services.mozilla.com/D128720
2021-10-20 13:56:32 +00:00
Sean Feng 3416efe3f7 Bug 1735945 - Split unload into unload and beforeunload for BFCACHE_COMBO telemetry probe r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D128625
2021-10-18 17:31:28 +00:00
Emilio Cobos Álvarez fb8e2b5796 Bug 1736038 - Simplify some color-scheme handling in core. r=mstange
Remove the follow-firefox-theme pref as now that's default everywhere,
and document better the behavior of the color-scheme property by
reworking and commenting the logic on it a bit.

Differential Revision: https://phabricator.services.mozilla.com/D128610
2021-10-15 16:53:08 +00:00
Emilio Cobos Álvarez 9ab29157c0 Bug 1735574 - Simplify meta viewport handling. r=smaug
We only need the whole array to deal with removals, but other browsers
don't deal with them, see:

  https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_meta_element.cc;l=479;drc=439c6ac35199f3828faf0f0d070d84109c9bf6a1

Given <meta name=viewport> is weird enough as it is, we should probably
do this and simplify the code.

The header data thing was just synonym to "has a meta viewport", so
simplify that code too.

Depends on D128389

Differential Revision: https://phabricator.services.mozilla.com/D128390
2021-10-15 16:08:02 +00:00
Emilio Cobos Álvarez edaed7ecbf Bug 1735574 - Cleanup HTMLMetaElement handling of <meta name content>. r=smaug
This shouldn't change behavior, but I find it a bit easier to reason
about (and should be marginally faster by not doing double attribute
lookups, but not like the should usually matter).

Differential Revision: https://phabricator.services.mozilla.com/D128389
2021-10-15 12:11:14 +00:00
Butkovits Atila a0651d797e Backed out 2 changesets (bug 1735574) for causing failures at test_meta_viewport_change_name.html. CLOSED TREE
Backed out changeset 86e71bf1ba6c (bug 1735574)
Backed out changeset f69838cbf52b (bug 1735574)
2021-10-15 03:29:29 +03:00
Emilio Cobos Álvarez e64507f95f Bug 1735574 - Simplify meta viewport handling. r=smaug
We only need the whole array to deal with removals, but other browsers
don't deal with them, see:

  https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_meta_element.cc;l=479;drc=439c6ac35199f3828faf0f0d070d84109c9bf6a1

Given <meta name=viewport> is weird enough as it is, we should probably
do this and simplify the code.

The header data thing was just synonym to "has a meta viewport", so
simplify that code too.

Differential Revision: https://phabricator.services.mozilla.com/D128390
2021-10-14 18:56:16 +00:00
Emilio Cobos Álvarez 7e67655c8d Bug 1735574 - Cleanup HTMLMetaElement handling of <meta name content>. r=smaug
This shouldn't change behavior, but I find it a bit easier to reason
about (and should be marginally faster by not doing double attribute
lookups, but not like the should usually matter).

Differential Revision: https://phabricator.services.mozilla.com/D128389
2021-10-14 18:56:15 +00:00
Emilio Cobos Álvarez 4f8856c545 Bug 1730503 - Make RDM force Android-style scrollbars better. r=mstange,devtools-backward-compat-reviewers,nchevobbe
There are a few bits that still don't work with this patch but will with the
following patches.

Differential Revision: https://phabricator.services.mozilla.com/D128083
2021-10-12 09:21:17 +00:00
Tim Huang 336b189ae0 Bug 1724376 - Part 10: Only expose the privilege SSA to system prinicpal and content scripts of webcompt extension. r=dimi,edgar
This patch changes the way how we decide to expose the privilege SSA to
document interface. We will expose the interface for system principal
and the content script of the webcompat extension only.

Differential Revision: https://phabricator.services.mozilla.com/D125959
2021-10-05 15:16:23 +00:00
Tim Huang 832ce02a1c Bug 1724376 - Part 7: Implement Document::RequestStorageAccessForOrigin() r=dimi,edgar
Differential Revision: https://phabricator.services.mozilla.com/D123809
2021-10-05 15:16:21 +00:00
Olli Pettay a20bf5465f Bug 1731132, unsuppress painting on top level content presshells sooner, r=emilio
Unsuppressing is done only if the page can use stylesheet cache. That should mean the
load isn't a cold load and also some other resources may be cached and thus
painting could happen sooner.

There is currently a regression around dom.ipc.processCount.webIsolated handling, but the
testing has been done with dom.ipc.processCount.webIsolated==1, and the patch for bug 1731792
should give back similar behavior as what process count 1 has.

Differential Revision: https://phabricator.services.mozilla.com/D125878
2021-09-28 12:04:42 +00:00
Tim Huang bedecdcbae Bug 1731557 - Part 3: Check the fact if the channel/window is allowlisted in ContentBlocking checks. r=pbz
Priviously, the ContentBlocking::ShouldAllowAccessFor() checkes don't
check if the storage permission was came from the allowList or not. This
patch changes that and it will check if the channel/window is
allowlisted at the same moment as checking the ContentBlockingAllowList.
It returns early if the channel/window is in the allowList.

Differential Revision: https://phabricator.services.mozilla.com/D126278
2021-09-27 22:50:42 +00:00
owlishDeveloper 800e6ffa5d Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-23 01:41:47 +00:00
Noemi Erli 50d4e6c878 Backed out changeset 890d147bad1d (bug 1697866) for causing bustages in WindowGlobalParent.cpp CLOSED TREE 2021-09-23 01:20:43 +03:00
owlishDeveloper 7acebc65af Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-22 18:30:39 +00:00
Tooru Fujisawa f263a1ae81 Bug 1718481 - Use stencil in nsXULPrototypeCache. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D121254
2021-09-21 03:18:02 +00:00
Olli Pettay f083f381d8 Bug 1727514 - media playback should stop in the bfcache, r=peterv
This version doesn't change SetContainer handling, since it seems to be tricky for the top level page.
So only activity change notification is fired and IsActive() is updated.
The comment about IsActive() was wrong even with the old bfcache implementation.
(I did check that it returned false when the page was in bfcache and many of the activity observers rely on that)

The changes to HTMLMediaElement are needed to ensure page can enter bfcache..

Differential Revision: https://phabricator.services.mozilla.com/D124684
2021-09-20 08:49:22 +00:00
Butkovits Atila 8957144a0f Backed out 3 changesets (bug 1718194, bug 1718623, bug 1718481) for causing leaks. CLOSED TREE
Backed out changeset 1cd8bdf1fc92 (bug 1718481)
Backed out changeset aa56fe2c069d (bug 1718194)
Backed out changeset f7cb7313d1c7 (bug 1718623)
2021-09-18 15:47:45 +03:00
Tooru Fujisawa 58155ebcca Bug 1718481 - Use stencil in nsXULPrototypeCache. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D121254
2021-09-18 11:16:46 +00:00
Masayuki Nakano 5912f0b3ff Bug 1729480 - Make `keypress` event listener of editor and `execCommand` related methods access editor instance after flushing pending layout r=emilio,smaug
I have no idea how to make the test result stable because the intermittent
failure is caused by a race of `IMEContentObserver`'s content query performend
at vsync and `keypress` event after the `keydown` event.  Therefore, I try to
fix the root cause of the failure.

There are two paths reaching a public method of editor with pending
notifications.  One is `keypress` event listener of the editor.  The other is
`execCommand` related methods of `Document`.  Therefore, we should make them
flush pending notifications before accessing editor, but the cost may be too
expensive.  So we should consider whether we should flush pending notifications
or not as far as later.

Note that we cannot fix the `beforeinput` cases because flushing pending
notifications after dispatching `beforeinput` event may cause oranges.  It'll
be fixed while I'm working on bug 1710784.

Differential Revision: https://phabricator.services.mozilla.com/D125805
2021-09-17 17:48:05 +00:00
Olli Pettay b9336991af Bug 1730977 - Check the existence of requests before calling Stop(), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D125752
2021-09-17 14:18:20 +00:00
Sandor Molnar c60bc752d8 Backed out changeset 2d49d73f38aa (bug 1727514) for causing frequent crashes. a=backout 2021-09-16 15:52:56 +03:00
Olli Pettay d0485c8a55 Bug 1727514 - media playback should stop in the bfcache, r=peterv
SetContainer handling is similar to what DocumentViewer does for the old bfcache implementation.
(The old implementation hides it quite well).
The changes to HTMLMediaElement are needed to ensure page can enter bfcache.

Removed erroneous MOZ_ASSERT in nsPresContext, it is ok to trigger that code path in the new implementation.
And the Run() method of the relevant nsIRunnable already deals with that case.

Differential Revision: https://phabricator.services.mozilla.com/D124684
2021-09-13 12:40:18 +00:00
Mirko Brodesser 69287a69c2 Bug 1727271: part 3) const-qualify `Document::HasValidTransientUserGestureActivation`. r=edgar
Depends on D123438

Differential Revision: https://phabricator.services.mozilla.com/D123450
2021-08-25 07:29:56 +00:00
Peter Van der Beken 1d099d0913 Bug 1706347 - Check mOOPChildrenLoading when deciding to put page in BFCache with Fission enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117199
2021-08-16 09:08:33 +00:00
Sebastian Hengst 30cca9cb15 Backed out changeset f912045db98d (bug 1706347) for causing content crashes (bug 1725558). a=backout DONTBUILD 2021-08-13 11:19:42 +02:00
Olli Pettay fdb97b51e8 Bug 1724899, suppress microtasks and timers only in the current tab when dom.input_events.canSuspendInBCG.enabled is false, r=kashav
Depends on D122290

Differential Revision: https://phabricator.services.mozilla.com/D122298
2021-08-12 16:01:08 +00:00
Olli Pettay 5beba99004 Bug 1724777, optimize suppressed MicroTask handling, r=mccr8
The test is in theory racy, but trying to limit the cases when it might behave badly
by running it on opt desktop builds only. Without the patch the 'period' check takes over 400ms locally and with the
patch 1-3ms.

The changes are just trying to optimize execution, not change the behavior.
Use of SuppressedMicroTasks is perhaps a bit odd, but it helps keeping
SavedMicroTaskQueue and similar code simple.

Differential Revision: https://phabricator.services.mozilla.com/D122290
2021-08-12 16:01:08 +00:00
Peter Van der Beken f78596c95a Bug 1706347 - Check mOOPChildrenLoading when deciding to put page in BFCache with Fission enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117199
2021-08-12 14:11:29 +00:00
Zibi Braniecki 9f3aa2521f Bug 1613705 - [localization] part2: Switch Localization class to use localization-ffi. r=emilio,nika
Depends on D104788

Differential Revision: https://phabricator.services.mozilla.com/D104789
2021-08-03 16:25:10 +00:00
Butkovits Atila 949da905e7 Backed out 19 changesets (bug 1613705) for causing build bustages complaining about Document.cpp. CLOSED TREE
Backed out changeset 2ee1091dd20d (bug 1613705)
Backed out changeset d377afc0b09f (bug 1613705)
Backed out changeset de9d4378f0ac (bug 1613705)
Backed out changeset 9843372abb6e (bug 1613705)
Backed out changeset 5fc5918e5905 (bug 1613705)
Backed out changeset a7aeae7afd49 (bug 1613705)
Backed out changeset 5d61617a5402 (bug 1613705)
Backed out changeset 85bf98573899 (bug 1613705)
Backed out changeset 175af8a1b8c2 (bug 1613705)
Backed out changeset 93fcb23d7898 (bug 1613705)
Backed out changeset 595529cd906f (bug 1613705)
Backed out changeset 9f3e2963d925 (bug 1613705)
Backed out changeset 442289058933 (bug 1613705)
Backed out changeset fc3b9acb0e81 (bug 1613705)
Backed out changeset 408983c64f7f (bug 1613705)
Backed out changeset 08b637fc3fcd (bug 1613705)
Backed out changeset 6ef0aafd2db0 (bug 1613705)
Backed out changeset d88b294e0a5e (bug 1613705)
Backed out changeset e6bebff87544 (bug 1613705)
2021-08-03 12:36:01 +03:00
Zibi Braniecki 294c93befa Bug 1613705 - [localization] part2: Switch Localization class to use localization-ffi. r=emilio,nika
Depends on D104788

Differential Revision: https://phabricator.services.mozilla.com/D104789
2021-08-03 05:52:00 +00:00
Kagami Sascha Rosylight 86a6ba4bda Bug 1723050 - Part 2: Replace typedef by using in dom/base/ r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D121294
2021-08-02 14:40:41 +00:00