| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |