Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp

Issue 2116693002: PaintChunk::id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CommitOnTheWay
Patch Set: Address chrishtr's comments. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 if (paintingOverlayControls && !getScrollableArea().hasOverlayScrollbars()) 126 if (paintingOverlayControls && !getScrollableArea().hasOverlayScrollbars())
127 return; 127 return;
128 128
129 { 129 {
130 Optional<ScopedPaintChunkProperties> scopedTransformProperty; 130 Optional<ScopedPaintChunkProperties> scopedTransformProperty;
131 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 131 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
132 const auto* objectProperties = getScrollableArea().box().objectPaint Properties(); 132 const auto* objectProperties = getScrollableArea().box().objectPaint Properties();
133 if (objectProperties && objectProperties->scrollbarPaintOffset()) { 133 if (objectProperties && objectProperties->scrollbarPaintOffset()) {
134 PaintChunkProperties properties(context.getPaintController().cur rentPaintChunkProperties()); 134 PaintChunkProperties properties(context.getPaintController().cur rentPaintChunkProperties());
135 properties.transform = objectProperties->scrollbarPaintOffset(); 135 properties.transform = objectProperties->scrollbarPaintOffset();
136 scopedTransformProperty.emplace(context.getPaintController(), pr operties); 136 scopedTransformProperty.emplace(context.getPaintController(), ge tScrollableArea().box(), DisplayItem::ScrollOverflowControls, properties);
137 } 137 }
138 } 138 }
139 if (getScrollableArea().horizontalScrollbar() && !getScrollableArea().la yerForHorizontalScrollbar()) { 139 if (getScrollableArea().horizontalScrollbar() && !getScrollableArea().la yerForHorizontalScrollbar()) {
140 TransformRecorder translateRecorder(context, *getScrollableArea().ho rizontalScrollbar(), AffineTransform::translation(adjustedPaintOffset.x(), adjus tedPaintOffset.y())); 140 TransformRecorder translateRecorder(context, *getScrollableArea().ho rizontalScrollbar(), AffineTransform::translation(adjustedPaintOffset.x(), adjus tedPaintOffset.y()));
141 getScrollableArea().horizontalScrollbar()->paint(context, adjustedCu llRect); 141 getScrollableArea().horizontalScrollbar()->paint(context, adjustedCu llRect);
142 } 142 }
143 if (getScrollableArea().verticalScrollbar() && !getScrollableArea().laye rForVerticalScrollbar()) { 143 if (getScrollableArea().verticalScrollbar() && !getScrollableArea().laye rForVerticalScrollbar()) {
144 TransformRecorder translateRecorder(context, *getScrollableArea().ve rticalScrollbar(), AffineTransform::translation(adjustedPaintOffset.x(), adjuste dPaintOffset.y())); 144 TransformRecorder translateRecorder(context, *getScrollableArea().ve rticalScrollbar(), AffineTransform::translation(adjustedPaintOffset.x(), adjuste dPaintOffset.y()));
145 getScrollableArea().verticalScrollbar()->paint(context, adjustedCull Rect); 145 getScrollableArea().verticalScrollbar()->paint(context, adjustedCull Rect);
146 } 146 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 LayoutObjectDrawingRecorder recorder(context, getScrollableArea().box(), Dis playItem::ScrollbarCorner, absRect); 201 LayoutObjectDrawingRecorder recorder(context, getScrollableArea().box(), Dis playItem::ScrollbarCorner, absRect);
202 context.fillRect(absRect, Color::white); 202 context.fillRect(absRect, Color::white);
203 } 203 }
204 204
205 PaintLayerScrollableArea& ScrollableAreaPainter::getScrollableArea() const 205 PaintLayerScrollableArea& ScrollableAreaPainter::getScrollableArea() const
206 { 206 {
207 return *m_scrollableArea; 207 return *m_scrollableArea;
208 } 208 }
209 209
210 } // namespace blink 210 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698