| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ScrollableAreaPainter.h" | 5 #include "core/paint/ScrollableAreaPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutView.h" | 7 #include "core/layout/LayoutView.h" |
| 8 #include "core/page/Page.h" | 8 #include "core/page/Page.h" |
| 9 #include "core/paint/LayoutObjectDrawingRecorder.h" | 9 #include "core/paint/LayoutObjectDrawingRecorder.h" |
| 10 #include "core/paint/ObjectPaintProperties.h" | 10 #include "core/paint/ObjectPaintProperties.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 DisplayItem::kClipLayerOverflowControls, clipRect); | 159 DisplayItem::kClipLayerOverflowControls, clipRect); |
| 160 | 160 |
| 161 { | 161 { |
| 162 Optional<ScopedPaintChunkProperties> scopedTransformProperty; | 162 Optional<ScopedPaintChunkProperties> scopedTransformProperty; |
| 163 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 163 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 164 const auto* objectProperties = | 164 const auto* objectProperties = |
| 165 getScrollableArea().box().paintProperties(); | 165 getScrollableArea().box().paintProperties(); |
| 166 if (objectProperties && objectProperties->scrollbarPaintOffset()) { | 166 if (objectProperties && objectProperties->scrollbarPaintOffset()) { |
| 167 PaintChunkProperties properties( | 167 PaintChunkProperties properties( |
| 168 context.getPaintController().currentPaintChunkProperties()); | 168 context.getPaintController().currentPaintChunkProperties()); |
| 169 properties.transform = objectProperties->scrollbarPaintOffset(); | 169 properties.propertyTreeState.setTransform( |
| 170 objectProperties->scrollbarPaintOffset()); |
| 170 scopedTransformProperty.emplace( | 171 scopedTransformProperty.emplace( |
| 171 context.getPaintController(), getScrollableArea().box(), | 172 context.getPaintController(), getScrollableArea().box(), |
| 172 DisplayItem::kScrollOverflowControls, properties); | 173 DisplayItem::kScrollOverflowControls, properties); |
| 173 } | 174 } |
| 174 } | 175 } |
| 175 if (getScrollableArea().horizontalScrollbar() && | 176 if (getScrollableArea().horizontalScrollbar() && |
| 176 !getScrollableArea().layerForHorizontalScrollbar()) { | 177 !getScrollableArea().layerForHorizontalScrollbar()) { |
| 177 TransformRecorder translateRecorder( | 178 TransformRecorder translateRecorder( |
| 178 context, *getScrollableArea().horizontalScrollbar(), | 179 context, *getScrollableArea().horizontalScrollbar(), |
| 179 AffineTransform::translation(adjustedPaintOffset.x(), | 180 AffineTransform::translation(adjustedPaintOffset.x(), |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 LayoutObjectDrawingRecorder recorder(context, getScrollableArea().box(), | 255 LayoutObjectDrawingRecorder recorder(context, getScrollableArea().box(), |
| 255 DisplayItem::kScrollbarCorner, absRect); | 256 DisplayItem::kScrollbarCorner, absRect); |
| 256 context.fillRect(absRect, Color::white); | 257 context.fillRect(absRect, Color::white); |
| 257 } | 258 } |
| 258 | 259 |
| 259 PaintLayerScrollableArea& ScrollableAreaPainter::getScrollableArea() const { | 260 PaintLayerScrollableArea& ScrollableAreaPainter::getScrollableArea() const { |
| 260 return *m_scrollableArea; | 261 return *m_scrollableArea; |
| 261 } | 262 } |
| 262 | 263 |
| 263 } // namespace blink | 264 } // namespace blink |
| OLD | NEW |