Henri Sivonen
8c188f23b4
Bug 1967381 - Optimize Document::RecomputeLanguageFromCharset. a=dmeehan DONTBUILD
...
Original Revision: https://phabricator.services.mozilla.com/D251598
Differential Revision: https://phabricator.services.mozilla.com/D264905
2025-09-23 14:51:55 +00:00
Emilio Cobos Álvarez
abfb41e00a
Bug 1967931 - Avoid blocking rendering for devtools pauses. r=smaug,devtools-reviewers,nchevobbe
...
This regresses browser_dbg-scroll-run-to-completion.js, but I think we
should either suppress rendering or not suppress it, not doing some
weird in-between thing. So for now given the discussion on the bug it's
probably acceptable.
Differential Revision: https://phabricator.services.mozilla.com/D250772
2025-05-24 10:14:39 +00:00
Emilio Cobos Álvarez
8ff4a65ffa
Bug 1967507 - Simplify custom content container set-up. r=smaug,devtools-reviewers,nchevobbe
...
I haven't been able to reproduce this locally, but I see what's going
on, and I think we could do better.
This avoids the frame flush from nsCanvasFrame::CreateAnonymousContent,
and in general makes the anonymous content timing a lot more reasonable
(see the FlushPendingNotifications call that's getting removed).
The ServoStyleSet changes are needed now that there are multiple style
roots that can be unstyled like that.
It also simplifies the API as now it's not dependent on having a canvas
frame around (and thus doesn't need to flush layout).
Differential Revision: https://phabricator.services.mozilla.com/D250531
2025-05-22 13:06:12 +00:00
Emilio Cobos Álvarez
5edae9ae71
Bug 1967507 - Remove Document::GetAnonRootIfInAnonymousContentContainer. r=smaug
...
These bits are not needed now that AnonymousContent uses shadow DOM.
Differential Revision: https://phabricator.services.mozilla.com/D250530
2025-05-22 08:25:34 +00:00
Emilio Cobos Álvarez
fbec8c512f
Bug 1966679 - Skip view transition and co in all the code paths on which the root node goes away. r=smaug,view-transitions-reviewers,boris
...
Document::Open() calls DisconnectNodeTree(), which doesn't go through
RemoveChildNode() where we were skipping the transition. We still need
to disconnect the anon content tree there.
Differential Revision: https://phabricator.services.mozilla.com/D250475
2025-05-21 23:59:46 +00:00
Tom Schuster
681edccf21
Bug 1966380 - Remove Document::IsUnstyledDocument. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D249262
2025-05-15 06:51:44 +00:00
serge-sans-paille
bf3516e81e
Bug 1964489 - Avoid duplication in NS_DECLARE_STATIC_IID_ACCESSOR / NS_DEFINE_STATIC_IID_ACCESSOR r=nika,necko-reviewers,media-playback-reviewers,places-reviewers,win-reviewers,dom-storage-reviewers,xpcom-reviewers,gstoll,janv,emilio,padenot,valentin,asuth
...
In modern C++, static constexpr member variables are automatically
inline (aka weak) so the template trick is not needed. This also avoid
duplication and reduces the amount of parsed code. No impact on
generated binary (actually: smaller debuginfo, close to identical
binary).
Differential Revision: https://phabricator.services.mozilla.com/D247825
2025-05-08 08:05:51 +00:00
Tom Schuster
05e533508a
Bug 1959727 - Add the sanitizer option to parseHTMLUnsafe. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D247233
2025-05-08 05:55:37 +00:00
Cristian Tuns
1beaa4e22e
Revert "Bug 1959727 - Add the sanitizer option to setHTMLUnsafe. r=emilio" for causing wpt failures in Document-parseHTMLUnsafe.html
...
This reverts commit 1faeaa00f5 .
Revert "Bug 1959727 - Implement ShadowRoot.setHTML and share more code. r=emilio"
This reverts commit 3a84b03088 .
Revert "Bug 1959727 - Add the sanitizer option to parseHTMLUnsafe. r=emilio" for causing wpt failures in Document-parseHTMLUnsafe.html
This reverts commit 17ced5ec89 .
2025-05-08 01:11:56 +00:00
Tom Schuster
1faeaa00f5
Bug 1959727 - Add the sanitizer option to setHTMLUnsafe. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D247233
2025-05-07 22:16:55 +00:00
Tom Schuster
ffbe21a987
Bug 1955578 - Collect clobbered HTMLDocument properties. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D242534
2025-05-02 08:28:00 +00:00
keithamus
a74f91b8cf
Bug 1936940 - Implement dialog light dismiss r=webidl,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D235504
2025-05-01 19:05:50 +00:00
Sebastian Hengst
ac85dfe9e5
Revert "Bug 1936940 - Implement dialog light dismiss r=webidl,emilio" for failing two html/semantics/interactive-elements/the-dialog-element/ tests
...
This reverts commit 0c65e1c7da .
2025-05-01 13:56:58 +00:00
keithamus
0c65e1c7da
Bug 1936940 - Implement dialog light dismiss r=webidl,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D235504
2025-05-01 03:51:09 +00:00
Tom Schuster
edaa914b45
Bug 1947732 - Provide nsIPrincipal to GetTrustedTypesCompliantString. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D246424
2025-04-30 11:09:07 +00:00
Alexandru Marc
ce0a455f47
Backed out changeset 307ff391dd02 (bug 1936940) for causing wpt failures @ dialog-closedby.html
2025-04-30 13:35:19 +03:00
keithamus
129d6b84a4
Bug 1936940 - Implement dialog light dismiss r=webidl,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D235504
2025-04-30 08:53:12 +00:00
Butkovits Atila
2d4ec66eb0
Backed out 2 changesets (bug 1955578) for causing failures complaining about unknown test url. CLOSED TREE
...
Backed out changeset 4b6f1f98514e (bug 1955578)
Backed out changeset f7087a94bb69 (bug 1955578)
2025-04-29 15:46:31 +03:00
Tom Schuster
7918e3ccd4
Bug 1955578 - Collect clobbered HTMLDocument properties. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D242534
2025-04-29 11:32:36 +00:00
Jan-Niklas Jaeschke
219b770510
Bug 1959959 - Navigation API: Implement navigation.reload(). r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D246587
2025-04-28 16:39:03 +00:00
Emilio Cobos Álvarez
6db610f3ed
Bug 1962381 - Sample SMIL animations along with CSS animations. r=longsonr,smaug
...
In order to do this and keep tests passing, we need to also recurse into
external resource docs during the refresh driver tick.
Otherwise, we fail dom/smil/test/test_smilExtDoc.xhtml. This used to
work because the SMIL controller registered with the refresh driver
directly, and resource docs share the refresh driver with the parent
doc. I think it makes sense to treat them more like subdocuments, and it
also matches svg-as-image better.
This fixes some known SMIL bugs, too, yay.
Differential Revision: https://phabricator.services.mozilla.com/D246588
2025-04-28 15:21:26 +00:00
Goloman Adrian
e16c16647c
Backed out changeset f9641a70d2d6 (bug 1959959) for causing build bustages @nsDocShell.cpp. CLOSED TREE
2025-04-28 17:45:09 +03:00
Jan-Niklas Jaeschke
d2f7141faf
Bug 1959959 - Navigation API: Implement navigation.reload(). r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D246587
2025-04-28 13:58:38 +00:00
Alexandru Marc
05265244cb
Backed out changeset d1343d311328 (bug 1962381) for causing build bustages @ Document.h CLOSED TREE
2025-04-28 15:23:11 +03:00
Emilio Cobos Álvarez
ce44ec7658
Bug 1962381 - Sample SMIL animations along with CSS animations. r=longsonr,smaug
...
In order to do this and keep tests passing, we need to also recurse into
external resource docs during the refresh driver tick.
Otherwise, we fail dom/smil/test/test_smilExtDoc.xhtml. This used to
work because the SMIL controller registered with the refresh driver
directly, and resource docs share the refresh driver with the parent
doc. I think it makes sense to treat them more like subdocuments, and it
also matches svg-as-image better.
This fixes some known SMIL bugs, too, yay.
Differential Revision: https://phabricator.services.mozilla.com/D246588
2025-04-28 10:17:49 +00:00
Emilio Cobos Álvarez
4d8cd3814a
Bug 1960602 - More explicitly block bfcache when a subframe is loading. r=smaug
...
The test now passes with http2/http3 (where it didn't use to because the
frame was not OOP in that case).
Differential Revision: https://phabricator.services.mozilla.com/D245741
2025-04-17 11:37:08 +00:00
Norisz Fay
f74c4d8e9e
Backed out changeset 8305c9bfb249 (bug 1960602) for causing Android mochitest failures on test_blockBFCache.html CLOSED TREE
2025-04-17 04:28:20 +03:00
Emilio Cobos Álvarez
4a9cc7bd93
Bug 1960602 - More explicitly block bfcache when a subframe is loading. r=smaug
...
The test now passes with http2/http3 (where it didn't use to because the
frame was not OOP in that case).
Differential Revision: https://phabricator.services.mozilla.com/D245741
2025-04-16 19:19:17 +00:00
Emilio Cobos Álvarez
b4f7162b1e
Bug 1960923 - Make MathML metric a use counter. r=fredw
...
That gives us consistent numbers to compare against.
Differential Revision: https://phabricator.services.mozilla.com/D245744
2025-04-16 17:25:25 +00:00
Tom Schuster
bdc45a47aa
Bug 1959725 - Implement Document.parseHTML. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D245705
2025-04-16 13:52:29 +00:00
Tom Schuster
020bae66d9
Bug 1960678 - Make DocumentFlavor an enum class. r=emilio,necko-reviewers,sunil
...
Differential Revision: https://phabricator.services.mozilla.com/D245599
2025-04-16 07:42:49 +00:00
Andreas Farre
3c95e7d828
Bug 1948596 - Implement #can-have-its-url-rewritten. r=dom-core,edgar
...
This extracts common code from nsDocShell::AddState.
Differential Revision: https://phabricator.services.mozilla.com/D243069
2025-04-14 14:07:15 +00:00
Cristina Horotan
f37d6e55d5
Backed out changeset 24d97a7de216 (bug 1948596) for causing wpt failures at /the-history-interface/002.html. CLOSED TREE
2025-04-14 13:28:31 +03:00
Andreas Farre
1fb4036d4b
Bug 1948596 - Implement #can-have-its-url-rewritten. r=dom-core,edgar
...
This extracts common code from nsDocShell::AddState.
Differential Revision: https://phabricator.services.mozilla.com/D243069
2025-04-14 09:12:44 +00:00
Cristina Horotan
1459daa033
Backed out changeset f1c03bf6c308 (bug 1948596) for causing wpt failures at the-history-interface/001.html CLOSED TREE
2025-04-11 23:15:55 +03:00
Andreas Farre
18f354fae7
Bug 1948596 - Implement #can-have-its-url-rewritten. r=dom-core,edgar
...
This extracts common code from nsDocShell::AddState.
Differential Revision: https://phabricator.services.mozilla.com/D243069
2025-04-11 15:59:27 +00:00
Thomas Wisniewski
e723146d01
Bug 1956165 - Add a Fenix-only JS webcompat intervention for m.youtube.com to fix picture-in-picture; r=padenot,denschub,webcompat-reviewers,webidl,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D245108
2025-04-11 07:48:11 +00:00
Stanca Serban
1e6954ca78
Backed out changeset 7f838c1e8e78 (bug 1948596) for causing multiple mochitests failures. CLOSED TREE
2025-04-11 10:24:03 +03:00
Andreas Farre
1de8bc2025
Bug 1948596 - Implement #can-have-its-url-rewritten. r=dom-core,edgar
...
This extracts common code from nsDocShell::AddState.
Differential Revision: https://phabricator.services.mozilla.com/D243069
2025-04-11 06:26:26 +00:00
Andreas Farre
3ad1ffcc23
Bug 1948249 - Implement NavigateEvent.scroll. r=dom-core,jjaschke
...
Differential Revision: https://phabricator.services.mozilla.com/D242702
2025-04-10 17:01:19 +00:00
Emilio Cobos Álvarez
f818b1ebe2
Bug 1958979 - Align fullscreen steps with the spec better. r=smaug
...
Make the events per-doc, as per spec. This unifies how we handle
rendering suppression and such as well.
Differential Revision: https://phabricator.services.mozilla.com/D244673
2025-04-10 01:19:45 +00:00
Emilio Cobos Álvarez
4c0adc7d53
Bug 1958965 - Change scroll event setup to match the spec better. r=smaug
...
This matches the spec (plus resolution at
https://github.com/w3c/csswg-drafts/issues/11164 ) better, by running the
events per document.
Same comments as D244655 regarding the delayed event stuff that's going
away.
Differential Revision: https://phabricator.services.mozilla.com/D244666
2025-04-10 01:07:15 +00:00
Emilio Cobos Álvarez
cc89fb812f
Bug 1958942 - Refactor how we schedule and suppress rendering phases. r=smaug
...
This starts some of the needed refactoring towards having proper
rendering suppression, and in general aligning better with the HTML
spec's "update the rendering" section.
Behavior changes should be minimal:
* We suppress rendering until the pres shell is initialized rather than
just created. This matches how autofocus already works and in general
we don't want to forcibly flush an uninitialized presshell.
* We handle view transition suppression more correctly in some (but not
all) phases.
* Some of the steps do no longer recurse manually nor check the view
transitions suppression, as that's done centrally.
* mAutoFocusFlushDocuments isn't tracked separately.
Follow-up work will involve changing most of the "pending resize/scroll/etc"
events to be per-document as per spec, and also implement suppression for
painting.
Differential Revision: https://phabricator.services.mozilla.com/D244372
2025-04-09 23:51:01 +00:00
Emilio Cobos Álvarez
79aa0d7606
Bug 1958322 - Plumb pip mode to Gecko. r=padenot,hiro,geckoview-reviewers,webidl,saschanaz,smaug,calu
...
Differential Revision: https://phabricator.services.mozilla.com/D244794
2025-04-09 18:04:42 +00:00
Cristina Horotan
88909b7d2a
Backed out 4 changesets (bug 1948249, bug 1949204, bug 1897439, bug 1949499) for causign build bustage at NavigateEvent.h.
...
Backed out changeset 3d6f77552af3 (bug 1897439)
Backed out changeset a9843b92d309 (bug 1948249)
Backed out changeset cf1e6a0c7365 (bug 1949499 )
Backed out changeset bd1a59a1dd98 (bug 1949204)
2025-04-09 18:22:09 +03:00
Andreas Farre
b407a6139e
Bug 1948249 - Implement NavigateEvent.scroll. r=dom-core,jjaschke
...
Differential Revision: https://phabricator.services.mozilla.com/D242702
2025-04-09 14:19:38 +00:00
Fatih Kilic
60a57c0757
Bug 1954188: bFPP Part 7 - Force refresh RTPCallerType on pref change. r=tjr
...
Now that we have some sort of fingerprinting protection enabled all the time, [`changed`](https://searchfox.org/mozilla-central/rev/3a0ca3dffd7ccf74a53066a097739f24dd8b6b10/dom/base/Document.cpp#17010-17015 ) isn't true when you enable/disable FPP or RFP. The way to trigger it would be also enabling/disabling bFPP with FPP or RFP in the tests, but instead forcing a RFP caller type refresh makes more sense, and is less hacky (but if anyone disagrees, we can also do the disabling/enabling bFPP with the tests)
Differential Revision: https://phabricator.services.mozilla.com/D242787
2025-04-03 17:30:19 +00:00
Cristina Horotan
b163893208
Backed out 7 changesets (bug 1954188) for causing bc failures at browser_preferences_usage.js
...
Backed out changeset dae6e2ec0b2d (bug 1954188)
Backed out changeset 47f683e9f0d6 (bug 1954188)
Backed out changeset 14ed1c70e1ec (bug 1954188)
Backed out changeset 291590143ed9 (bug 1954188)
Backed out changeset fbb4e968f0f1 (bug 1954188)
Backed out changeset 4c21e081561e (bug 1954188)
Backed out changeset 33e6088d8317 (bug 1954188)
2025-04-03 03:21:46 +03:00
Fatih Kilic
9302a00ffe
Bug 1954188: bFPP Part 7 - Force refresh RTPCallerType on pref change. r=tjr
...
Now that we have some sort of fingerprinting protection enabled all the time, [`changed`](https://searchfox.org/mozilla-central/rev/3a0ca3dffd7ccf74a53066a097739f24dd8b6b10/dom/base/Document.cpp#17010-17015 ) isn't true when you enable/disable FPP or RFP. The way to trigger it would be also enabling/disabling bFPP with FPP or RFP in the tests, but instead forcing a RFP caller type refresh makes more sense, and is less hacky (but if anyone disagrees, we can also do the disabling/enabling bFPP with the tests)
Differential Revision: https://phabricator.services.mozilla.com/D242787
2025-04-02 17:26:36 +00:00
Tim Huang
bbc958220b
Bug 1939516 - Ensure the cookieJarSetting is populated for XSLT documents. r=anti-tracking-reviewers,emz,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D234532
2025-03-20 21:26:11 +00:00