Commit Graph

845 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
f0909e022f Bug 1897827 - Remove FrameChildListID::Popup. r=dholbert
It's no longer used. I made popups regular absolutely-positioned frames
a long time ago.

Differential Revision: https://phabricator.services.mozilla.com/D210949
2024-05-20 22:00:08 +00:00
Ting-Yu Lin
b4a0842882 Bug 1824877 Part 3 - Change ScrollContainerFrame's type from Scroll to ScrollContainer. r=dholbert
This effectively changes the `IsScrollFrame()` helper to
`IsScrollContainerFrame()`.

Differential Revision: https://phabricator.services.mozilla.com/D210357
2024-05-15 17:50:49 +00:00
Ting-Yu Lin
27bb908f13 Bug 1824877 Part 2 - Rename nsHTMLScrollFrame to mozilla::ScrollContainerFrame. r=dholbert
Also, change the ScrollContainerFrame::GetFrameName() to return
"ScrollContainer" instead of "HTMLScroll".

Differential Revision: https://phabricator.services.mozilla.com/D210233
2024-05-15 17:50:48 +00:00
Emilio Cobos Álvarez
d5870a6a17 Bug 1893731 - Allow posting restyles from DidSetComputedStyle / the post-traversal. r=longsonr
This doesn't change behavior as is but prevents an assertion with the
other proposed patch.

Differential Revision: https://phabricator.services.mozilla.com/D208913
2024-04-29 20:50:42 +00:00
keithamus
9d776293f2 Bug 1888098 - optimize nth-of dependency tracking for custom state r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D205804
2024-03-27 21:43:01 +00:00
Emilio Cobos Álvarez
191c066aca Bug 1870380 - Don't use handled hints for table captions. r=tnikkel,layout-reviewers
Table captions have a similar issue as column spanners, where their
parent might not be the in the subtree of the style frame of its
ancestors. In particular, a repaint posted to a table that
doesn't cause a repaint in the table wrapper might not cause a repaint
of its captions.

Handle table captions like we treat out of flows and spanners, and add
more comments around this set-up.

Differential Revision: https://phabricator.services.mozilla.com/D205504
2024-03-26 09:17:06 +00:00
keithamus
390ef8eb0d Bug 1865589 - Notify PresShell of CustomState changes, so Restyle can invalidate. r=emilio,dshin
Differential Revision: https://phabricator.services.mozilla.com/D202460
2024-03-22 22:18:05 +00:00
Artur Iunusov
69470f6b4e Bug 1770944 - Remove nsGkAtoms::mozbrowser. r=smaug
Depends on D175898

Differential Revision: https://phabricator.services.mozilla.com/D183229
2024-03-07 13:04:22 +00:00
Ryan VanderMeulen
0c5b3042d3 Bug 1883927 - Add ifdefs around functions only used when accessibility is enabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D203792
2024-03-06 17:55:33 +00:00
Narcis Beleuzu
197b39f007 Backed out 16 changesets (bug 1770944) as req by asuth.
Backed out changeset 61af32f40777 (bug 1770944)
Backed out changeset 4ff0c45db93b (bug 1770944)
Backed out changeset 8a217eff7bcd (bug 1770944)
Backed out changeset 6435f48c96bf (bug 1770944)
Backed out changeset 0d2432765ca0 (bug 1770944)
Backed out changeset 58e02566db85 (bug 1770944)
Backed out changeset 0a8c4c2460ee (bug 1770944)
Backed out changeset 9416bafd9982 (bug 1770944)
Backed out changeset 79de4f83fe2e (bug 1770944)
Backed out changeset 63ac518aceb0 (bug 1770944)
Backed out changeset 14952f872b77 (bug 1770944)
Backed out changeset f65e0967ad75 (bug 1770944)
Backed out changeset bd53c42038f7 (bug 1770944)
Backed out changeset 36c378ba8212 (bug 1770944)
Backed out changeset 9ba54ab06348 (bug 1770944)
Backed out changeset fb5a54b3cbe9 (bug 1770944)
2024-02-23 21:11:08 +02:00
Artur Iunusov
c37653d8b7 Bug 1770944 - Remove nsGkAtoms::mozbrowser. r=smaug
Depends on D175898

Differential Revision: https://phabricator.services.mozilla.com/D183229
2024-02-22 10:13:14 +00:00
Sandor Molnar
6699491437 Backed out 16 changesets (bug 1770944) for causing asan failures @ dom/base/InProcessBrowserChildMessageManager.cpp
Backed out changeset b73885731e73 (bug 1770944)
Backed out changeset 23d0dc98eb51 (bug 1770944)
Backed out changeset 15661e24d8e1 (bug 1770944)
Backed out changeset 97aa839dc200 (bug 1770944)
Backed out changeset 0d4318bf3239 (bug 1770944)
Backed out changeset be28bb62e9f3 (bug 1770944)
Backed out changeset 708b2671410e (bug 1770944)
Backed out changeset 0a138f3b56b9 (bug 1770944)
Backed out changeset 3a149ef794c2 (bug 1770944)
Backed out changeset 4b6ae7dd0e69 (bug 1770944)
Backed out changeset e3960ad85182 (bug 1770944)
Backed out changeset 9ea253525227 (bug 1770944)
Backed out changeset 1828b66c2f7c (bug 1770944)
Backed out changeset 55b0886f9025 (bug 1770944)
Backed out changeset a4197071d10a (bug 1770944)
Backed out changeset 9b18524f541e (bug 1770944)
2024-02-20 20:34:55 +02:00
Artur Iunusov
a79d7549bc Bug 1770944 - Remove nsGkAtoms::mozbrowser. r=smaug
Depends on D175898

Differential Revision: https://phabricator.services.mozilla.com/D183229
2024-02-20 16:53:23 +00:00
Frédéric Wang
5029677c27 Bug 1874826 - Avoid reconstruction due to change to block formatting context. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D198931
2024-01-23 10:09:57 +00:00
Emilio Cobos Álvarez
ad6545edc0 Bug 1875137 - Don't ignore state changes in display: none subtrees if needed for :has(). r=dshin
Just like we do for attribute invalidation.

Differential Revision: https://phabricator.services.mozilla.com/D198929
2024-01-18 13:18:51 +00:00
Frédéric Wang
b5056e1feb Bug 1765615 - Handle most changes to CSS contain and content-visibility without needing to reconstruct frames. r=layout-reviewers,emilio
Right now, we reconstruct frames in response to a change in the CSS
`contain` property or `content-visibility`. This patch tries to optimize
this a bit:

1. Updates involving style containment change continue to force a
  reconstruction, due to the need to handle counters/quotes.

2. Updates involving paint/layout containment change only force a
   reconstruction if it's needed to handle absolutely/fixed
   positioned descendants or floats (for this one, see also bug 1874826).

3. Other containment changes will only force a reflow and repaint.

Per the CSS contain spec, layout, style and paint containments are
enabled for `content-visibility: hidden` and `content-visibility: auto`.
As a consequence, changing `content-visibility` between `hidden` and
`auto` values no longer requires reconstruction. Changing between these
values and `visible` may need a reconstruction although authors may
generally avoid that in practice by forcing `style` containment.

Differential Revision: https://phabricator.services.mozilla.com/D197043
2024-01-17 08:22:48 +00:00
David Shin
a06ce3f70f Bug 1874705: Run invalidation on appended elements even if the first node is not an element. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D198604
2024-01-16 18:08:55 +00:00
David Shin
abfe574d9b Bug 1873649: Do not eagerly seek prev and next siblings DOM mutation invalidation. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D198052
2024-01-11 18:21:46 +00:00
Dão Gottwald
0a160dda1b Bug 1868931 - Repaint XUL checkbox and radio for active state too. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D195851
2023-12-08 09:49:12 +00:00
Emilio Cobos Álvarez
a6b1508f8a Bug 1867769 - Remove custom checkbox and radio styling. r=dao,desktop-theme-reviewers
Use the non-native styles instead. I needed a hack in RestyleManager to
deal with paint invalidation properly. It's a pre-existing issue for
native checkboxes / radio.

Differential Revision: https://phabricator.services.mozilla.com/D195229
2023-12-02 18:52:47 +00:00
Emilio Cobos Álvarez
c27730d3df Bug 1364813 - Remove IsFrameOfType, use non-virtual checks. r=jwatt
Extend the per-frame-class bit we have to devirtualize IsLeaf to also
devirtualize IsFrameOfType. That is, move this data to FrameClasses.py.

This was done by going through all the frame classes, trying to preserve
behavior.

The only quirky thing is that I had to add two more trivial frame
classes, `nsAudioFrame` for audio elements, and
`nsFloatingFirstLetterFrame`. That's because these frame classes were
returning different answers at runtime, but they do this only on
conditions that trigger frame reconstruction (floating, and being an
audio element, respectively).

Differential Revision: https://phabricator.services.mozilla.com/D194703
2023-11-26 22:17:28 +00:00
Adam Brouwers-Harries
4a2ba69cbc Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-24 15:18:12 +00:00
Narcis Beleuzu
67b61b8b2c Backed out changeset 714aaf6484fb (bug 1421651) for causing Bug 1860719. CLOSED TREE 2023-10-24 17:31:02 +03:00
Adam Brouwers-Harries
720e582a3a Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-23 13:55:50 +00:00
David Shin
f5bdf14ba3 Bug 1858720: Prevent :has over-invalidation with sibling DOM mutations. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190817
2023-10-17 13:17:31 +00:00
Robert Longson
a0d1ae6070 Bug 1402013 - stop calculating position for SVG elements that aren't governed by the CSS box model r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190222
2023-10-06 12:04:14 +00:00
David Shin
e431c263e5 Bug 1852965: :has invalidation for inner selectors. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D188339
2023-09-28 19:48:19 +00:00
David Shin
9f6bffd7f3 Bug 1792501: Part 7 - :has invalidation inside :nth-child(of). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185680
2023-09-14 22:21:26 +00:00
David Shin
96602a739a Bug 1792501: Part 6 - :has invalidation for :empty and :nth (Without of). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185679
2023-09-14 22:21:26 +00:00
David Shin
9f1cc6d0c9 Bug 1792501: Part 5 - :has DOM mutation invalidation. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185678
2023-09-14 22:21:25 +00:00
David Shin
14291fa2ca Bug 1792501: Part 4 - Basic :has invalidation. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185677
2023-09-14 22:21:25 +00:00
David Shin
00fb12e4bb Bug 1792501: Part 1.5 - Take snapshots for unstyled elements if they're in relative selector search path. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185833
2023-09-14 22:21:24 +00:00
Sandor Molnar
f1783ba5d9 Backed out 8 changesets (bug 1792501) for causing wpt failures on /css/selectors/...
Backed out changeset 993b0e6567e6 (bug 1792501)
Backed out changeset 7686c9df9ad4 (bug 1792501)
Backed out changeset cf9f855ad80c (bug 1792501)
Backed out changeset 27abe13a5a48 (bug 1792501)
Backed out changeset f708f940e907 (bug 1792501)
Backed out changeset 2a7c57a69803 (bug 1792501)
Backed out changeset 69f1155100f5 (bug 1792501)
Backed out changeset 3f5f59b76a56 (bug 1792501)
2023-09-14 20:08:41 +03:00
David Shin
e5e447d0f0 Bug 1792501: Part 7 - :has invalidation inside :nth-child(of). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185680
2023-09-14 12:30:57 +00:00
David Shin
5b6faed1ca Bug 1792501: Part 6 - :has invalidation for :empty and :nth (Without of). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185679
2023-09-14 12:30:56 +00:00
David Shin
8dab1a142d Bug 1792501: Part 5 - :has DOM mutation invalidation. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185678
2023-09-14 12:30:56 +00:00
David Shin
89940257af Bug 1792501: Part 4 - Basic :has invalidation. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185677
2023-09-14 12:30:56 +00:00
David Shin
4fdb4a8095 Bug 1792501: Part 1.5 - Take snapshots for unstyled elements if they're in relative selector search path. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185833
2023-09-14 12:30:55 +00:00
Emilio Cobos Álvarez
6fd5ddc656 Bug 1850238 - Make BROKEN state non-intrinsic. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D187108
2023-08-31 09:20:40 +00:00
Cristina Horotan
c37791a4a6 Backed out 3 changesets (bug 1850238, bug 1850161) for causing multiple failures at Element.cpp CLOSED TREE
Backed out changeset 30526c800ca7 (bug 1850161)
Backed out changeset ebc81e5e7750 (bug 1850161)
Backed out changeset e66a62c2f8c5 (bug 1850238)
2023-08-31 12:12:05 +03:00
Emilio Cobos Álvarez
01b6773528 Bug 1850238 - Make BROKEN state non-intrinsic. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D187108
2023-08-31 07:46:24 +00:00
Emilio Cobos Álvarez
f371c27869 Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-30 10:38:52 +00:00
Iulian Moraru
e69688272b Backed out changeset f0edb489e577 (bug 1850342) for causing dt failures on browser_rules_inactive_css_visited.js. CLOSED TREE 2023-08-30 01:24:44 +03:00
Emilio Cobos Álvarez
25c7386b92 Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-29 20:57:30 +00:00
Cosmin Sabou
65890501c0 Backed out changeset f14569b8319b (bug 1850342) for causing dt failures on browser_rules_inactive_css_visited.js. CLOSED TREE 2023-08-29 21:14:42 +03:00
Emilio Cobos Álvarez
1442270771 Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-29 16:56:37 +00:00
Adam Brouwers-Harries
76c1ecd87b Bug 1421651 - Add counter API for animation triggered restyles r=emilio
This patch adds an API to count the number of restyles triggered by animations. This API will replace the existing timeline marker based testing of the animation/restyle system.

Differential Revision: https://phabricator.services.mozilla.com/D186714
2023-08-25 13:19:28 +00:00
David Shin
4fe5a9c651 Bug 1845744: Move selector-specific node flags to a separate field. r=emilio
Upcoming :has invalidation (Bug 1792501) requires 4 more flags, and we're out of space.
This change consumes the remaining 32-bit hole in `nsINode` to migrate selector-specific
node flags.
This has implications on 32-bit platforms, specifically on text nodes.

Differential Revision: https://phabricator.services.mozilla.com/D184718
2023-08-01 00:29:56 +00:00
Jan-Niklas Jaeschke
4134763b27 Bug 1838262, part 2: Implemented getComputedStyle() for custom highlight api. r=emilio
This patch introduces functional pseudo parameters, i.e. `::highlight(foo)`,
for `getComputedStyle()`. This required adapting the parse algorithm (`nsCSSPseudoElements::ParsePseudoElement()`) and forwarding the functional pseudo parameter into the style engine.

Differential Revision: https://phabricator.services.mozilla.com/D183773
2023-07-31 13:47:54 +00:00
Hiroyuki Ikezoe
84cefa1790 Bug 1845631 - Integrate two separete if (hint & nsChangeHint_AddOrRemoveTransform) blocks in RestyleManager::ProcessRestyledFrames. r=emilio
Depends on D184535

Differential Revision: https://phabricator.services.mozilla.com/D184650
2023-07-27 02:36:57 +00:00