static_assert(sizeof(RenderElement) == sizeof(SameSizeAsRenderElement), "RenderElement should stay small");
-bool RenderElement::s_affectsParentBlock = false;
bool RenderElement::s_noLongerAffectsParentBlock = false;
inline RenderElement::RenderElement(ContainerNode& elementOrDocument, RenderStyle&& style, BaseTypeFlags baseTypeFlags)
downcast<RenderBox>(*this).removeFloatingOrPositionedChildFromBlockLists();
}
- s_affectsParentBlock = isFloatingOrOutOfFlowPositioned()
- && (!newStyle.isFloating() && !newStyle.hasOutOfFlowPosition())
- && parent() && (parent()->isRenderBlockFlow() || parent()->isRenderInline());
-
s_noLongerAffectsParentBlock = ((!isFloating() && newStyle.isFloating()) || (!isOutOfFlowPositioned() && newStyle.hasOutOfFlowPosition()))
&& parent() && parent()->isRenderBlock();
setHasOverflowClip(false);
setHasTransformRelatedProperty(false);
setHasReflection(false);
- } else {
- s_affectsParentBlock = false;
+ } else
s_noLongerAffectsParentBlock = false;
- }
bool newStyleSlowScroll = false;
if (newStyle.hasFixedBackgroundImage() && !settings().fixedBackgroundsPaintRelativeToDocument()) {
updateImage(oldStyle ? oldStyle->maskBoxImage().image() : nullptr, m_style.maskBoxImage().image());
updateShapeImage(oldStyle ? oldStyle->shapeOutside() : nullptr, m_style.shapeOutside());
- if (s_affectsParentBlock) {
+ bool affectsParentBlock = oldStyle && (oldStyle->isFloating() || oldStyle->hasOutOfFlowPosition())
+ && !style().isFloating() && !style().hasOutOfFlowPosition()
+ && parent() && (parent()->isRenderBlockFlow() || parent()->isRenderInline());
+ if (affectsParentBlock) {
// We have gone from not affecting the inline status of the parent flow to suddenly
// having an impact. See if there is a mismatch between the parent flow's
// childrenInline() state and our state.