Commit Graph

3624 Commits

Author SHA1 Message Date
Ting-Yu Lin
467d0a3a72 Bug 1897135 Part 3 - Change two APIs to ensure root frame is a ViewportFrame. r=dholbert
Move `SetRootFrame()` to nsFrameManager.cpp, because in order to compile
`mRootFrame = aRootFrame` the compiler requires the full definition of
`ViewportFrame` to know that `ViewportFrame` is a subclass of `nsIFrame`

Differential Revision: https://phabricator.services.mozilla.com/D210671
2024-05-17 21:37:02 +00:00
Ting-Yu Lin
3fca23660d Bug 1897135 Part 2 - Remove redundant mFrameManager member in PresShell. r=dholbert
We can just use `mFrameConstructor` to call `GetRootFrame()`. In order to do so
while keeping `PresShell::GetRootFrame()` as a inline method, we need to include
`nsCSSFrameConstructor` header in `PresShell.h`, and remove `PresShell` header
in `nsCSSFrameConstructor.h`. That means we can no longer inline
`RestyleManager()` since it needs to access `PresShell`, but it's OK since
`RestyleManager` is used only in the frame constructor, and is probably not in
the hot path.

Differential Revision: https://phabricator.services.mozilla.com/D210670
2024-05-17 21:37:01 +00:00
Ting-Yu Lin
02535685c4 Bug 1897135 Part 1 - Sort #includes and forward declarations in nsFrameManager, nsCSSFrameConstructor, and PresShell. r=dholbert
Also, delete unused `DEBUG_UNDISPLAYED_MAP` and `DEBUG_DISPLAY_CONTENTS_MAP` in
nsFrameManager.cpp.

Delete the comments between the #includes in PresShell.cpp per coding style
guideline: "Don't place comments between non-conditional includes." in
https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html#include-directives

Differential Revision: https://phabricator.services.mozilla.com/D210669
2024-05-17 21:37:01 +00:00
Ting-Yu Lin
2b104b497c Bug 1824877 Part 5 - Revise build scroll container frame APIs in frame constructor. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D210359
2024-05-15 17:50:50 +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
Ting-Yu Lin
53837706d6 Bug 1824877 Part 1 - Rename nsGfxScrollFrame.{h,cpp} to ScrollContainerFrame.{h,cpp}. r=dholbert
Remove the #include from `nsFrameState.cpp` because it is not used.

Differential Revision: https://phabricator.services.mozilla.com/D210232
2024-05-15 17:50:48 +00:00
Emilio Cobos Álvarez
28bdfc0fba Bug 1281158 - Parse alternative text for the content property. r=dshin
This doesn't yet expose it to a11y but that will be done by the a11y
folks, since this blocks some of the a11y interop test-cases.

Modify the tests to not hit the network, and make -moz-alt-content not
exposed to content (we only need it for UA stylesheets).

Differential Revision: https://phabricator.services.mozilla.com/D209690
2024-05-08 16:06:47 +00:00
Ting-Yu Lin
9fdd977b52 Bug 1890238 Part 2 - Honor forced break values on flex items. r=dholbert
This patch stops the frame constructor from inserting nsPageBreakFrame as a flex
item, because flex container does not rely on it to do forced page break at all,
and nsPageBreakFrame can produce wrong layout result.

The majority of this patch is to honor forced break values on flex items in
nsFlexContainerFrame::ReflowChildren(). In this patch, we don't handle avoid
break values such as `break-before:avoid` and `break-after:avoid` since they are
not handled in other frame types yet.

WPTs are added in later parts.

Differential Revision: https://phabricator.services.mozilla.com/D207910
2024-05-03 20:43:35 +00:00
Ting-Yu Lin
14561b86e0 Bug 1888702 Part 2 - Remove PrependPageBreakItem() and simplify AppendPageBreakItem(). r=layout-reviewers,emilio
The last caller of PrependPageBreakItem() is removed in
https://hg.mozilla.org/mozilla-central/rev/97613a0619b2

Since we only need to append page break items, we don't need
InsertPageBreakItem() and InsertPageBreakLocation enum. We can just implement
AppendPageBreakItem directly.

Differential Revision: https://phabricator.services.mozilla.com/D206150
2024-03-29 23:16:46 +00:00
Emilio Cobos Álvarez
814f3fa1ca Bug 1650159 - Fix crash when editor is used mixed with shadow DOM. r=layout-reviewers,TYLin
See bug 1574544 and co for previous items in this saga. The editor code
can't go soon enough.

Using FlattenedChildIterator with anonymous children (the
IsRootOfNativeAnonymousSubtree() check) is just not supposed to happen,
as NAC are not flat tree children of their parent.

That is, the common case is hitting the
!IsRootOfNativeAnonymousSubtree() case, regardless of shadow dom.

It's only when editor does something awful like reframing NAC directly
that we hit this.

Differential Revision: https://phabricator.services.mozilla.com/D204892
2024-03-21 11:04:28 +00:00
Emilio Cobos Álvarez
ef150776cf Bug 1874823 - Remove NS_BLOCK_STATIC_BFC and NS_BLOCK_CLIP_PAGINATED_OVERFLOW. r=fredw
Put all the "is this block a BFC" logic in nsBlockFrame.cpp.

The CLIP_PAGINATED_OVERFLOW flag is also redundant, it can just be "has
non-propagated overflow styles" check in ShouldApplyOverflowClipping(),
and frees another bit.

Shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D203590
2024-03-07 16:36:56 +00:00
Emilio Cobos Álvarez
14c69b2672 Bug 1362907 - Make select use nsHTMLButtonControlFrame for layout. r=jfkthame,dholbert
This simplifies our combobox code a bit more:

 * Reflow() is only needed to compute the label isize.
 * Frame construction uses a setup more similar to <input type=file> to
   get the right frame tree, removing a bunch of special code.
 * Lots of special code removed all over the place.

Differential Revision: https://phabricator.services.mozilla.com/D203010
2024-02-29 11:15:52 +00:00
Emily McDonough
d8944d6766 Bug 1865172 Part 1 - Always store a page name value when a breakpoint is first found during block reflow. r=dholbert
This happens in a similar location to where we find a breakpoint caused by a
change in page name. However, if the breakpoint was caused by something else,
we still need to compute this value so that the next page being constructed
will have the correct page name.

This also "fixes" the WPT /css/printing/page-name-007-print.html, which passed
before this patch just because our previous logic would continue using the last
page value in those cases, which coincidentally matched what was expected.

Part 2 will include a test that specifically detects this discrepency.

Differential Revision: https://phabricator.services.mozilla.com/D196895
2024-02-24 04:05:45 +00:00
Stanca Serban
f3138fcd27 Backed out 2 changesets (bug 1865172) for causing wpt failures in page-name-unnamed-trailing-001-print.html.
Backed out changeset fc1f91bbfd85 (bug 1865172)
Backed out changeset 17019e03e97c (bug 1865172)
2024-02-24 01:53:19 +02:00
Emily McDonough
fee7314f2a Bug 1865172 Part 1 - Always store a page name value when a breakpoint is first found during block reflow. r=dholbert
This happens in a similar location to where we find a breakpoint caused by a
change in page name. However, if the breakpoint was caused by something else,
we still need to compute this value so that the next page being constructed
will have the correct page name.

This also "fixes" the WPT /css/printing/page-name-007-print.html, which passed
before this patch just because our previous logic would continue using the last
page value in those cases, which coincidentally matched what was expected.

Part 2 will include a test that specifically detects this discrepency.

Differential Revision: https://phabricator.services.mozilla.com/D196895
2024-02-23 22:34:37 +00:00
Emilio Cobos Álvarez
affea68f07 Bug 1877591 - Suppress scrollable table cells when printing. r=dholbert
Much like we suppress most (all?) other block-level scrollframes, see:

  https://searchfox.org/mozilla-central/rev/5c4a45eb17423373ecb71aea9819d41a6231613e/layout/base/nsCSSFrameConstructor.cpp#4392-4394

Otherwise we try to fragment a scrollframe, not good.

Differential Revision: https://phabricator.services.mozilla.com/D200370
2024-02-02 00:41:01 +00:00
Emilio Cobos Álvarez
679a43f9a1 Bug 1876702 - Remove unnecessary distinction between TYPE_FALLBACK and TYPE_NULL. r=smaug
The frame constructor always treats them the same nowadays
(TYPE_FALLBACK used to mean "show the pluginproblem code").

Differential Revision: https://phabricator.services.mozilla.com/D199719
2024-01-29 16:14:09 +00:00
Emilio Cobos Álvarez
e10cc9b317 Bug 1875822 - Remove unused TYPE_FAKE_PLUGIN from nsObjectLoadingContent. r=dom-core,webidl,peterv,smaug
Bonus clean-up.

Differential Revision: https://phabricator.services.mozilla.com/D199271
2024-01-25 18:41:16 +00:00
Frédéric Wang
45c39bb2ac Bug 1874823 - Use NS_BLOCK_DYNAMIC_BFC flag on multi-column containers. r=layout-reviewers,emilio
Per https://drafts.csswg.org/css-multicol/#columns:

"A multi-column container therefore is a regular block container that
 establishes a new independent formatting context"

IsColumnContainerStyle() and BeginBuildingColumns() are currently
used in three places and always together (namely
ConstructFieldSetFrame, ConstructFrameFromItemInternal and the
generic ConstructBlock).

BeginBuildingColumns() asserts that aColumnContent is an nsBlockFrame
and that aComputedStyle corresponds to multi-column container. It
always adds the NS_BLOCK_STATIC_BFC to aColumnContent. It also
makes aColumnContent a `PseudoStyleType::columnContent` and that's
the only place where it's used.

This patch instead makes StyleEstablishesBFC() return true for
PseudoStyleType::columnContent so that the NS_BLOCK_DYNAMIC_BFC bit
is set at init and after further style updates. It thus removes the
need for to explicitly set NS_BLOCK_STATIC_BFC in
BeginBuildingColumns().

There is no behavior changes.

Differential Revision: https://phabricator.services.mozilla.com/D199091
2024-01-24 12:13:42 +00:00
Sandor Molnar
a6c0549a83 Backed out 2 changesets (bug 1874823) for causing assertion failures at builds/worker/checkouts/gecko/layout/generic/nsIFrame.cpp CLOSED TREE
Backed out changeset 4e0e2448d7a5 (bug 1874823)
Backed out changeset 2c0d41730484 (bug 1874823)
2024-01-24 13:39:51 +02:00
Frédéric Wang
7955331c7e Bug 1874823 - Use NS_BLOCK_DYNAMIC_BFC flag on multi-column containers. r=layout-reviewers,emilio
Per https://drafts.csswg.org/css-multicol/#columns:

"A multi-column container therefore is a regular block container that
 establishes a new independent formatting context"

IsColumnContainerStyle() and BeginBuildingColumns() are currently
used in three places and always together (namely
ConstructFieldSetFrame, ConstructFrameFromItemInternal and the
generic ConstructBlock).

BeginBuildingColumns() asserts that aColumnContent is an nsBlockFrame
and that aComputedStyle corresponds to multi-column container. It
always adds the NS_BLOCK_STATIC_BFC to aColumnContent. It also
makes aColumnContent a `PseudoStyleType::columnContent` and that's
the only place where it's used.

This patch instead makes StyleEstablishesBFC() return true for
PseudoStyleType::columnContent so that the NS_BLOCK_DYNAMIC_BFC bit
is set at init and after further style updates. It thus removes the
need for to explicitly set NS_BLOCK_STATIC_BFC in
BeginBuildingColumns().

There is no behavior changes.

Differential Revision: https://phabricator.services.mozilla.com/D199091
2024-01-24 10:52:29 +00:00
Sandor Molnar
91365e8cd8 Backed out 2 changesets (bug 1874823) for causing assertion failures at builds/worker/checkouts/gecko/layout/generic/nsBlockFrame.cpp CLOSED TREE
Backed out changeset f5d297181393 (bug 1874823)
Backed out changeset a38e1f388fd2 (bug 1874823)
2024-01-24 12:22:11 +02:00
Frédéric Wang
bfd7a1a5ef Bug 1874823 - Use NS_BLOCK_DYNAMIC_BFC flag on multi-column containers. r=layout-reviewers,emilio
Per https://drafts.csswg.org/css-multicol/#columns:

"A multi-column container therefore is a regular block container that
 establishes a new independent formatting context"

IsColumnContainerStyle() and BeginBuildingColumns() are currently
used in three places and always together (namely
ConstructFieldSetFrame, ConstructFrameFromItemInternal and the
generic ConstructBlock).

BeginBuildingColumns() asserts that aColumnContent is an nsBlockFrame
and that aComputedStyle corresponds to multi-column container. It
always adds the NS_BLOCK_STATIC_BFC to aColumnContent. It also
makes aColumnContent a `PseudoStyleType::columnContent` and that's
the only place where it's used.

This patch instead makes StyleEstablishesBFC() return true for
PseudoStyleType::columnContent so that the NS_BLOCK_DYNAMIC_BFC bit
is set at init and after further style updates. It thus removes the
need for to explicitly set NS_BLOCK_STATIC_BFC in
BeginBuildingColumns().

There is no behavior changes.

Differential Revision: https://phabricator.services.mozilla.com/D199091
2024-01-24 09:50:44 +00:00
Ting-Yu Lin
46f5143aab Bug 1865012 Part 4 - Remove PageValuesProperty copy in frame continuations. r=dholbert
It was added in bug 1804772. After Part 1, accessing FirstInFlow() is constant
time, so we don't need to duplicate PageValuesProperty in each frame
continuation.

Differential Revision: https://phabricator.services.mozilla.com/D197759
2024-01-23 23:15:02 +00:00
Emilio Cobos Álvarez
d79ce67c15 Bug 221154 - Make overflow work on table cells. r=dholbert
Depends on D198786

Differential Revision: https://phabricator.services.mozilla.com/D197978
2024-01-23 09:45:26 +00:00
Norisz Fay
a7b0088da8 Backed out 4 changesets (bug 1865012) for causing mochitest failure on test_gencontent.html CLOSED TREE
Backed out changeset 95d920859b91 (bug 1865012)
Backed out changeset 26f6c2765cb5 (bug 1865012)
Backed out changeset 30a3c356ebc9 (bug 1865012)
Backed out changeset 4fb71ff990ae (bug 1865012)
2024-01-23 02:17:49 +02:00
Ting-Yu Lin
064ae31be8 Bug 1865012 Part 4 - Remove PageValuesProperty copy in frame continuations. r=dholbert
It was added in bug 1804772. After Part 1, accessing FirstInFlow() is constant
time, so we don't need to duplicate PageValuesProperty in each frame
continuation.

Differential Revision: https://phabricator.services.mozilla.com/D197759
2024-01-22 19:50:49 +00:00
Tom Schuster
8c14e039c0 Bug 1875466 - Remove nsIObjectLoadingContent::TYPE_IMAGE. r=webidl,emilio
Depends on D199116

Differential Revision: https://phabricator.services.mozilla.com/D199117
2024-01-22 14:26:11 +00:00
Tom Schuster
549a8ff507 Bug 1875466 - Remove browser.opaqueResponseBlocking.syntheticBrowsingContext pref. r=emilio
Depends on D199115

Differential Revision: https://phabricator.services.mozilla.com/D199116
2024-01-22 14:26:11 +00:00
Narcis Beleuzu
600cbc7a39 Backed out 2 changesets (bug 221154) for causing crashtests. CLOSED TREE
Backed out changeset 166b593890ef (bug 221154)
Backed out changeset 274f73457318 (bug 221154)
2024-01-19 20:17:38 +02:00
Emilio Cobos Álvarez
3bab568d66 Bug 221154 - Make overflow work on table cells. r=dholbert
Depends on D198786

Differential Revision: https://phabricator.services.mozilla.com/D197978
2024-01-19 16:33:54 +00:00
Iulian Moraru
0abfc3b0a4 Backed out 2 changesets (bug 1865172) for causing wpt failures on page-size-007-print.html. CLOSED TREE
Backed out changeset ab9a94d4c0bf (bug 1865172)
Backed out changeset 087e1d3a393f (bug 1865172)
2024-01-19 00:49:06 +02:00
Emily McDonough
6d48e8f2ad Bug 1865172 Part 1 - Use computed page value on first reflow for all pages that don't have a pushed page name r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D196895
2024-01-18 19:11:00 +00:00
Ting-Yu Lin
5c884d5335 Bug 1874897 - Revert Bug 1873530 Part 3 to fix performance regression. r=dholbert
This reverts commit https://hg.mozilla.org/mozilla-central/rev/dfcfa98a7e21
without any additional modification.

Differential Revision: https://phabricator.services.mozilla.com/D198764
2024-01-17 05:14:35 +00:00
Frédéric Wang
8656a4a0a7 Bug 1765615 - Introduce NS_BLOCK_DYNAMIC_BFC state bit. r=layout-reviewers,emilio
After D198523, NS_BLOCK_FLOAT_MGR and NS_BLOCK_MARGIN_ROOT are always
set simultaneously when initiating a frame, so we can merge them into a
single NS_BLOCK_STATIC_BFC flag. The freed bit is used to define a new
NS_BLOCK_DYNAMIC_BFC flag that has the same effect and is now used for
frames with paint/layout containment so that in D197043 they can be
updated later without having to reconstruct the frame tree. Finally
NS_BLOCK_BFC_STATE_BITS is the bitwise union of these BFC flags.

The following changes are made and cause no behavior changes:

- Instead of testing whether NS_BLOCK_FLOAT_MGR or NS_BLOCK_MARGIN_ROOT
  is set, or whether all of the bits from
  NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS are set, we test whether any
  of the NS_BLOCK_BFC_STATE_BITS is set.

- Instead of adding NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS when
  constructing a frame, we add NS_BLOCK_STATIC_BFC. The exception is
  for frame with paint/layout containment, for which we set
  NS_BLOCK_DYNAMIC_BFC instead.

Differential Revision: https://phabricator.services.mozilla.com/D198530
2024-01-16 07:58:47 +00:00
Frédéric Wang
81d67ee144 Bug 1765615 - Remove flags parameter from NS_NewComboboxControlFrame/NS_NewSelectsAreaFrame. r=layout-reviewers,emilio
nsCSSFrameConstructor::ConstructSelectFrame is the only place where
these functions are called and the flags parameter is always set to
NS_BLOCK_FLOAT_MGR.

Differential Revision: https://phabricator.services.mozilla.com/D198520
2024-01-15 15:35:50 +00:00
Ting-Yu Lin
1c5fd05aca Bug 1873530 Part 3 - Unify continuation linking operations by removing SetPrevContinuation() and SetPrevInFlow(). r=jfkthame
SetNextContinuation() and SetPrevContinuation() are almost always called
together when setting up a continuation link, but the callers don't call them in
particular order. We should unify them as one method so that it's more
ergonomics and robust, especially when we do more complex work such as caching
continuations. Same reason for SetNextInFlow() and SetPrevInFlow().

We choose to merge the SetPrevContinuation() code into SetNextContinuation() for
the symmetry of SetNextSibling(). (Yes, we don't have SetPrevSibling().)

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D197966
2024-01-11 19:50:58 +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
David Shin
3730f7260b Bug 1865668: Don't generate text node for pseudo-elements with empty string content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D194094
2023-11-21 21:14:11 +00:00
Emilio Cobos Álvarez
c1820e53c4 Bug 1863402 - Simplify top layer fixed list set-up and back out bug 1799036. r=dholbert
The top layer fixed list CB and the regular fixed list CB are always the
same (the viewport frame). We're currently using two different
AbsoluteFrameList for these, but that's wrong. Make sure to use the same
AbsoluteFrameList. This makes sure that placeholders for the fixed list
are properly ordered.

Revert bug 1799036 (for now at least), since this also fixes that issue
in a better, less breaking way.

While at it, also insert the top layer abspos list after the
non-top-layer one. This is needed so that a non-top-layer abspos element
and a top layer abspos element are laid out in the right order.

We don't need to share a list for those tho, because all top-layer
abspos items are also abspos containers themselves, so a non-top-layer
descendant of a top layer item can't escape the top layer chain. This
fixes a couple non-fatal asserts.

Differential Revision: https://phabricator.services.mozilla.com/D192908
2023-11-09 11:29:59 +00:00
Emilio Cobos Álvarez
67372ce7e5 Bug 1856374 - Add a pref to stop forcing details elements to be blocks. r=TYLin
This is probably something we want to move towards, so it doesn't hurt
adding a pref to allow people to experiment with it.

Differential Revision: https://phabricator.services.mozilla.com/D189919
2023-10-05 16:59:33 +00:00
Robert Longson
f81a0dc1a1 Bug 1856213 - remove some queryinterface calls r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190022
2023-10-04 10:41:41 +00:00
Robert Longson
64704c4dba Bug 1856362 part 2 - introduce and use IsSVGFilterPrimitiveElement r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D189858
2023-10-03 10:40:46 +00:00
Robert Longson
2b397759f3 Bug 1856362 part 1 - rename SVGFE to SVGFilterPrimitiveelement and SVGFEUnstyledElement to SVGFilterPrimitiveChildElement r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D189857
2023-10-03 10:40:45 +00:00
Emilio Cobos Álvarez
a3c886e9ba Bug 1855668 - Trivially fix some orange tests.
MANUAL PUSH: Orange fix CLOSED TREE
2023-10-02 14:27:04 +02:00
Emilio Cobos Álvarez
e7563558ed Bug 1855668 - Make ::backdrop inherit from the originating element. r=zrhoffman
This is as a result of a spec change (see link in the test), but it
addresses a very long-standing issue with this pseudo-element, see
https://github.com/whatwg/fullscreen/issues/124.

Differential Revision: https://phabricator.services.mozilla.com/D189484
2023-10-02 08:53:54 +00:00
Emily McDonough
c9c5b63c97 Bug 1855567 - Use nsPageFrame::PageContentFrame() in nsCSSFrameConstructor::ConstructPageFrame() r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D189435
2023-09-29 18:28:15 +00:00
Emily McDonough
329253be60 Bug 1854027 - Remove obsolete comments about page frame construction r=dholbert DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D189434
2023-09-28 19:00:51 +00:00
Emily McDonough
c650091e27 Bug 1853455 - Fix nsIFrame::ComputePageValue to check for page style values, rather than checking the start page value. r=dholbert
Because we use NULL to indicate the auto value, once a page contributes a
non-auto page value then that will be all that is seen by ComputePageValue
when a later page doesn't have a page-name at all.

Actually checking for the page-name value will fix page-name values when
an empty/auto page-name follows pages with a non-auto value. It is also
slightly more efficient, as it avoids a frame property lookup and instead
just looks at the computed style.

While we are here, remove an assert that is clearly not possible to occur
anymore, and add a short explanation of the code in ComputePageValue.

Differential Revision: https://phabricator.services.mozilla.com/D188544
2023-09-27 19:06:17 +00:00