Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1782)

Unified Diff: Source/core/rendering/RenderObject.h

Issue 203463007: Recompute overflow after transform changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 904bf8ffd7d1dfa8e33655c996413c57f9af6b12..152c6e23f85045f59fa071f06e2f5e9a0526eea5 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -565,6 +565,10 @@ public:
bool preferredLogicalWidthsDirty() const { return m_bitfields.preferredLogicalWidthsDirty(); }
+ bool needsOverflowRecalcAfterStyleChange() const { return m_bitfields.selfNeedsOverflowRecalcAfterStyleChange() || m_bitfields.childNeedsOverflowRecalcAfterStyleChange(); }
+ bool selfNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.selfNeedsOverflowRecalcAfterStyleChange(); }
+ bool childNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.childNeedsOverflowRecalcAfterStyleChange(); }
+
bool isSelectionBorder() const;
bool hasClip() const { return isOutOfFlowPositioned() && style()->hasClip(); }
@@ -634,7 +638,6 @@ public:
void clearNeedsLayout();
void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayoutScope* = 0);
void setNeedsPositionedMovementLayout();
- void setNeedsSimplifiedNormalFlowLayout();
void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockChain);
void clearPreferredLogicalWidthsDirty();
void invalidateContainerPreferredLogicalWidths();
@@ -1011,6 +1014,9 @@ public:
bool shouldDisableLayoutState() const { return hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode(); }
+ void setNeedsOverflowRecalcAfterStyleChange();
+ void markContainingBlocksForOverflowRecalc();
+
protected:
inline bool layerCreationAllowedForSubtree() const;
@@ -1128,6 +1134,8 @@ private:
, m_needsSimplifiedNormalFlowLayout(false)
, m_preferredLogicalWidthsDirty(false)
, m_floating(false)
+ , m_selfNeedsOverflowRecalcAfterStyleChange(false)
+ , m_childNeedsOverflowRecalcAfterStyleChange(false)
, m_isAnonymous(!node)
, m_isText(false)
, m_isBox(false)
@@ -1165,6 +1173,8 @@ private:
ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNormalFlowLayout);
ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidthsDirty);
ADD_BOOLEAN_BITFIELD(floating, Floating);
+ ADD_BOOLEAN_BITFIELD(selfNeedsOverflowRecalcAfterStyleChange, SelfNeedsOverflowRecalcAfterStyleChange);
+ ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, ChildNeedsOverflowRecalcAfterStyleChange);
ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous);
ADD_BOOLEAN_BITFIELD(isText, IsText);
@@ -1233,6 +1243,8 @@ private:
void setIsDragging(bool b) { m_bitfields.setIsDragging(b); }
void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); }
void setShouldRepaintOverflow(bool b) { m_bitfields.setShouldRepaintOverflow(b); }
+ void setSelfNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setSelfNeedsOverflowRecalcAfterStyleChange(b); }
+ void setChildNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setChildNeedsOverflowRecalcAfterStyleChange(b); }
private:
// Store state between styleWillChange and styleDidChange
@@ -1334,18 +1346,6 @@ inline void RenderObject::setNeedsPositionedMovementLayout()
}
}
-inline void RenderObject::setNeedsSimplifiedNormalFlowLayout()
-{
- bool alreadyNeededLayout = needsSimplifiedNormalFlowLayout();
- setNeedsSimplifiedNormalFlowLayout(true);
- ASSERT(!isSetNeedsLayoutForbidden());
- if (!alreadyNeededLayout) {
- markContainingBlocksForLayout();
- if (hasLayer())
- setLayerNeedsFullRepaint();
- }
-}
-
inline bool RenderObject::preservesNewline() const
{
if (isSVGInlineText())

Powered by Google App Engine
This is Rietveld 408576698