mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1924698. Avoid a few blockframe queryframes. r=jwatt
Saw these in the long tail of a profile of an sp3 test. Differential Revision: https://phabricator.services.mozilla.com/D225633
This commit is contained in:
parent
34338e0f76
commit
0198ff45b5
@ -8342,8 +8342,10 @@ bool nsBlockFrame::BlockNeedsFloatManager(nsIFrame* aBlock) {
|
||||
|
||||
/* static */
|
||||
bool nsBlockFrame::BlockCanIntersectFloats(nsIFrame* aFrame) {
|
||||
return aFrame->IsBlockFrameOrSubclass() && !aFrame->IsReplaced() &&
|
||||
!aFrame->HasAnyStateBits(NS_BLOCK_BFC);
|
||||
// NS_BLOCK_BFC is block specific bit, check first as an optimization, it's
|
||||
// okay because we also check that it is a block frame.
|
||||
return !aFrame->HasAnyStateBits(NS_BLOCK_BFC) && !aFrame->IsReplaced() &&
|
||||
aFrame->IsBlockFrameOrSubclass();
|
||||
}
|
||||
|
||||
// Note that this width can vary based on the vertical position.
|
||||
|
@ -2506,7 +2506,9 @@ bool nsIFrame::CanBeDynamicReflowRoot() const {
|
||||
|
||||
// If we participate in a container's block reflow context, or margins
|
||||
// can collapse through us, we can't be a dynamic reflow root.
|
||||
if (IsBlockFrameOrSubclass() && !HasAnyStateBits(NS_BLOCK_BFC)) {
|
||||
// (NS_BLOCK_BFC is block specific bit, check first as an optimization, it's
|
||||
// okay because we also check that it is a block frame.)
|
||||
if (!HasAnyStateBits(NS_BLOCK_BFC) && IsBlockFrameOrSubclass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user