Commit graph

642 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
5730ee0ca5 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
Boris Chiou
d19e95ee2e Bug 1841330 - Use CustomIdent for GridLine. r=emilio
So we can avoid calling clone() in to_css().

Differential Revision: https://phabricator.services.mozilla.com/D193838
2023-11-16 23:01:37 +00:00
Boris Chiou
9cd466df70 Bug 1583429 - Keep repeat() information for specified/computed value for subgrid. r=layout-reviewers,firefox-style-system-reviewers,emilio
We introduce a different rust type for `<line-name-list>` for subgrid,
which keeps `repeat()` information at computed time. At this moment,
we don't expand `repeat()`.

Also, we precompute the possible expanded list length, so we can expand
`repeat(auto-fill)` in a single iteration in nsGridContainerFrame. If we
don't have this precompution, we have to go through `<line-name-list>`
first to know how many items we have after expanding `repeat(Integer)`.

Differential Revision: https://phabricator.services.mozilla.com/D192876
2023-11-08 21:44:36 +00:00
Gregory Pappas
9bb4fdbbd5 Bug 1851094 - Remove layout.css.grid-item-baxis-measurement.enabled pref r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D187250
2023-09-19 22:06:03 +00:00
Ting-Yu Lin
2b2646bd48 Bug 1853090 - Add ContentISize() and ContentBSize() convenience methods to nsIFrame. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D188157
2023-09-14 18:13:17 +00:00
Emilio Cobos Álvarez
aefd1ddb30 Bug 1851787 - Plumb a DestroyContext through all functions that can destroy frames. r=dholbert
This prevents anonymous content getting destroyed at weird times
during frame destruction.

Differential Revision: https://phabricator.services.mozilla.com/D187693
2023-09-08 15:11:17 +00:00
Narcis Beleuzu
1b73f006e1 Backed out changeset 69bb261fbdce (bug 1851094) for bustages on nsGridContainerFrame.cpp . CLOSED TREE 2023-09-02 05:57:52 +03:00
Gregory Pappas
664645011b Bug 1851094 - Remove layout.css.grid-item-baxis-measurement.enabled pref r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D187250
2023-09-02 02:19:04 +00:00
David Shin
267a479339 Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-17 12:56:54 +00:00
Sandor Molnar
71c2b3db49 Backed out 3 changesets (bug 1809568) for causing build bustages in layout/generic/nsLineLayout.cpp CLOSED TREE
Backed out changeset 6c5bbcbafce9 (bug 1809568)
Backed out changeset b518133a5c34 (bug 1809568)
Backed out changeset 2407088e9b49 (bug 1809568)
2023-05-17 01:34:42 +03:00
David Shin
1eefa9a516 Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-16 20:48:18 +00:00
Sandor Molnar
a50a2052fe Backed out 3 changesets (bug 1809568) for causing node devtools failures in devtools/client/debugger/src/components/test/QuickOpenModal.spec.js CLOSED TREE
Backed out changeset 56ce741da8f5 (bug 1809568)
Backed out changeset 5a91ce4870e4 (bug 1809568)
Backed out changeset cc00422f050a (bug 1809568)
2023-05-16 22:22:31 +03:00
David Shin
30a10fdbc6 Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-16 19:02:11 +00:00
Cristian Tuns
4d57ea669d Backed out 3 changesets (bug 1809568) for causing build bustages on nsLineLayout.cpp CLOSED TREE
Backed out changeset e862b1560caa (bug 1809568)
Backed out changeset 0a20b91de67b (bug 1809568)
Backed out changeset 6060fc7d49d4 (bug 1809568)
2023-05-15 13:03:03 -04:00
David Shin
c4f2c2237b Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-15 14:34:26 +00:00
Cosmin Sabou
543905e105 Backed out 3 changesets (bug 1809568) for causing build bustages on nsBlockFrame.cpp. CLOSED TREE
Backed out changeset eaa7fe280317 (bug 1809568)
Backed out changeset ab0f2bcb2d9b (bug 1809568)
Backed out changeset a481bf06452b (bug 1809568)
2023-05-01 21:42:14 +03:00
David Shin
d2ebe93a83 Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-01 17:04:27 +00:00
Iulian Moraru
c9ffb3ffa8 Backed out 3 changesets (bug 1809568) for causing build bustages on nsLineLayout.cpp. CLOSED TREE
Backed out changeset 573dc0bd9554 (bug 1809568)
Backed out changeset b8401947aea0 (bug 1809568)
Backed out changeset 7ecabe895121 (bug 1809568)
2023-05-01 17:59:21 +03:00
David Shin
8ff73f5fcc Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-01 13:44:43 +00:00
Andi-Bogdan Postelnicu
bf2bb59367 Bug 1277372 - Move away from "mozilla/TypeTraits.h". r=geckoview-reviewers,sergesanspaille,m_kato
std::is_pod has been deprecated in C++20, see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0767r1.html.
This is equivalent with std::is_trivial_v && std::is_standard_layout.

Differential Revision: https://phabricator.services.mozilla.com/D174128
2023-04-17 13:50:11 +00:00
Emilio Cobos Álvarez
2d0e69f4a1 Bug 1824957 - Remove a bunch of now completely dead XUL layout code. r=layout-reviewers,desktop-theme-reviewers,devtools-reviewers,dao,TYLin
And some related tests.

A bunch of -moz-box* properties are web exposed, so I'll file a
follow-up for hiding them.

Differential Revision: https://phabricator.services.mozilla.com/D173819
2023-03-29 21:23:55 +00:00
Emilio Cobos Álvarez
89006f7997 Bug 1600542 - Remove no longer used nsGridContainerFrame special-case. r=layout-reviewers,tlouw
We have no more grid items being XUL boxes.

Differential Revision: https://phabricator.services.mozilla.com/D172873
2023-03-20 16:42:52 +00:00
Ting-Yu Lin
19a0c5fb59 Bug 1819211 - Export Baseline.h under mozilla. r=emilio
It is because `Baseline` is a utility class under `namespace mozilla`.

Also change the include guard to match the coding style.
https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html#header-files

Differential Revision: https://phabricator.services.mozilla.com/D171162
2023-03-01 03:50:03 +00:00
David Shin
f5a42005e2 Bug 1811311 - Part 3: Refactor GetNaturalBaselineBOffset to return Maybe<nscoord>. r=layout-reviewers,emilio
Changed from returning `bool` & taking an out parameter.

Differential Revision: https://phabricator.services.mozilla.com/D168998
2023-02-23 14:53:27 +00:00
David Shin
e02d078c12 Bug 1811311 - Part 2: Extract SynthesizeBaselineBOffsetFrom* out of nsIFrame. r=emilio
These functions work fine as static functions, and `nsIFrame` is pretty overloaded.

Differential Revision: https://phabricator.services.mozilla.com/D167991
2023-02-23 14:53:27 +00:00
David Shin
5c7c22165f Bug 1811311 - Part 1: Unite baseline-related functions in nsIFrame into one. r=emilio
Before, there existed 3 virtual functions that calculated baselines:

- `GetLogicalBaseline`
- `GetVerticalAlignBaseline`
- `GetNaturalBaselineBOffset`

Each of them had slightly different behaviours:

- `GetLogicalBaseline` would synthesize a baseline if there is no baseline.
  Others would simply return `false`.
- `GetNaturalBaselineBOffset` requires the caller to pick which of first/last
  baseline to calculate. Others pick on on their own.
- `GetNaturalBaselineBOffset`'s result can be either offset from border box
   start/end edge, depending on the caller-supplied baseline. Others always
   return offset from border box start edge.

Now:

- `GetNaturalBaselineBOffset` is the sole virtual function.
- `GetLogicalBaseline` exists to support its use, with 2 virtual helper functions:
  - `SynthesizeFallbackBaseline` to generate a baseline for elements that
    doesn't have one.
  - `GetBaselineSharingGroup` to preserve the default baseline picking behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D167990
2023-02-23 14:53:26 +00:00
Brad Werth
4a8b9977c8 Bug 1815140 Part 1: Make Grid dom object an idempotent property of its frame. r=emilio
This ensures that repeated calls to Element::GetGridFragments will return
an array of idempotent Grid objects for each fragment. This is
accomplished by making the Grid object hold a WeakFrame back to its
originating frame, and updating a property on construction and
destruction.

Differential Revision: https://phabricator.services.mozilla.com/D169724
2023-02-23 01:07:34 +00:00
Cosmin Sabou
720942a247 Backed out 3 changesets (bug 1815140) for causing wrapper related dt failures. CLOSED TREE
Backed out changeset 0380de95a301 (bug 1815140)
Backed out changeset dd7288d15da0 (bug 1815140)
Backed out changeset 7f50487ea10c (bug 1815140)
2023-02-21 07:15:20 +02:00
Brad Werth
79ab63aee9 Bug 1815140 Part 1: Make Grid dom object an idempotent property of its frame. r=emilio
This ensures that repeated calls to Element::GetGridFragments will return
an array of idempotent Grid objects for each fragment. This is
accomplished by making the Grid object hold a WeakFrame back to its
originating frame, and updating a property on construction and
destruction.

Differential Revision: https://phabricator.services.mozilla.com/D169724
2023-02-21 04:06:37 +00:00
Ting-Yu Lin
a550ab4c13 Bug 1637091 - Always reflow a flex item in a fragmented context. r=dholbert
nsColumnSetFrame can reflow its last column in an unconstrained available
block-size to measure the total block-size of the content [1]. This patch adds a
helper method in ReflowInput for that.

For flex items in a fragmented context, we *cannot* skip its final reflow
because fragmentation might grow its block-size if there's any force break in
it (bug 1663079), or if it has repeated table header/footer (bug 1744363).

This patch doesn't change observable behavior for now. Before this patch, we may
skip an item's final reflow if it is in a flex container's continuation that is
in the last column with an unconstrained available block-size. As of this patch,
the item will be reflowed. This is a partial step towards fixing the above bugs
where the item's block-size may grow.

[1] https://searchfox.org/mozilla-central/rev/daf613efc5c358f3a94961d73b90472c00703838/layout/generic/nsColumnSetFrame.cpp#614-621

Differential Revision: https://phabricator.services.mozilla.com/D167207
2023-02-06 22:04:21 +00:00
Ben Freist
8b3a740547 Bug 1805097 - [refactor] Migrate NS_STYLE_MASONRY_* defines r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D164422
2023-01-03 12:14:56 +00:00
Martin Robinson
abb5044ca7 Bug 1803377 - Rename the values of the IntrinsicDirty enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163607
2022-12-02 12:27:31 +00:00
Tiaan Louw
650c19c965 Bug 1799111 - Don't apply auto min sizing when spanning flexible tracks. r=emilio
This is the first part of the bug.  A clarification in the spec states
that a grid item spanning multiple tracks, which include a flexible
track, should not participate in auto min sizing calculation and should
have a width of 0.

https://w3c.github.io/csswg-drafts/css-grid-1/#min-size-auto

For the reftest, the previous overrides are removed as the correct
behaviour is now implemented.

Differential Revision: https://phabricator.services.mozilla.com/D160900
2022-11-21 07:21:17 +00:00
Tiaan Louw
38a8b8dc54 Bug 1799707 - Cleanup ResolveIntrinsicSize function with better naming r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161763
2022-11-19 10:35:48 +00:00
Ting-Yu Lin
514d412f9b Bug 1799732 Part 3 - Convert FrameChildListID to enum class. r=emilio
This patch is first generated by the following script under gecko root folder.

```
#!/bin/bash

function rename() {
    echo "Renaming $1 to $2"
    rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}

rename "kPrincipalList" "FrameChildListID::Principal"
rename "kPopupList" "FrameChildListID::Popup"
rename "kCaptionList" "FrameChildListID::Caption"
rename "kColGroupList" "FrameChildListID::ColGroup"
rename "kAbsoluteList" "FrameChildListID::Absolute"
rename "kFixedList" "FrameChildListID::Fixed"
rename "kOverflowList" "FrameChildListID::Overflow"
rename "kOverflowContainersList" "FrameChildListID::OverflowContainers"
rename "kExcessOverflowContainersList" "FrameChildListID::ExcessOverflowContainers"
rename "kOverflowOutOfFlowList" "FrameChildListID::OverflowOutOfFlow"
rename "kFloatList" "FrameChildListID::Float"
rename "kBulletList" "FrameChildListID::Bullet"
rename "kPushedFloatsList" "FrameChildListID::PushedFloats"
rename "kBackdropList" "FrameChildListID::Backdrop"
rename "kNoReflowPrincipalList" "FrameChildListID::NoReflowPrincipal"
```

And then:
1. Manually fix `FrameChildListID` definition in nsFrameList.h.
2. Apply clang-format.

Differential Revision: https://phabricator.services.mozilla.com/D161864
2022-11-12 04:38:53 +00:00
Noemi Erli
7c40c0e983 Backed out 3 changesets (bug 1799732) for causing build bustages in nsIFrame.cpp CLOSED TREE
Backed out changeset e559f9dbc76f (bug 1799732)
Backed out changeset c40fda7a8b0b (bug 1799732)
Backed out changeset 1f84bfb41ab8 (bug 1799732)
2022-11-12 02:16:45 +02:00
Ting-Yu Lin
192956df1b Bug 1799732 Part 3 - Convert FrameChildListID to enum class. r=emilio
This patch is first generated by the following script under gecko root folder.

```
#!/bin/bash

function rename() {
    echo "Renaming $1 to $2"
    rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}

rename "kPrincipalList" "FrameChildListID::Principal"
rename "kPopupList" "FrameChildListID::Popup"
rename "kCaptionList" "FrameChildListID::Caption"
rename "kColGroupList" "FrameChildListID::ColGroup"
rename "kAbsoluteList" "FrameChildListID::Absolute"
rename "kFixedList" "FrameChildListID::Fixed"
rename "kOverflowList" "FrameChildListID::Overflow"
rename "kOverflowContainersList" "FrameChildListID::OverflowContainers"
rename "kExcessOverflowContainersList" "FrameChildListID::ExcessOverflowContainers"
rename "kOverflowOutOfFlowList" "FrameChildListID::OverflowOutOfFlow"
rename "kFloatList" "FrameChildListID::Float"
rename "kBulletList" "FrameChildListID::Bullet"
rename "kPushedFloatsList" "FrameChildListID::PushedFloats"
rename "kBackdropList" "FrameChildListID::Backdrop"
rename "kNoReflowPrincipalList" "FrameChildListID::NoReflowPrincipal"
```

And then:
1. Manually fix `FrameChildListID` definition in nsFrameList.h.
2. Apply clang-format.

Differential Revision: https://phabricator.services.mozilla.com/D161864
2022-11-11 23:44:17 +00:00
Cristian Tuns
47d4ab36e9 Backed out changeset b2e56f907f70 (bug 1799111) reftest failures on grid-track-fit-content-sizing-001.html CLOSED TREE 2022-11-04 11:38:46 -04:00
Tiaan Louw
8c0f480a7d Bug 1799111 - Don't apply auto min sizing when spanning flexible tracks. r=emilio
This is the first part of the bug.  A clarification in the spec states
that a grid item spanning multiple tracks, which include a flexible
track, should not participate in auto min sizing calculation and should
have a width of 0.

https://w3c.github.io/csswg-drafts/css-grid-1/#min-size-auto

Differential Revision: https://phabricator.services.mozilla.com/D160900
2022-11-04 14:05:48 +00:00
Emilio Cobos Álvarez
078a10f45f Bug 1798830 - Clean up DisplayFlagForFlexOrGridItem. r=dholbert
No need to be an out of band member function given the only callers are
in flex / grid code.

I was looking at this in the context of bug 1798396. This probably
doesn't matter for PGO, but it being a static method helps reason about
the flags being the same for all items.

Differential Revision: https://phabricator.services.mozilla.com/D161102
2022-11-03 02:32:47 +00:00
Ting-Yu Lin
040feb02dd Bug 1798373 Part 7 - Change nsContainerFrame::InsertFrames() to take rvalue reference of nsFrameList. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160843
2022-11-01 21:15:55 +00:00
Ting-Yu Lin
c99b45fa14 Bug 1798373 Part 6 - Change nsContainerFrame::AppendFrames() to take rvalue reference of nsFrameList. r=emilio
Change nsBlockFrame::AppendFrames() helper, too.

Differential Revision: https://phabricator.services.mozilla.com/D160842
2022-11-01 21:15:54 +00:00
Ting-Yu Lin
4787078c5c Bug 1798373 Part 5 - Change nsContainerFrame::SetInitialChildList() to take rvalue reference of nsFrameList. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160841
2022-11-01 21:15:54 +00:00
Ting-Yu Lin
13d40cfd97 Bug 1797011 Part 1 - Delete nsFrameList's copy constructor. r=layout-reviewers,emilio
This patch doesn't change behavior, and eliminates copy construction of
nsFrameList via utilizing const-references to store the return value of
`GetChildList()`.

nsFrameList::Clone() is added in case the caller wants a copy of a list.

This is the first step toward making nsFrameList a move-only class.

Differential Revision: https://phabricator.services.mozilla.com/D160013
2022-10-26 04:22:24 +00:00
Butkovits Atila
b704dcf231 Backed out 4 changesets (bug 1797011) for causing high frequency ThreadSanitizer failures. CLOSED TREE
Backed out changeset e55bef9aa488 (bug 1797011)
Backed out changeset 515757be2f7e (bug 1797011)
Backed out changeset 360739dfb6d1 (bug 1797011)
Backed out changeset 9a3f104b78c5 (bug 1797011)
2022-10-25 01:03:29 +03:00
Ting-Yu Lin
a3eea20a9b Bug 1797011 Part 1 - Delete nsFrameList's copy constructor. r=layout-reviewers,emilio
This patch doesn't change behavior, and eliminates copy construction of
nsFrameList via utilizing const-references to store the return value of
`GetChildList()`. This is the first step toward making nsFrameList a move-only
class.

Differential Revision: https://phabricator.services.mozilla.com/D160013
2022-10-24 19:14:32 +00:00
Ting-Yu Lin
ce9040c985 Bug 1794035 Part 4 - Use range-based for loops to iterate nsFrameList. r=emilio
After this patch, we still need nsFrameList::Enumerator to iterate
nsFrameList::Slice. We might enhance nsFrameList::Iterator to support Slice, but
I'll leave this for another day.

Differential Revision: https://phabricator.services.mozilla.com/D158809
2022-10-07 01:41:41 +00:00
Emilio Cobos Álvarez
a3231a2981 Bug 1793375 - Rename nsILineIterator::GetDirection to IsLineIteratorFlowRTL. r=dholbert
bool GetDirection() is rather meaningless.

Differential Revision: https://phabricator.services.mozilla.com/D158474
2022-10-03 11:00:39 +00:00
Emilio Cobos Álvarez
12a34801fb Bug 1792333 - Implement nsILineIterator in nsFlex/GridContainerFrame. r=dholbert
Instead of digging into the first line-iterable frame. Digging into the
first line-iterable frame is bogus, because if there are multiple flex
items we might prevent moving through them properly (see test-case).

The flex implementation is nice and fairly complete, IMO. The grid one
is not, but the resulting behavior is nicer than the behavior before
this patch, seems reasonable, and matches Chrome in my testing.

In Searchfox, the behavior is even funnier because user-select: none is
involved, but that predates the regression.

Differential Revision: https://phabricator.services.mozilla.com/D158086
2022-10-02 07:49:46 +00:00
Martin Robinson
f943c5f18d Bug 1789255: Anonymous children of elements with content-visibility should not be skipped for layout r=emilio
Some anonymous children are important for properly sizing their parents
even when those parents hide content with `content-visibility`. This is
shown by regressions in the proper layout of some form elements with
`content-visibility`.

This change introduces a more conservative approach for avoiding layout
of hidden content. Instead of leaving all children dirty during reflow,
reflow anonymous frames (and nsComboboxDisplayFrame, a specialized kind
of anonymous frame). This change means that frames may only lay out some
of their children, so it must introduce some more changes to assumptions
during line layout.

In addition, this change renames `content-visibility` related methods in
nsIFrame in order to make it more obvious what they do.

Differential Revision: https://phabricator.services.mozilla.com/D157306
2022-09-15 20:32:27 +00:00