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

Unified Diff: third_party/WebKit/Source/core/paint/FragmentData.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/FragmentData.h
diff --git a/third_party/WebKit/Source/core/paint/FragmentData.h b/third_party/WebKit/Source/core/paint/FragmentData.h
new file mode 100644
index 0000000000000000000000000000000000000000..8951c3211dc9368fe926015ec3c54cdd90e26938
--- /dev/null
+++ b/third_party/WebKit/Source/core/paint/FragmentData.h
@@ -0,0 +1,41 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef FragmentData_h
+#define FragmentData_h
+
+#include "core/paint/ObjectPaintProperties.h"
+
+namespace blink {
+
+class ObjectPaintProperties;
+
+// Represents the data for a particular fragment of a LayoutObject.
+// Only LayoutObjects with a self-painting PaintLayer may have more than one
+// FragmentDeta, and even then only when they are inside of multicol.
+// See README.md.
+class CORE_EXPORT FragmentData {
+ public:
+ static std::unique_ptr<FragmentData> Create() {
+ return WTF::WrapUnique(new FragmentData());
+ }
+
+ ObjectPaintProperties* PaintProperties() const {
+ return paint_properties_.get();
+ }
+ ObjectPaintProperties& EnsurePaintProperties();
+ void ClearPaintProperties();
+
+ FragmentData* NextFragment() { return next_fragment_.get(); }
+
+ private:
+ // Holds references to the paint property nodes created by this object.
+ std::unique_ptr<ObjectPaintProperties> paint_properties_;
+
+ std::unique_ptr<FragmentData> next_fragment_;
+};
+
+} // namespace blink
+
+#endif // FragmentData_h
« no previous file with comments | « third_party/WebKit/Source/core/paint/BUILD.gn ('k') | third_party/WebKit/Source/core/paint/FragmentData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698