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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2657863004: Move scroll paint property nodes to be owned by the transform tree (Closed)
Patch Set: Rebase & remove parens Created 3 years, 11 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/paint/PaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index aeccb6ceb4c45b4e08eecaa0b338cad7114955e3..162dba32b6183e8b0deb73e4ab29ff2b4d503dc2 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -116,7 +116,7 @@ static LayoutRect mapLocalRectToPaintInvalidationBacking(
} else {
PropertyTreeState currentTreeState(
context.treeBuilderContext.current.transform,
- context.treeBuilderContext.current.clip, nullptr, nullptr);
+ context.treeBuilderContext.current.clip, nullptr);
result = LayoutRect(geometryMapper.sourceToDestinationVisualRect(
FloatRect(rect), currentTreeState, *containerContentsProperties));
}
@@ -245,11 +245,14 @@ class ScopedUndoFrameViewContentClipAndScroll {
if (frameView.contentClip() == m_savedContext.clip)
m_treeBuilderContext.current.clip = m_savedContext.clip->parent();
- if (frameView.scroll() == m_savedContext.scroll)
- m_treeBuilderContext.current.scroll = m_savedContext.scroll->parent();
- if (frameView.scrollTranslation() == m_savedContext.transform)
- m_treeBuilderContext.current.transform =
- m_savedContext.transform->parent();
+ if (const auto* scrollTranslation = frameView.scrollTranslation()) {
+ if (scrollTranslation->scrollNode() == m_savedContext.scroll)
+ m_treeBuilderContext.current.scroll = m_savedContext.scroll->parent();
+ if (scrollTranslation == m_savedContext.transform) {
+ m_treeBuilderContext.current.transform =
+ m_savedContext.transform->parent();
+ }
+ }
}
~ScopedUndoFrameViewContentClipAndScroll() {
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698