Commit Graph

2004 Commits

Author SHA1 Message Date
Sean Feng
98bef8ea08 Bug 1830820 - Introduce some delays to user input handling r=smaug
In some edge cases, we may start handling user input events that
are not supposed to be handled by the current document.

This patch introduces some delay to handle user input events.

Differential Revision: https://phabricator.services.mozilla.com/D180976
2023-08-31 15:56:47 +00:00
Emilio Cobos Álvarez
18854ff8b5 Bug 1850238 - Make Link states not intrinsic. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186877
2023-08-30 09:18:32 +00:00
Emilio Cobos Álvarez
3e9e56e2c8 Bug 1850293 - Make editable states not intrinsic. r=smaug,masayuki
This one is tricky because form controls, though I think I got it right...

This fixes a pre-existing bug where we're not following the spec for readonly
inside content-editable.

I filed this as bug 1850390 but other browsers match the spec so add a test and
fix it while at it. This allows cheaper checks for readonlyness in a couple
places.

Differential Revision: https://phabricator.services.mozilla.com/D186896
2023-08-30 09:18:31 +00:00
Markus Stange
a4e2816d54 Bug 1843484 - Use EventTarget* instead of nsISupports* for the event target parameter of the EventDispatcher::Dispatch methods. r=smaug
This saves a few QueryInterface calls on the hot path.

Differential Revision: https://phabricator.services.mozilla.com/D186977
2023-08-28 23:38:43 +00:00
Markus Stange
70bd936589 Bug 1843484 - Use EventTarget* instead of nsISupports* for the event target parameter of the nsContentUtils::Dispatch methods. r=smaug
This saves a few queryInterface calls on the hot path.

Differential Revision: https://phabricator.services.mozilla.com/D186976
2023-08-28 23:38:42 +00:00
Ziran Sun
5b9fbf874d Bug 1849689 - Initial steps on handling Esc key for popover. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186643
2023-08-28 07:47:24 +00:00
Markus Stange
29389cdfd6 Bug 1849776 - Don't enqueue DeferredContentEditableCountChangeEvent if aElement is nullptr. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186669
2023-08-22 20:15:16 +00:00
Olli Pettay
22262b6f58 Bug 1843473 - Don't dispatch DOMActivate if there are no listeners for it, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D186473
2023-08-18 06:01:16 +00:00
Tooru Fujisawa
b4da7fa0cf Bug 1847469 - Part 24: Use column number types in JS::DescribeScriptedCaller. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185762
2023-08-16 17:31:42 +00:00
Cristian Tuns
77d753c741 Backed out 27 changesets (bug 1847469) for causing spidermonkey bustages in Script.cpp CLOSED TREE
Backed out changeset 9d6e2651a013 (bug 1847469)
Backed out changeset 9b72d668efd2 (bug 1847469)
Backed out changeset 86abf5cf0a22 (bug 1847469)
Backed out changeset 46833087f8ac (bug 1847469)
Backed out changeset f3e2207fdeec (bug 1847469)
Backed out changeset aed75776cfff (bug 1847469)
Backed out changeset 8292a38bd99f (bug 1847469)
Backed out changeset 1320f83fb8c7 (bug 1847469)
Backed out changeset df9f925f9837 (bug 1847469)
Backed out changeset 69f32cf1862a (bug 1847469)
Backed out changeset b2ddddec8818 (bug 1847469)
Backed out changeset 056eed7abc97 (bug 1847469)
Backed out changeset 5df4f43ac0bf (bug 1847469)
Backed out changeset cb57923f6532 (bug 1847469)
Backed out changeset a0993f2a2195 (bug 1847469)
Backed out changeset 782499fbedf2 (bug 1847469)
Backed out changeset cf84fb98c5e1 (bug 1847469)
Backed out changeset 1fa5ab59814b (bug 1847469)
Backed out changeset f5f78944df81 (bug 1847469)
Backed out changeset aa14337bf5c6 (bug 1847469)
Backed out changeset 6757db4575d7 (bug 1847469)
Backed out changeset 236ff135701e (bug 1847469)
Backed out changeset 9b4d5b435020 (bug 1847469)
Backed out changeset a0f789621bc8 (bug 1847469)
Backed out changeset c19b81f48055 (bug 1847469)
Backed out changeset b4521e546d7e (bug 1847469)
Backed out changeset f26a10289316 (bug 1847469)
2023-08-16 07:08:01 -04:00
Tooru Fujisawa
fb38c26358 Bug 1847469 - Part 24: Use column number types in JS::DescribeScriptedCaller. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185762
2023-08-16 10:26:33 +00:00
Emilio Cobos Álvarez
9d1851a1aa Bug 1845779 - Don't report use counter data for content-inaccessible about:blank documents. r=nika
Our counters are super low because we report lots of empty entries for
these. It seems just opening a new tab is enough to trigger this.

While at it I found that we also report about:preferences / about:config
since they use the system principal. Also block those.

Differential Revision: https://phabricator.services.mozilla.com/D184834
2023-08-16 10:23:22 +00:00
Emilio Cobos Álvarez
3b1bd6b3ce Bug 1451717 - Fix scheduling of media query list events to match the spec. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D185662
2023-08-16 09:07:14 +00:00
Narcis Beleuzu
f8ab27b44e Backed out 2 changesets (bug 1830820) for reftest failure on inline-block-slice-5.html . CLOSED TREE
Backed out changeset 941c44881781 (bug 1830820)
Backed out changeset da493ba4c9a6 (bug 1830820)
2023-08-15 18:55:44 +03:00
Narcis Beleuzu
6c86176809 Backed out changeset 88ec6682eab1 (bug 1845779) for bc failure on browser_use_counters.js . CLOSED TREE 2023-08-15 17:21:28 +03:00
Sean Feng
5a3c7dad7d Bug 1830820 - Introduce some delays to user input handling r=smaug
In some edge cases, we may start handling user input events that
are not supposed to be handled by the current document.

This patch introduces some delay to handle user input events.

Differential Revision: https://phabricator.services.mozilla.com/D180976
2023-08-15 13:55:57 +00:00
Benjamin VanderSloot
3d8d18cfc1 Bug 1835907, part 5 - Refactor the window's mStorageAccessPermissionGranted variable and its Getters to a more accurate name: mUsingStorageAccess - r=anti-tracking-reviewers,pbz
This probably should have been done earlier, but became obvious with uses of Document::HasStorageAccessPermissionGrated in this stack.

Differential Revision: https://phabricator.services.mozilla.com/D184825
2023-08-15 13:04:05 +00:00
Benjamin VanderSloot
b5cc86c920 Bug 1835907, part 4 - Test the storage access permission before prompting the user - r=anti-tracking-reviewers,pbz
Because the Document's Channel's LoadInfo is no longer being set to reflect the storage-access permission, we need to test if the permission is set before we ask the user about it.

Currently I opted for an IPC (and one we already have) in Fission. We could cut this out with an extra bit on the document, but I don't think this is performance-critical since it only happens on prompt-able requestStorageAccess calls.

Differential Revision: https://phabricator.services.mozilla.com/D184824
2023-08-15 13:04:05 +00:00
Emilio Cobos Álvarez
24b79b3a7c Bug 1845779 - Don't report use counter data for content-inaccessible about:blank documents. r=nika
Our counters are super low because we report lots of empty entries for
these. It seems just opening a new tab is enough to trigger this.

While at it I found that we also report about:preferences / about:config
since they use the system principal. Also block those.

Differential Revision: https://phabricator.services.mozilla.com/D184834
2023-08-14 23:22:37 +00:00
Cosmin Sabou
819840f3b4 Backed out 6 changesets (bug 1835907) for causing multiple failures. CLOSED TREE
Backed out changeset 91ef29afec50 (bug 1835907)
Backed out changeset 989479621780 (bug 1835907)
Backed out changeset 86e3f98ceb31 (bug 1835907)
Backed out changeset 4790e44c234c (bug 1835907)
Backed out changeset bb9f48eec5bf (bug 1835907)
Backed out changeset 74f90708260a (bug 1835907)
2023-08-14 22:18:10 +03:00
Benjamin VanderSloot
dfe479593f Bug 1835907, part 5 - Refactor the window's mStorageAccessPermissionGranted variable and its Getters to a more accurate name: mUsingStorageAccess - r=anti-tracking-reviewers,pbz
This probably should have been done earlier, but became obvious with uses of Document::HasStorageAccessPermissionGrated in this stack.

Differential Revision: https://phabricator.services.mozilla.com/D184825
2023-08-14 18:02:47 +00:00
Benjamin VanderSloot
598a8c5467 Bug 1835907, part 4 - Test the storage access permission before prompting the user - r=anti-tracking-reviewers,pbz
Because the Document's Channel's LoadInfo is no longer being set to reflect the storage-access permission, we need to test if the permission is set before we ask the user about it.

Currently I opted for an IPC (and one we already have) in Fission. We could cut this out with an extra bit on the document, but I don't think this is performance-critical since it only happens on prompt-able requestStorageAccess calls.

Differential Revision: https://phabricator.services.mozilla.com/D184824
2023-08-14 18:02:46 +00:00
Emilio Cobos Álvarez
b710fc6626 Bug 1848639 - Remove zoom transform-based compat hack. r=dholbert
This was never good enough. Remove it to work towards a proper (ish)
`zoom` implementation.

Differential Revision: https://phabricator.services.mozilla.com/D186137
2023-08-14 16:19:16 +00:00
renevietnam29@gmail.com
c82eea7747 Bug 1844491 remove dom.fullscreen.modal pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184316
2023-08-11 14:09:17 +00:00
Tom Schuster
f0c5b31674 Bug 1847539 - Remove the expired document CSP telemetry. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D185550
2023-08-11 09:20:11 +00:00
Nicolas Chevobbe
3c3448aad6 Bug 1771113 - Add chromeOnly StyleSheetRemoved event, emitted when a stylesheet is removed. r=emilio.
This new event will be consumed by DevTools to update style information.

As for `StyleSheetApplicableStateChanged`, this event is emitted from the document.
It's only enabled when `document.styleSheetChangeEventsEnabled` is set to true.

The existing test around the `StyleSheetApplicableStateChanged` is renamed and
modified to assert both events when stylesheets are added, modified and removed.

Differential Revision: https://phabricator.services.mozilla.com/D147271
2023-08-10 14:36:03 +00:00
Emilio Cobos Álvarez
a67155e52a Bug 1835864 - Make printing / paged mode deal with multiple canvas backgrounds properly. r=dholbert
The subdocument call when there's no root frame is silly, because we
won't find a canvas frame and we'll end up with transparent.

This needs to tweak the canvas frame construction code to make canvas
anon content show up on the "top" canvas, not on the page content
canvas.

This can be simplified now, because the reason we had to build canvas
anon content before processing kids of the root frame (bug 1558352) no
longer applies since I made popups regular out-of-flow elements
(bug 1799343).

Differential Revision: https://phabricator.services.mozilla.com/D179461
2023-08-10 12:59:00 +00:00
Benjamin VanderSloot
1e962d8391 Bug 1847768 - Storage access API sometimes rejects instead of autogranting - r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D185686
2023-08-09 19:35:36 +00:00
Natalia Csoregi
f2ac649fc6 Backed out 3 changesets (bug 1847584) for causing vsync failures. CLOSED TREE
Backed out changeset bdfc3c7388cf (bug 1847584)
Backed out changeset 54b34c76db47 (bug 1847584)
Backed out changeset 03bf43b4ae07 (bug 1847584)
2023-08-09 15:47:03 +03:00
Emilio Cobos Álvarez
7eb823d7f1 Bug 1847584 - Consistently throttle visibility:hidden frames. r=smaug
Before this patch OOP frames were being throttled but in-process ones
weren't.

Depends on D185643

Differential Revision: https://phabricator.services.mozilla.com/D185794
2023-08-09 12:08:25 +00:00
Emilio Cobos Álvarez
83f6ffef76 Bug 1847546 - Don't do duplicate work on style elements from the innerHTML setter. r=smaug
Right now, when binding to the tree we queue a runnable to update the
stylesheet, even though mEnableUpdates is false.

Even though the redundant update is nowadays always cached, it's just
wasted work, and the code is simpler without it.

This will be tested by bug 1771113, which is what made me look at this.

We need to tweak a bit the dispatch of applicable state change events
for DevTools, because for a case like:

  div.attachShadow({ mode: "open" }).innerHTML = `<style>...</style>`;

Before we'd go through the stylesheet cache here due to the redundant
update:

  https://searchfox.org/mozilla-central/rev/fb43eb3bdf5b51000bc7dfe3474cbe56ca2ab63c/layout/style/SharedStyleSheetCache.cpp#161-165

But now we won't, and the code in StyleSheet.cpp wasn't quite correct /
didn't dispatch the event.

Nobody listens to style-sheet-applicable-state-changed, so remove that
code while at it.

Differential Revision: https://phabricator.services.mozilla.com/D185559
2023-08-07 20:21:34 +00:00
Harshit Sohaney
934ea20d50 Bug 1763379 - Updated Storage Access transient user activation behaviour to match storage access API spec. r=bvandersloot,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D183407
2023-08-04 03:22:17 +00:00
Olli Pettay
b2e93c3a7a Bug 1844752, initialize nsNodeInfoManager::mPrincipal with the correct principal when available, r=dom-core,emilio,peterv
Differential Revision: https://phabricator.services.mozilla.com/D184219
2023-07-31 23:44:15 +00:00
Olli Pettay
e4f8b930b4 Bug 1845571, when creating a static clone, docgroup may or may not have been created already. Don't even try to optimize out that case, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D184895
2023-07-31 19:11:09 +00:00
Otto Länd
3e8f4af8a6 Bug 1607009, 1627263: apply code formatting via Lando
# ignore-this-changeset
2023-07-31 14:52:59 +00:00
Tom Schuster
75a3c2ebe4 Bug 1627263 - Provide the nonce for speculative style preloads. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D183966
2023-07-31 14:49:56 +00:00
Tom Schuster
5e8eb43ee6 Bug 1607009 - Move nonce getting to SheetLoadData. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183965
2023-07-31 14:49:55 +00:00
Olli Pettay
5e8a10cfc5 Bug 1844774 - Optimize Document::SetScopeObject for data documents, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D184238
2023-07-25 08:10:18 +00:00
Andrew Creskey
bce6497519 Bug 1844185 - Add a pref to optionally disable preconnect r=necko-reviewers,kershaw
We want to test with and without this feature, so expose it via pref.

Differential Revision: https://phabricator.services.mozilla.com/D184150
2023-07-24 13:50:52 +00:00
Gregory Pappas
101176547a Bug 1842475 - Remove layout.css.color-scheme.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184013
2023-07-22 17:19:10 +00:00
Gregory Pappas
9fdac45e54 Bug 1844493 - Remove dom.moduleScripts.enabled pref r=smaug,jonco
Differential Revision: https://phabricator.services.mozilla.com/D184072
2023-07-20 10:03:46 +00:00
Natalia Csoregi
d32f6bb586 Backed out 2 changesets (bug 1842474, bug 1842475) for causing bustage on accent-color issues. CLOSED TREE
Backed out changeset 108eee70bf44 (bug 1842475)
Backed out changeset d381fa26e3b6 (bug 1842474)
2023-07-19 19:45:38 +03:00
Gregory Pappas
1987a39b10 Bug 1842475 - Remove layout.css.color-scheme.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184013
2023-07-19 16:22:16 +00:00
Stanca Serban
23fefc1f0c Backed out changeset 2c5181cc46ec (bug 1843279) for causing mochitests failures in test_MozDomFullscreen_event.xhtml. CLOSED TREE 2023-07-13 23:42:59 +03:00
Emilio Cobos Álvarez
b396bd05a5 Bug 1843279 - Simplify IsInFocusedTab. r=smaug
Tests no longer seem unhappy with this.

Differential Revision: https://phabricator.services.mozilla.com/D183496
2023-07-13 14:56:47 +00:00
Emilio Cobos Álvarez
c05407a221 Bug 1843277 - Remove nsContentUtils::HasPluginWithUncontrolledEventDispatch. r=peterv
Always false.

Differential Revision: https://phabricator.services.mozilla.com/D183495
2023-07-13 14:35:12 +00:00
Adam Vandolder
92c9949b2e Bug 1685333 - Support adoption of document fragment nodes across documents. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D177215
2023-07-13 14:02:46 +00:00
Tom Ritter
d620a46d9d Bug 1842678: Add a bunch of RFP logging for debugging purposes r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D183202
2023-07-12 13:57:49 +00:00
Norisz Fay
bf676656ce Backed out 2 changesets (bug 1842678) for causing failures on browser_navigator_iframes.js CLOSED TREE
Backed out changeset 179417d82498 (bug 1842678)
Backed out changeset 29825d05469c (bug 1842678)
2023-07-11 20:54:14 +03:00
Tom Ritter
c272ed508f Bug 1842678: Add a bunch of RFP logging for debugging purposes r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D183202
2023-07-11 15:43:54 +00:00