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

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

Issue 2782343002: Store local border box property cache outside ObjectPaintProperties (Closed)
Patch Set: Rebase 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 60b3765eb9acdeb320ecf1f18f69cff03ef69a41..9131455bd0b4388bcb0483b15e615f78e16e91eb 100644
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
@@ -135,22 +135,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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698