Index: Source/core/layout/LayoutObject.cpp |
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp |
index 6ddea1c970ff66b203ede634690f88b51eb529ca..53278ec708b66359f5084139d2a5b7478f3a6675 100644 |
--- a/Source/core/layout/LayoutObject.cpp |
+++ b/Source/core/layout/LayoutObject.cpp |
@@ -138,6 +138,7 @@ struct SameSizeAsLayoutObject { |
unsigned m_bitfields2; |
LayoutRect rect; // Stores the previous paint invalidation rect. |
LayoutPoint position; // Stores the previous position from the paint invalidation container. |
+ LayoutPoint paintOffset; // DO NOT COMMIT until https://codereview.chromium.org/1315213002 lands and we can remove this. |
}; |
static_assert(sizeof(LayoutObject) == sizeof(SameSizeAsLayoutObject), "LayoutObject should stay small"); |
@@ -3188,6 +3189,18 @@ void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& pai |
m_bitfields.setShouldInvalidateSelection(false); |
} |
+const LayoutPoint& LayoutObject::cachedPaintOffset() const |
+{ |
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
+ return m_cachedPaintOffset; |
+} |
+ |
+void LayoutObject::updateCachedPaintOffset(const LayoutPoint& paintOffset) const |
+{ |
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
+ m_cachedPaintOffset = paintOffset; |
+} |
+ |
bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document) |
{ |
return DeprecatedDisableModifyLayoutTreeStructureAsserts::canModifyLayoutTreeStateInAnyState() |