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

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: improve comment 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..e3af903e5c83267ddf3dfe3ca9f6c8382b6e92d5 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 scrollAnchorDisablingStyleChanged() { return m_bitfields.scrollAnchorDisablingStyleChanged(); }
+ void setScrollAnchorDisablingStyleChanged(bool changed) { m_bitfields.setScrollAnchorDisablingStyleChanged(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_scrollAnchorDisablingStyleChanged(false)
, m_hasBoxDecorationBackground(false)
, m_positionedState(IsStaticallyPositioned)
, m_selectionState(SelectionNone)
@@ -1876,6 +1880,12 @@ private:
ADD_BOOLEAN_BITFIELD(isBackgroundAttachmentFixedObject, IsBackgroundAttachmentFixedObject);
ADD_BOOLEAN_BITFIELD(isScrollAnchorObject, IsScrollAnchorObject);
+ // Whether changes in this LayoutObject's CSS properties since the last layout should
+ // suppress any adjustments that would be made during the next layout by ScrollAnchor
+ // objects for which this LayoutObject is on the path from the anchor node to the
+ // scroller. See http://bit.ly/sanaclap for more info.
+ ADD_BOOLEAN_BITFIELD(scrollAnchorDisablingStyleChanged, ScrollAnchorDisablingStyleChanged);
+
ADD_BOOLEAN_BITFIELD(hasBoxDecorationBackground, HasBoxDecorationBackground);
private:
@@ -2038,6 +2048,8 @@ inline void LayoutObject::clearNeedsLayout()
#if ENABLE(ASSERT)
checkBlockPositionedObjectsNeedLayout();
#endif
+
+ setScrollAnchorDisablingStyleChanged(false);
}
inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, SubtreeLayoutScope* layouter)

Powered by Google App Engine
This is Rietveld 408576698