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

Side by Side Diff: third_party/WebKit/Source/core/paint/RarePaintData.cpp

Issue 2811023002: Move LayoutBoxModelObject's PaintLayer member to rare paint data (Closed)
Patch Set: Minor cleanup 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/RarePaintData.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/RarePaintData.h" 5 #include "core/paint/RarePaintData.h"
6 6
7 #include "core/paint/ObjectPaintProperties.h" 7 #include "core/paint/ObjectPaintProperties.h"
8 #include "core/paint/PaintLayer.h"
8 9
9 namespace blink { 10 namespace blink {
10 11
11 RarePaintData::RarePaintData() {} 12 RarePaintData::RarePaintData() {}
12 13
13 RarePaintData::~RarePaintData() {} 14 RarePaintData::~RarePaintData() {}
14 15
16 void RarePaintData::SetLayer(std::unique_ptr<PaintLayer> layer) {
17 layer_ = std::move(layer);
18 };
19
15 ObjectPaintProperties& RarePaintData::EnsurePaintProperties() { 20 ObjectPaintProperties& RarePaintData::EnsurePaintProperties() {
16 if (!paint_properties_) 21 if (!paint_properties_)
17 paint_properties_ = ObjectPaintProperties::Create(); 22 paint_properties_ = ObjectPaintProperties::Create();
18 return *paint_properties_.get(); 23 return *paint_properties_.get();
19 } 24 }
20 25
21 void RarePaintData::ClearLocalBorderBoxProperties() { 26 void RarePaintData::ClearLocalBorderBoxProperties() {
22 local_border_box_properties_ = nullptr; 27 local_border_box_properties_ = nullptr;
23 } 28 }
24 29
(...skipping 15 matching lines...) Expand all
40 else if (paint_properties_->CssClip()) 45 else if (paint_properties_->CssClip())
41 contents.SetClip(paint_properties_->CssClip()); 46 contents.SetClip(paint_properties_->CssClip());
42 } 47 }
43 48
44 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. 49 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow.
45 50
46 return contents; 51 return contents;
47 } 52 }
48 53
49 } // namespace blink 54 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/RarePaintData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698