In the description of the mTruncated bit, its purpose is the same as calling
SetInlineLineBreakBeforeAndReset(). We've removed all its usages in previous
patches, so the bit is no longer needed.
Differential Revision: https://phabricator.services.mozilla.com/D151461
In nsReflowStatus::UpdateTruncated(), mTruncated can be true only when
mIsTopOfPage is false. However, when we reflow -moz-column-content, we always
set mIsTopOfPage to true. Therefore, IsTruncated() always returns false, i.e.
`!IsTruncated()` is always true.
Differential Revision: https://phabricator.services.mozilla.com/D151460
After the fixes in this patch, the REQUIRES_UNIFIED_BUILD declaration is no
longer needed, so I'm removing it here. This directory now builds successfully
with that removed and with ac_add_options --disable-unified-build in the
mozconfig.
Depends on D125610
Differential Revision: https://phabricator.services.mozilla.com/D125611
WebRender prefers to know the full bounds of the primitive, since it makes invalidation easier (and doesn't increase the size of the commands we send).
Differential Revision: https://phabricator.services.mozilla.com/D124588
WebRender prefers to know the full bounds of the primitive, since it makes invalidation easier (and doesn't increase the size of the commands we send).
Differential Revision: https://phabricator.services.mozilla.com/D124588
WebRender prefers to know the full bounds of the primitive, since it makes invalidation easier (and doesn't increase the size of the commands we send).
Differential Revision: https://phabricator.services.mozilla.com/D124588
WebRender prefers to know the full bounds of the primitive, since it makes invalidation easier (and doesn't increase the size of the commands we send).
Differential Revision: https://phabricator.services.mozilla.com/D124588
break-before/after: page|column seem harder because you need to deal
with nested breaks, I think, but this should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D121206
break-before/after: page|column seem harder because you need to deal
with nested breaks, I think, but this should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D121206
This patch is generated via the rename functionality in my editor; add
`mozilla::` prefix to `OverflowAreas` in headers; and remove the
`OverflowType` alias added in Part 1.
Differential Revision: https://phabricator.services.mozilla.com/D97235
It's straightforward to determine which writing mode is required to pass
to ComputedLogicalMargin() by looking at any subsequent method called on
the margin.
For example, if we see
```
ComputedLogicalMargin().BStartEnd(wm);
```
the writing mode needed to pass to `ComputedLogicalMargin()` is `wm`.
Differential Revision: https://phabricator.services.mozilla.com/D95661
nsColumnSetFrame won't have any border and padding because it's an inner
frame under ColumnSetWrapper. We've already asserted this fact at the
beginning of nsColumnSetFrame::Reflow().
This change shouldn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D93626
It's useful to use `std::move()` to indicate the frames' ownership in one list
is transferred to the another list.
For a frame list managed by AutoFrameListPtr, after moving its frames to
another list, it can be automatically deleted when it is going out of
scope.
Differential Revision: https://phabricator.services.mozilla.com/D88455
I feel skipIncremental is hard to reasoning. It's easier to list all the
possible reasons that the child needs to be reflowed again.
Differential Revision: https://phabricator.services.mozilla.com/D88699
Rename so that its naming is consistent with ReflowConfig::mColISize,
and to avoid confusion with ColumnBalanceData::mMaxBSize.
Differential Revision: https://phabricator.services.mozilla.com/D88697
The gist of this patch is: once the feasible and infeasible block-size
is within one device pixel, we choose nextGuess to be the greatest
multiple of one device pixel below or equal to the feasible block-size.
If this nextGuess is infeasible, we will reflow children one last time
by using the last feasible block-size and done with the balancing.
Differential Revision: https://phabricator.services.mozilla.com/D83732
Here's an example that can break the loop at the first iteration.
<div style="column-count:2; height:100px"><img src="" style="height:500px">
Differential Revision: https://phabricator.services.mozilla.com/D83731
This is a straightforward conversion except that
`NS_SUBTREE_DIRTY(this)` can be written terser as `IsSubtreeDirty()`.
Differential Revision: https://phabricator.services.mozilla.com/D82811
In FindBestBalanceBSize(), suppose we have aUnboundedLastColumn equals
to true, and the measuring reflow of all the columns is feasible. This
setting represents the most common scenario of multi-column layout as
the multi-column footnote on Wikipedia.
We used to use 600 as the extra block-size added to the estimate column
block-size. However, if the first guess of the column block-size, say
G1, is infeasible, the feasible block-size is still bound to the sum of
all columns S. That leaves us a massive range between G1 and S to
search.
We don't want to use a larger fixed extra block-size. Although it can
reduce the possibility of failing the first guess, but for cases where a
smaller extra block-size is sufficient, it increases the search range
and the iteration number before the binary search converges.
Instead, we can spend the first few iterations doubling the extra
block-size E added to the estimate column block-size until we find the
first feasible block-size. This gives us a smaller upper bound S / N +
E, where N is the number of columns.
Differential Revision: https://phabricator.services.mozilla.com/D80571
The motivation is to replace mFrames.GetLength() in
FindBestBalanceBSize() since it is O(N), where N is the number of
columns.
Also, counting the column number from 1 so that it matches mUsedColCount
without needing to subtract 1 at some places.
Differential Revision: https://phabricator.services.mozilla.com/D80569
* childContentBEnd: this value can be larger than
kidDesiredSize.BSize(wm) if -moz-column-content anonymous blocks has a
child which is overflow-incomplete.
* mLastBSize: last column's block-size is important in column balancing
algorithm because it sets mKnownInfeasibleBSize when a balancing
iteration is feasible.
* The iteration count in column balancing. This is an easy way to
observe column balancing performance.
Differential Revision: https://phabricator.services.mozilla.com/D80568
Checking ColumnSet's available block-size [1] makes no sense nowadays
because ColumnSet is an inner frame under ColumnSetWrapper. We should
check ColumnSetWrapper's available block-size instead.
Also, bump assertions count for 1015844.html on Android, which is a
crashtest having multicols.
[1] The comment was also misleading, which said it was checking
ColumnSet's "block-size", but it actually was checking available
block-size.
Differential Revision: https://phabricator.services.mozilla.com/D63385
--HG--
extra : moz-landing-system : lando
Checking ColumnSet's available block-size [1] makes no sense nowadays
because ColumnSet is an inner frame under ColumnSetWrapper. We should
check ColumnSetWrapper's available block-size instead.
[1] The comment was also misleading, which said it was checking
ColumnSet's "block-size", but it actually was checking available
block-size.
Differential Revision: https://phabricator.services.mozilla.com/D63385
--HG--
extra : moz-landing-system : lando
They were used when nsColumnSetFrame was still a column container, but
are not used today.
Differential Revision: https://phabricator.services.mozilla.com/D64647
--HG--
extra : moz-landing-system : lando
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.
Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.
Differential Revision: https://phabricator.services.mozilla.com/D62604
--HG--
extra : moz-landing-system : lando
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.
Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.
Differential Revision: https://phabricator.services.mozilla.com/D62604
--HG--
extra : moz-landing-system : lando
The trickier part is that we represent -moz-image-rect as a Rect() type instead
of image with non-null clip-rect. So we need to add a bit of code to
distinguish "image request types" from other types of images.
But it's not too annoying, and we need to do the same for fancier images like
image-set and such whenever we implement it, so seems nice to get rid of
most explicit usages of nsStyleImage::GetType().
Differential Revision: https://phabricator.services.mozilla.com/D62164
--HG--
extra : moz-landing-system : lando
Nowadays, ColumnSetFrame is an inner frame under ColumnSetWrapperFrame.
It always has "block-size: auto", so `aReflowInput.ComputedBSize()`
always equals to NS_UNCONSTRAINEDSIZE.
Also, -moz-column-content no longer has "max-block-size: 100%", so
NS_FRAME_CONTAINS_RELATIVE_BSIZE can never be set on ColumnSetFrame when
constructing ReflowInputs for ColumnSetFrame's children in
`ReflowInput::InitResizeFlags`. Removing the bit is not needed, either.
Differential Revision: https://phabricator.services.mozilla.com/D58732
--HG--
extra : moz-landing-system : lando