Bug 1903141 Part 1 - Simplify MaybeHasFloats() that checks pushed floats. r=dholbert
After Bug 1902542 Part 5 [1], the pushed floats list is deleted if it is empty.
Therefore, we can simplify `MaybeHasFloats()` as suggested in the XXX comment.
[1] https://hg.mozilla.org/mozilla-central/rev/52a9610fc9f2
Differential Revision: https://phabricator.services.mozilla.com/D214044
This commit is contained in:
@@ -1224,6 +1224,18 @@ bool nsBlockFrame::IsInLineClampContext() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool nsBlockFrame::MaybeHasFloats() const {
|
||||
if (!mFloats.IsEmpty()) {
|
||||
return true;
|
||||
}
|
||||
if (HasPushedFloats()) {
|
||||
return true;
|
||||
}
|
||||
// For the OverflowOutOfFlowsProperty I think we do enforce that, but it's
|
||||
// a mix of out-of-flow frames, so that's why the method name has "Maybe".
|
||||
return HasAnyStateBits(NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterator over all descendant inline line boxes, except for those that are
|
||||
* under an independent formatting context.
|
||||
|
||||
Reference in New Issue
Block a user