| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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 #include "core/paint/ObjectPaintProperties.h" | |
| 6 | |
| 7 namespace blink { | |
| 8 | |
| 9 std::unique_ptr<PropertyTreeState> ObjectPaintProperties::contentsProperties( | |
| 10 PropertyTreeState* localBorderBoxProperties, | |
| 11 ObjectPaintProperties* paintProperties) { | |
| 12 if (!localBorderBoxProperties) | |
| 13 return nullptr; | |
| 14 | |
| 15 std::unique_ptr<PropertyTreeState> contents = | |
| 16 WTF::makeUnique<PropertyTreeState>(*localBorderBoxProperties); | |
| 17 | |
| 18 if (paintProperties) { | |
| 19 if (paintProperties->scrollTranslation()) | |
| 20 contents->setTransform(paintProperties->scrollTranslation()); | |
| 21 if (paintProperties->overflowClip()) | |
| 22 contents->setClip(paintProperties->overflowClip()); | |
| 23 else if (paintProperties->cssClip()) | |
| 24 contents->setClip(paintProperties->cssClip()); | |
| 25 } | |
| 26 | |
| 27 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. | |
| 28 | |
| 29 return contents; | |
| 30 } | |
| 31 | |
| 32 } // namespace blink | |
| OLD | NEW |