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

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

Issue 2782343002: Store local border box property cache outside ObjectPaintProperties (Closed)
Patch Set: Created 3 years, 9 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/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index aabe1c5f5f715dabeeb6687319411f2a189aab07..3aabe89bf89c461eb4ea98e67854cdc78f2e7ac3 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -336,20 +336,22 @@ bool PaintLayer::sticksToViewport() const {
// An option for improving this is to cache the nearest scroll node in
// the local border box properties.
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- const auto* viewProperties = layoutObject().view()->paintProperties();
+ const auto* viewBorderBoxProperties =
+ layoutObject().view()->localBorderBoxProperties();
const ScrollPaintPropertyNode* ancestorTargetScrollNode;
if (layoutObject().style()->position() == EPosition::kFixed) {
- ancestorTargetScrollNode = viewProperties->localBorderBoxProperties()
- ->transform()
- ->findEnclosingScrollNode();
+ ancestorTargetScrollNode =
+ viewBorderBoxProperties->transform()->findEnclosingScrollNode();
} else {
- ancestorTargetScrollNode = viewProperties->contentsProperties()
+ ancestorTargetScrollNode = layoutObject()
+ .view()
+ ->contentsProperties()
->transform()
->findEnclosingScrollNode();
}
- const auto* properties = layoutObject().paintProperties();
- const auto* transform = properties->localBorderBoxProperties()->transform();
+ const auto* transform =
+ layoutObject().localBorderBoxProperties()->transform();
return transform->findEnclosingScrollNode() == ancestorTargetScrollNode;
}

Powered by Google App Engine
This is Rietveld 408576698