This can also fix bug 1586470.
This change basically reverts Bug 1025669 Part 1.
https://hg.mozilla.org/mozilla-central/rev/ae2fd5b2defb0df1bd30521f4793de6757d1e98b
In box-decoration-break-block-margin.html, the `height` in `.inner` is
changed to 79px so that 79px plus 7px margin top and 1px margin end,
total 87px, can be divided by 3 (columns). The modification to reference
file reflects what we currently rendered.
Co-authored-by: Mats Palmgren <mats@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D48484
--HG--
extra : moz-landing-system : lando
TraverseFrames gathers a bunch of frames into an array, and then at
forced breaks or the end of the block flushes its array by running
ResolveParagraph. ResolveParagraph can sometimes cause lines to break,
so lines recorded during TraverseFrames may no longer be accurate during
ResolveParagraph.
It may look like the lines are only needed during ResolveParagraph and
we could handle the one issue in TraverseFrames that deals with
preformatted newlines by restructuring the code a tad. However, in the
next patch, there will be an additional caller that needs the current
line during TraverseFrames to pass to CreateContinuation, which makes
such a structure less plausible.
This will also make it easier to produce a current line for the call to
SplitInlineAncestors within ResolveParagraph, which will be done in the
patch after the next.
Differential Revision: https://phabricator.services.mozilla.com/D38797
--HG--
extra : moz-landing-system : lando
For now, always pass null, except when passing it through from one
overload to another.
Differential Revision: https://phabricator.services.mozilla.com/D38389
--HG--
extra : moz-landing-system : lando
As described in https://bugzilla.mozilla.org/show_bug.cgi?id=1562122#c5,
this precomputed argument is not our children's block-size, but is the
block-end edge of children because aState.mBCoord is initialized as our
border-padding block-start in BlockReflowInput's constructor.
I also delete the sentence "The final block-size that is used in
aMetrics will be set ..." because this is the implementation details of
this function, and is likely to become inaccurate after considering the
block split by column-span.
Depends on D37625
Differential Revision: https://phabricator.services.mozilla.com/D37626
--HG--
extra : moz-landing-system : lando
Because aStatus is also used as an output argument, caching aStatus as
our children's reflow status can and make the logic that morphs aStatus
to our reflow status easier to follow. And this helps the patch I'm
going to add for computing the block-size for column-span split.
Depends on D37624
Differential Revision: https://phabricator.services.mozilla.com/D37625
--HG--
extra : moz-landing-system : lando
We usually use reference to manipulate nsReflowStatus like in Reflow().
The documentation for aStatus needs edit, and is done in next part.
Depends on D37623
Differential Revision: https://phabricator.services.mozilla.com/D37624
--HG--
extra : moz-landing-system : lando
ComputeFinalBSize() doesn't need to modify the final inline-size, so we
don't need to pass the entire LogicalSize into it.
Also, aReflowInput.AvailableBSize() is used multiple times. Cache it to
shorten some statements.
Differential Revision: https://phabricator.services.mozilla.com/D37623
--HG--
extra : moz-landing-system : lando
(The single line that made them active was commented out in the previous patch.)
Differential Revision: https://phabricator.services.mozilla.com/D36425
--HG--
extra : moz-landing-system : lando
GetAvailableSpace was renamed to GetFloatAvailableSpace in bug 25888.
DONTBUILD because this is a comment-only change.
Differential Revision: https://phabricator.services.mozilla.com/D30581
--HG--
extra : moz-landing-system : lando
Like Part 2, I choose mCachedPrefISize because grid and flex container
are using it.
Differential Revision: https://phabricator.services.mozilla.com/D29748
--HG--
extra : moz-landing-system : lando
Instead of renaming it to mMinISize, I choose mCachedMinISize because
both grid and flex container frames use mCachedMinISize for similar
purpose.
Differential Revision: https://phabricator.services.mozilla.com/D29747
--HG--
extra : moz-landing-system : lando
This patch is generated by running the following script under layout/,
and then manually delete the FIXME comment in LayoutConstants.h
#!/bin/bash
function rename() {
find .\
-type f\
! -path "./obj*"\
! -path "./.git"\
! -path "./.hg"\
\( -name "*.cpp" -or\
-name "*.h" \)\
-exec sed -i -e "s/$1/$2/g" "{}" \;
}
rename NS_INTRINSIC_WIDTH_UNKNOWN NS_INTRINSIC_ISIZE_UNKNOWN
Differential Revision: https://phabricator.services.mozilla.com/D29746
--HG--
extra : moz-landing-system : lando
Per the discussion in:
https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ
They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.
For the ones that already used `e` or `k` prefixes, I've mostly done:
for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done
For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.
Depends on D28680
Differential Revision: https://phabricator.services.mozilla.com/D28681
--HG--
extra : moz-landing-system : lando
Additionally, this patch makes `nsFrame.h` stop including `nsIPresShell.h`
and makes each users include `mozilla/PresShell.h` instead. So, this improves
rebuild performance of `nsIPresShell.h` (and `mozilla/PresShell.h` in the
future).
Note that due to `nsIFrame::PresShell()`, `mozilla::` prefix is necessary for
`PresShell` in a lot of classes which are derived from `nsIFrame` even in
`.cpp` files.
Differential Revision: https://phabricator.services.mozilla.com/D27476
--HG--
extra : moz-landing-system : lando
Only nsBlockFrame and its subclasses recognize the nsIFrame::eBlockFrame
flag, so we can replace the usage of the flag with either
nsIFrame::IsBlockFrameOrSubclass() or a do_QueryFrame().
Differential Revision: https://phabricator.services.mozilla.com/D20542
--HG--
extra : moz-landing-system : lando
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.
This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.
Can't wait for XUL trees to die.
Depends on D19001
Differential Revision: https://phabricator.services.mozilla.com/D19002
--HG--
extra : moz-landing-system : lando
Without the check that I'm adding in this patch, we'd violate the
"parallel writing mode" expectation of some baseline accessors
that we use in the now-guarded code. And we'd produce bogus layout
as a result.
The added assertions are just for good measure. The included testcase
causes us to fail both assertions, in a build that's missing the fix.
Differential Revision: https://phabricator.services.mozilla.com/D18715
--HG--
extra : moz-landing-system : lando
Currently, GetSplittableType() is called only in
nsCSSFrameConstructor::CreateContinuingFrame(). The splittable concrete frames
should inherit from nsSplittableFrame, and must explicitly create continuing
frame in CreateContinuingFrame(). Thus, no need to maintain GetSplittableType().
Differential Revision: https://phabricator.services.mozilla.com/D10798
--HG--
extra : moz-landing-system : lando
nsCSSFrameConstructor::FindDisplayData() guarantees a block with "display:
list-item" will be constructed by ConstructBlock() (either through
ConstructScrollableBlock() or ConstructNonScrollableBlock()).
This is also a preparation to fix bug 1491915 since we want to control
bullet frame creation under column hierarchy.
Depends on D6840
Differential Revision: https://phabricator.services.mozilla.com/D6841
--HG--
extra : moz-landing-system : lando
Those arguments were added in bug 591737 to create a triangle for the
summary frame, but <summary> has been re-implemented by using "list-item"
since then. Now the only caller is nsBlockFrame itself, so there's no need
to expose those arguments.
Differential Revision: https://phabricator.services.mozilla.com/D6839
--HG--
extra : moz-landing-system : lando
Similar to lines (see previous patch), floats from next-in-flow or overflow
frames have probably not been marked dirty (as ReflowInput hasn't dealt with
them when it was constructed), so we need to mark them dirty for proper reflow.
If we don't do that, and they don't fit in the current column, the next column
will only mark its current children dirty, so when pulling back its first
floats from the previous column they will not be reflowed as needed.
MozReview-Commit-ID: KKrwtzeQMrI
--HG--
extra : rebase_source : ec99f380c978c6d28135490401beb0bb54c8e2b3
Similar to lines (see previous patch), floats from next-in-flow or overflow
frames have probably not been marked dirty (as ReflowInput hasn't dealt with
them when it was constructed), so we need to mark them dirty for proper reflow.
If we don't do that, and they don't fit in the current column, the next column
will only mark its current children dirty, so when pulling back its first
floats from the previous column they will not be reflowed as needed.
MozReview-Commit-ID: KKrwtzeQMrI
--HG--
extra : rebase_source : 2b1abb27e9a6ef248a90254b8b56c05207ae25e6
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet
Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
many places call into the methods with StyleSheet, so there are many
->AsServo() added to sheets
MozReview-Commit-ID: K4zYnuhOurA
--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48