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
We call NS_FRAME_SET_TRUNCATION (via nsReflowStatus::UpdateTruncated) in the end
of every frame's Reflow() to update nsReflowStatus::mTruncated bit. In the
following patches, I'm going to rewrite all the callers of IsTruncated(), and
ultimately remove the mTruncated bit.
In this patch, I rewrite the callsite in ReflowCellFrame() by moving
nsReflowStatus::UpdateTruncated logic [1] into it. Note that we use an assertion
in ReflowCellFrame to make sure nsTableRowFrame and nsTableCellFrame have the
same writing-mode.
The only test covering the code path is `layout/reftests/bugs/409084-1a.html`.
[1] https://searchfox.org/mozilla-central/rev/2946e9b450cb35afaf8dad927a8d187975dcd74d/layout/generic/nsIFrame.cpp#256-258
Differential Revision: https://phabricator.services.mozilla.com/D151459
See bug 1758757 comment 0 for the rationale.
Note: the old code in nsTableRowGroupFrame::SlideChild() is bogus because it
calls ApplyRelativePositioning() via the nsTableRowGroupFrame's ReflowInput
instance. That is, it applies relative positioning to nsTableRowGroupFrame, but
not to the aKidFrame (nsTableRowFrame).
While I'm here, I expand `SlideChild` in its only caller, and simplify it.
Differential Revision: https://phabricator.services.mozilla.com/D150323
This patch doesn't affect behavior; it's dead-code removal.
UpdateForFrameBackground is never called, and hence can be removed.
The member-var that it conditionally set, mPartHasFixedBackground, can be
assumed to be always false, and hence can be removed.
The same struct's other member-var, mDrawsBackground, is irrelevant since it's
only checked in combination with mPartHasFixedBackground, and hence can be
removed. And with that, the local variable invalidateForAttachmentFixed can
be removed as well.
This all seems to be code that's obsoleted by our (long-ago) move to using
display lists to draw tables.
Differential Revision: https://phabricator.services.mozilla.com/D149680
This patch doesn't change behavior.
I was initially going to promote this param to be const (which is an
improvement that's unlocked by earlier patches this series), but in doing so
I realized the param is entirely unnecessary. So, let's just remove it.
Differential Revision: https://phabricator.services.mozilla.com/D149678
This patch doesn't change behavior.
Before this patch, the FindBackground API returns a bool to indicate
success/failure, and sets its outparam to a non-null pointer-value on success.
This patch simplifies the API by just promoting the promoting the outparam to
be the actual return value, with nullptr as a sentinel value to indicate
failure.
(This patch adds some braces to affected/contextual if statements, too, to
match our coding style guide.)
Differential Revision: https://phabricator.services.mozilla.com/D149337
DONTBUILD because this is just a code-comment change.
In particular, in this patch...
- I'm removing an XXXldb one-liner todo-comment which was suggesting something
that we in fact now do. (At the time that this comment was added, we only
checked `presContext->IsPaginated()`[1] and did not check for unconstrained
available-bsize, but now we do.)
- I'm rewording the remaining comment for clarity and to fix some typos.
- I'm adding a reference to bug 1772383 which (now) covers the issue that the
comment is alluding to.
[1] https://searchfox.org/mozilla-central/diff/31f1898810f733c40bfe3fd4b25295885feb2e39/layout/tables/nsTableFrame.cpp#2734
Differential Revision: https://phabricator.services.mozilla.com/D148148
Captions should be relatively-positioned (other browsers support this as
well). This ensures we correctly save their normal positions and thus
that the sticky scroll container knows how to reposition them correctly.
Avoid registering inner table frames with the sticky scroll container to
make the assertion sound in cases of sticky-positioned tables.
Differential Revision: https://phabricator.services.mozilla.com/D147092
Captions should be relatively-positioned (other browsers support this as
well). This ensures we correctly save their normal positions and thus
that the sticky scroll container knows how to reposition them correctly.
Avoid registering inner table frames with the sticky scroll container to
make the assertion sound in cases of sticky-positioned tables.
Differential Revision: https://phabricator.services.mozilla.com/D147092
Although not needed right now (checkerboarding backgrounds get
a slice anyway due to being a different scroll root), this will
be important for the upcoming work to make backdrop filter
roots implicit. This allows WR to know when slicing up a content
slice if the prim is relevant to the backdrop root.
Differential Revision: https://phabricator.services.mozilla.com/D146145
This patch does not impact behavior; it's just formatting changes.
This patch was automatically generated by the following command:
./mach clang-format -p layout
Differential Revision: https://phabricator.services.mozilla.com/D145163
`nsIFrame::IsRelativelyPositioned()` tests "position:relative" or
"position:sticky", but its naming is misleading until you've dug into the
underlying helper `nsStyleDisplay::IsRelativelyPositionedStyle()`.
Differential Revision: https://phabricator.services.mozilla.com/D140273
We need them for SVG primitives.
This patch adds a bit of plumbing to disable snapping some of the primitives and forcing the antialiasing shader feature where needed, and uses it for SVG solid rectangles and images.
Differential Revision: https://phabricator.services.mozilla.com/D139024
This patch fixes the following build error:
layout/tables/FixedTableLayoutStrategy.cpp:86:31: error: incomplete type 'nsLayoutUtils' named in nested name specifier
I'm also removing the "DEBUG_TABLE_STRATEGY_off" definition from the contextual
section of moz.build, because that symbol is never used. (It's never mentioned
anywhere else in our codebase; it must have controlled some long-since-removed
code).
Differential Revision: https://phabricator.services.mozilla.com/D138217
This patch fixes only the cases if the result of `ComputeIndexOf_Deprecated()`
is used as unsigned integer with implicit or explicit cast.
Differential Revision: https://phabricator.services.mozilla.com/D131336
It's hard to fix some callers. Therefore, in this bug, we should fix only
simple cases. Therefore, we should rename existing API first.
Differential Revision: https://phabricator.services.mozilla.com/D131334
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.
There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.
Differential Revision: https://phabricator.services.mozilla.com/D132289
This patch doesn't change any user-observable behavior.
StaticAutoPtr lets us remove a handful of explicit 'delete' statements, by
making deletion happen automatically when these variables are cleared.
Differential Revision: https://phabricator.services.mozilla.com/D127336