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

Side by Side Diff: third_party/WebKit/Source/core/paint/FragmentData.h

Issue 2844803007: Introduce FragmentData, and put ObjectPaintProperties into it. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FragmentData_h
6 #define FragmentData_h
7
8 #include "core/paint/ObjectPaintProperties.h"
9
10 namespace blink {
11
12 class ObjectPaintProperties;
13
14 // Represents the data for a particular fragment of a LayoutObject.
15 // Only LayoutObjects with a self-painting PaintLayer may have more than one
16 // FragmentDeta, and even then only when they are inside of multicol.
17 // See README.md.
18 class FragmentData {
19 public:
20 static std::unique_ptr<FragmentData> Create() {
21 return WTF::WrapUnique(new FragmentData());
22 }
23
24 ObjectPaintProperties* PaintProperties() const {
25 return paint_properties_.get();
26 }
27 ObjectPaintProperties& EnsurePaintProperties();
28 void ClearPaintProperties();
29
30 FragmentData* NextFragment() { return next_fragment_.get(); }
31
32 private:
33 // Holds references to the paint property nodes created by this object.
34 std::unique_ptr<ObjectPaintProperties> paint_properties_;
35
36 std::unique_ptr<FragmentData> next_fragment_;
37 };
38
39 } // namespace blink
40
41 #endif // FragmentData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698