diff --git a/source/layout/box.cpp b/source/layout/box.cpp index 14fea3d..8425805 100644 --- a/source/layout/box.cpp +++ b/source/layout/box.cpp @@ -183,7 +183,7 @@ BlockFlowBox* Box::createAnonymousBlock(const BoxStyle* parentStyle) bool Box::canContainFixedPositionedBoxes() const { - return (hasTransform() && isBlockBox()) || !parentBox(); + return (hasTransform() && isBlockBox()) || !parentBox() || isRunning(); } bool Box::canContainAbsolutePositionedBoxes() const diff --git a/source/layout/box.h b/source/layout/box.h index 4bb63e9..e4efd03 100644 --- a/source/layout/box.h +++ b/source/layout/box.h @@ -151,6 +151,7 @@ class Box : public HeapMember { bool isPositioned() const { return m_isPositioned; } bool isFloatingOrPositioned() const { return m_isFloating || m_isPositioned; } bool isReplaced() const { return m_isReplaced; } + bool isRunning() const { return m_isRunning; } bool isOverflowHidden() const { return m_isOverflowHidden; } bool isBackgroundStolen() const { return m_isBackgroundStolen; } bool isColumnSpanner() const { return m_isColumnSpanner; } @@ -162,6 +163,7 @@ class Box : public HeapMember { void setIsFloating(bool value) { m_isFloating = value; } void setIsPositioned(bool value) { m_isPositioned = value; } void setIsReplaced(bool value) { m_isReplaced = value; } + void setIsRunning(bool value) { m_isRunning = value; } void setIsOverflowHidden(bool value) { m_isOverflowHidden = value; } void setIsBackgroundStolen(bool value) { m_isBackgroundStolen = value; } void setIsColumnSpanner(bool value) { m_isColumnSpanner = value; } @@ -209,6 +211,7 @@ class Box : public HeapMember { bool m_isFloating : 1 {false}; bool m_isPositioned : 1 {false}; bool m_isReplaced : 1 {false}; + bool m_isRunning : 1 {false}; bool m_isOverflowHidden : 1 {false}; bool m_isBackgroundStolen : 1 {false}; bool m_isColumnSpanner : 1 {false}; diff --git a/source/layout/contentbox.cpp b/source/layout/contentbox.cpp index a39ca16..86b275c 100644 --- a/source/layout/contentbox.cpp +++ b/source/layout/contentbox.cpp @@ -108,6 +108,7 @@ void ContentBoxBuilder::addElement(const CSSValue& value) return; m_box->addChild(newBox); element.buildElementBox(m_counters, newBox); + newBox->setIsRunning(true); m_lastTextBox = nullptr; }