OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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/ObjectPaintProperties.h" | 5 #include "core/paint/ObjectPaintProperties.h" |
6 | 6 |
7 namespace blink { | 7 namespace blink { |
8 | 8 |
9 ObjectPaintProperties::PropertyTreeStateWithOffset | 9 PropertyTreeState ObjectPaintProperties::contentsProperties() const { |
10 ObjectPaintProperties::contentsProperties() const { | 10 PropertyTreeState properties = *localBorderBoxProperties(); |
11 ObjectPaintProperties::PropertyTreeStateWithOffset propertiesWithOffset = | |
12 *localBorderBoxProperties(); | |
13 | 11 |
14 if (scrollTranslation()) | 12 if (scrollTranslation()) |
15 propertiesWithOffset.propertyTreeState.setTransform(scrollTranslation()); | 13 properties.setTransform(scrollTranslation()); |
16 | 14 |
17 if (scroll()) | 15 if (scroll()) |
18 propertiesWithOffset.propertyTreeState.setScroll(scroll()); | 16 properties.setScroll(scroll()); |
19 | 17 |
20 if (overflowClip()) | 18 if (overflowClip()) |
21 propertiesWithOffset.propertyTreeState.setClip(overflowClip()); | 19 properties.setClip(overflowClip()); |
22 else if (cssClip()) | 20 else if (cssClip()) |
23 propertiesWithOffset.propertyTreeState.setClip(cssClip()); | 21 properties.setClip(cssClip()); |
24 | 22 |
25 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. | 23 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. |
26 | 24 |
27 return propertiesWithOffset; | 25 return properties; |
28 } | 26 } |
29 | 27 |
30 } // namespace blink | 28 } // namespace blink |
OLD | NEW |