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

Unified Diff: third_party/WebKit/Source/core/paint/RarePaintData.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
Index: third_party/WebKit/Source/core/paint/RarePaintData.h
diff --git a/third_party/WebKit/Source/core/paint/RarePaintData.h b/third_party/WebKit/Source/core/paint/RarePaintData.h
index a80ac6daeff0460d5f2406d6a6b8347b67147bf2..93534730cfc7076b6d4e194f32808b4fe02df134 100644
--- a/third_party/WebKit/Source/core/paint/RarePaintData.h
+++ b/third_party/WebKit/Source/core/paint/RarePaintData.h
@@ -6,13 +6,13 @@
#define RarePaintData_h
#include "core/CoreExport.h"
+#include "core/paint/FragmentData.h"
#include "platform/wtf/Allocator.h"
#include "platform/wtf/Noncopyable.h"
namespace blink {
class PropertyTreeState;
-class ObjectPaintProperties;
class PaintLayer;
// This is for paint-related data on LayoutObject that is not needed on all
@@ -28,11 +28,15 @@ class CORE_EXPORT RarePaintData {
PaintLayer* Layer() { return layer_.get(); }
void SetLayer(std::unique_ptr<PaintLayer>);
+ FragmentData* Fragment() const { return fragment_data_.get(); }
+
+ FragmentData& EnsureFragment();
+
ObjectPaintProperties* PaintProperties() const {
- return paint_properties_.get();
+ if (fragment_data_)
+ return fragment_data_->PaintProperties();
+ return nullptr;
}
- ObjectPaintProperties& EnsurePaintProperties();
- void ClearPaintProperties();
PropertyTreeState* LocalBorderBoxProperties() const {
return local_border_box_properties_.get();
@@ -52,8 +56,7 @@ class CORE_EXPORT RarePaintData {
// depending on the return value of LayoutBoxModelObject::layerTypeRequired().
std::unique_ptr<PaintLayer> layer_;
- // Holds references to the paint property nodes created by this object.
- std::unique_ptr<ObjectPaintProperties> paint_properties_;
+ std::unique_ptr<FragmentData> fragment_data_;
// This is a complete set of property nodes that should be used as a
// starting point to paint a LayoutObject. This data is cached because some
« no previous file with comments | « third_party/WebKit/Source/core/paint/README.md ('k') | third_party/WebKit/Source/core/paint/RarePaintData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698