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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 2250523003: Implement SANACLAP (http://bit.ly/sanaclap). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kill AnchorPoint Created 4 years, 4 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: third_party/WebKit/Source/core/layout/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index d0d231ec9312fbfbf1a1bd3c54fdb8f852592751..a0e501ef0796e979fec87f7b34074e7583661a0b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1417,6 +1417,9 @@ public:
// Clears the IsScrollAnchorObject bit, unless any ScrollAnchor still refers to us.
void maybeClearIsScrollAnchorObject();
+ bool hasLayoutAffectingStyleChanged() { return m_bitfields.hasLayoutAffectingStyleChanged(); }
ojan 2016/08/16 23:54:32 <bikeshed>This name might be too general. It's not
skobes 2016/08/17 18:50:32 Done.
+ void setHasLayoutAffectingStyleChanged(bool changed) { m_bitfields.setHasLayoutAffectingStyleChanged(changed); }
+
void clearChildNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setChildNeedsOverflowRecalcAfterStyleChange(false); }
bool compositedScrollsWithRespectTo(const LayoutBoxModelObject& paintInvalidationContainer) const;
@@ -1738,6 +1741,7 @@ private:
, m_previousBackgroundObscured(false)
, m_isBackgroundAttachmentFixedObject(false)
, m_isScrollAnchorObject(false)
+ , m_hasLayoutAffectingStyleChanged(false)
, m_hasBoxDecorationBackground(false)
, m_positionedState(IsStaticallyPositioned)
, m_selectionState(SelectionNone)
@@ -1876,6 +1880,11 @@ private:
ADD_BOOLEAN_BITFIELD(isBackgroundAttachmentFixedObject, IsBackgroundAttachmentFixedObject);
ADD_BOOLEAN_BITFIELD(isScrollAnchorObject, IsScrollAnchorObject);
+ // This bit is used for scroll anchoring. It indicates whether this LayoutObject has
+ // changed the value of one or more CSS properties that may affect its position.
+ // See http://bit.ly/sanaclap for more info.
+ ADD_BOOLEAN_BITFIELD(hasLayoutAffectingStyleChanged, HasLayoutAffectingStyleChanged);
+
ADD_BOOLEAN_BITFIELD(hasBoxDecorationBackground, HasBoxDecorationBackground);
private:
@@ -2038,6 +2047,8 @@ inline void LayoutObject::clearNeedsLayout()
#if ENABLE(ASSERT)
checkBlockPositionedObjectsNeedLayout();
#endif
+
+ setHasLayoutAffectingStyleChanged(false);
}
inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, SubtreeLayoutScope* layouter)

Powered by Google App Engine
This is Rietveld 408576698