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