| 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 PropertyTreeState ObjectPaintProperties::contentsProperties() const { | 9 void ObjectPaintProperties::updateContentsProperties() const { |
| 10 PropertyTreeState properties = *localBorderBoxProperties(); | 10 DCHECK(m_localBorderBoxProperties); |
| 11 DCHECK(!m_contentsProperties); |
| 12 |
| 13 m_contentsProperties = |
| 14 WTF::makeUnique<PropertyTreeState>(*m_localBorderBoxProperties); |
| 11 | 15 |
| 12 if (scrollTranslation()) | 16 if (scrollTranslation()) |
| 13 properties.setTransform(scrollTranslation()); | 17 m_contentsProperties->setTransform(scrollTranslation()); |
| 14 | 18 |
| 15 if (scroll()) | 19 if (scroll()) |
| 16 properties.setScroll(scroll()); | 20 m_contentsProperties->setScroll(scroll()); |
| 17 | 21 |
| 18 if (overflowClip()) | 22 if (overflowClip()) |
| 19 properties.setClip(overflowClip()); | 23 m_contentsProperties->setClip(overflowClip()); |
| 20 else if (cssClip()) | 24 else if (cssClip()) |
| 21 properties.setClip(cssClip()); | 25 m_contentsProperties->setClip(cssClip()); |
| 22 | 26 |
| 23 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. | 27 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. |
| 24 | |
| 25 return properties; | |
| 26 } | 28 } |
| 27 | 29 |
| 28 } // namespace blink | 30 } // namespace blink |
| OLD | NEW |