Chromium Code Reviews| 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 void ObjectPaintProperties::getContentsProperties(GeometryPropertyTreeState& pro perties) const | 9 void ObjectPaintProperties::getContentsPropertyTreeState(GeometryPropertyTreeSta te& state, LayoutPoint& paintOffsetFromState) const |
| 10 { | 10 { |
| 11 properties = localBorderBoxProperties()->geometryPropertyTreeState; | 11 state = localBorderBoxProperties()->geometryPropertyTreeState; |
| 12 if (scrollTranslation()) | 12 if (svgLocalToBorderBoxTransform()) { |
| 13 properties.transform = scrollTranslation(); | 13 state.transform = svgLocalToBorderBoxTransform(); |
| 14 else if (svgLocalToBorderBoxTransform()) | 14 // No paint offset from the state because svgLocalToBorderTransform |
|
pdr.
2016/09/29 23:31:54
nit: svgLocalToBorderBoxTransform
| |
| 15 properties.transform = svgLocalToBorderBoxTransform(); | 15 // embeds the paint offset in it. |
| 16 paintOffsetFromState = LayoutPoint(); | |
| 17 } else { | |
| 18 if (scrollTranslation()) | |
| 19 state.transform = scrollTranslation(); | |
| 20 paintOffsetFromState = localBorderBoxProperties()->paintOffset; | |
| 21 } | |
| 16 | 22 |
| 17 if (overflowClip()) | 23 if (overflowClip()) |
| 18 properties.clip = overflowClip(); | 24 state.clip = overflowClip(); |
| 19 else if (cssClip()) | 25 else if (cssClip()) |
| 20 properties.clip = cssClip(); | 26 state.clip = cssClip(); |
| 21 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. | 27 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. |
| 22 } | 28 } |
| 23 | 29 |
| 24 } // namespace blink | 30 } // namespace blink |
| OLD | NEW |