| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 | 151 |
| 152 // This check is required to avoid painting custom CSS scrollbars twice. | 152 // This check is required to avoid painting custom CSS scrollbars twice. |
| 153 if (paintingOverlayControls && !getScrollableArea().hasOverlayScrollbars()) | 153 if (paintingOverlayControls && !getScrollableArea().hasOverlayScrollbars()) |
| 154 return; | 154 return; |
| 155 | 155 |
| 156 { | 156 { |
| 157 Optional<ScopedPaintChunkProperties> scopedTransformProperty; | 157 Optional<ScopedPaintChunkProperties> scopedTransformProperty; |
| 158 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 158 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 159 const auto* objectProperties = | 159 const auto* objectProperties = |
| 160 getScrollableArea().box().objectPaintProperties(); | 160 getScrollableArea().box().paintProperties(); |
| 161 if (objectProperties && objectProperties->scrollbarPaintOffset()) { | 161 if (objectProperties && objectProperties->scrollbarPaintOffset()) { |
| 162 PaintChunkProperties properties( | 162 PaintChunkProperties properties( |
| 163 context.getPaintController().currentPaintChunkProperties()); | 163 context.getPaintController().currentPaintChunkProperties()); |
| 164 properties.transform = objectProperties->scrollbarPaintOffset(); | 164 properties.transform = objectProperties->scrollbarPaintOffset(); |
| 165 scopedTransformProperty.emplace( | 165 scopedTransformProperty.emplace( |
| 166 context.getPaintController(), getScrollableArea().box(), | 166 context.getPaintController(), getScrollableArea().box(), |
| 167 DisplayItem::kScrollOverflowControls, properties); | 167 DisplayItem::kScrollOverflowControls, properties); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 if (getScrollableArea().horizontalScrollbar() && | 170 if (getScrollableArea().horizontalScrollbar() && |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 LayoutObjectDrawingRecorder recorder(context, getScrollableArea().box(), | 249 LayoutObjectDrawingRecorder recorder(context, getScrollableArea().box(), |
| 250 DisplayItem::kScrollbarCorner, absRect); | 250 DisplayItem::kScrollbarCorner, absRect); |
| 251 context.fillRect(absRect, Color::white); | 251 context.fillRect(absRect, Color::white); |
| 252 } | 252 } |
| 253 | 253 |
| 254 PaintLayerScrollableArea& ScrollableAreaPainter::getScrollableArea() const { | 254 PaintLayerScrollableArea& ScrollableAreaPainter::getScrollableArea() const { |
| 255 return *m_scrollableArea; | 255 return *m_scrollableArea; |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace blink | 258 } // namespace blink |
| OLD | NEW |