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

Unified Diff: third_party/WebKit/Source/core/paint/PrePaintTreeWalk.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/PrePaintTreeWalk.cpp
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
index 3286c5641fe8d8d3d7be6e9171b7f25271eb7a63..3cc8cc1208933e5c5ff79ece7e85c47243cfdc71 100644
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
@@ -153,22 +153,22 @@ void PrePaintTreeWalk::invalidatePaintLayerOptimizationsIfNeeded(
context.ancestorTransformedOrRootPaintLayer = &paintLayer;
}
- const ObjectPaintProperties& ancestorPaintProperties =
- *context.ancestorTransformedOrRootPaintLayer->layoutObject()
- .paintProperties();
- PropertyTreeState ancestorState =
- *ancestorPaintProperties.localBorderBoxProperties();
+ const auto& ancestor =
+ context.ancestorTransformedOrRootPaintLayer->layoutObject();
+ PropertyTreeState ancestorState = *ancestor.localBorderBoxProperties();
#ifdef CHECK_CLIP_RECTS
ShouldRespectOverflowClipType respectOverflowClip = RespectOverflowClip;
#endif
if (context.ancestorTransformedOrRootPaintLayer->compositingState() ==
- PaintsIntoOwnBacking &&
- ancestorPaintProperties.overflowClip()) {
- ancestorState.setClip(ancestorPaintProperties.overflowClip());
+ PaintsIntoOwnBacking) {
+ const auto* ancestorProperties = ancestor.paintProperties();
+ if (ancestorProperties && ancestorProperties->overflowClip()) {
+ ancestorState.setClip(ancestorProperties->overflowClip());
#ifdef CHECK_CLIP_RECTS
- respectOverflowClip = IgnoreOverflowClip;
+ respectOverflowClip = IgnoreOverflowClip;
#endif
+ }
}
#ifdef CHECK_CLIP_RECTS

Powered by Google App Engine
This is Rietveld 408576698