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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 2844803007: Introduce FragmentData, and put ObjectPaintProperties into it. (Closed)
Patch Set: none Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/core/paint/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index c726bbd57bde6cceff589c250d78bf944f2a1b3f..bf835100e529d9293a66ec31c967dfc670bba7c5 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1810,7 +1810,9 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
// The following non-const functions for ObjectPaintProperties should only
// be called from PaintPropertyTreeBuilder.
ObjectPaintProperties& EnsurePaintProperties() {
- return layout_object_.EnsureRarePaintData().EnsurePaintProperties();
+ return layout_object_.EnsureRarePaintData()
+ .EnsureFragment()
+ .EnsurePaintProperties();
}
ObjectPaintProperties* PaintProperties() {
if (auto* paint_data = layout_object_.GetRarePaintData())
@@ -1818,8 +1820,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
return nullptr;
}
void ClearPaintProperties() {
- if (auto* paint_data = layout_object_.GetRarePaintData())
- paint_data->ClearPaintProperties();
+ if (auto* paint_data = layout_object_.GetRarePaintData()) {
+ if (auto* fragment = paint_data->Fragment())
+ fragment->ClearPaintProperties();
+ }
}
// The following non-const functions for local border box properties should
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698