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

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

Issue 1316163002: Make the LayoutRect->FloatRect constructor explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "core/paint/ScrollableAreaPainter.h" 6 #include "core/paint/ScrollableAreaPainter.h"
7 7
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/page/Page.h" 9 #include "core/page/Page.h"
10 #include "core/paint/DeprecatedPaintLayer.h" 10 #include "core/paint/DeprecatedPaintLayer.h"
(...skipping 22 matching lines...) Expand all
33 ScrollbarPainter::paintIntoRect(scrollableArea().resizer(), context, pai ntOffset, LayoutRect(absRect)); 33 ScrollbarPainter::paintIntoRect(scrollableArea().resizer(), context, pai ntOffset, LayoutRect(absRect));
34 return; 34 return;
35 } 35 }
36 36
37 if (!RuntimeEnabledFeatures::slimmingPaintEnabled() && !absRect.intersects(d amageRect)) 37 if (!RuntimeEnabledFeatures::slimmingPaintEnabled() && !absRect.intersects(d amageRect))
38 return; 38 return;
39 39
40 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, scroll ableArea().box(), DisplayItem::Resizer)) 40 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, scroll ableArea().box(), DisplayItem::Resizer))
41 return; 41 return;
42 42
43 LayoutObjectDrawingRecorder recorder(*context, scrollableArea().box(), Displ ayItem::Resizer, absRect); 43 LayoutObjectDrawingRecorder recorder(*context, scrollableArea().box(), Displ ayItem::Resizer, LayoutRect(absRect));
jbroman 2015/08/26 21:45:09 ditto
chrishtr 2015/08/26 22:32:21 Done.
44 44
45 drawPlatformResizerImage(context, absRect); 45 drawPlatformResizerImage(context, absRect);
46 46
47 // Draw a frame around the resizer (1px grey line) if there are any scrollba rs present. 47 // Draw a frame around the resizer (1px grey line) if there are any scrollba rs present.
48 // Clipping will exclude the right and bottom edges of this frame. 48 // Clipping will exclude the right and bottom edges of this frame.
49 if (!scrollableArea().hasOverlayScrollbars() && scrollableArea().hasScrollba r()) { 49 if (!scrollableArea().hasOverlayScrollbars() && scrollableArea().hasScrollba r()) {
50 GraphicsContextStateSaver stateSaver(*context); 50 GraphicsContextStateSaver stateSaver(*context);
51 context->clip(absRect); 51 context->clip(absRect);
52 IntRect largerCorner = absRect; 52 IntRect largerCorner = absRect;
53 largerCorner.setSize(IntSize(largerCorner.width() + 1, largerCorner.heig ht() + 1)); 53 largerCorner.setSize(IntSize(largerCorner.width() + 1, largerCorner.heig ht() + 1));
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return; 188 return;
189 189
190 // We don't want to paint white if we have overlay scrollbars, since we need 190 // We don't want to paint white if we have overlay scrollbars, since we need
191 // to see what is behind it. 191 // to see what is behind it.
192 if (scrollableArea().hasOverlayScrollbars()) 192 if (scrollableArea().hasOverlayScrollbars())
193 return; 193 return;
194 194
195 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, scroll ableArea().box(), DisplayItem::ScrollbarCorner)) 195 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, scroll ableArea().box(), DisplayItem::ScrollbarCorner))
196 return; 196 return;
197 197
198 LayoutObjectDrawingRecorder recorder(*context, scrollableArea().box(), Displ ayItem::ScrollbarCorner, absRect); 198 LayoutObjectDrawingRecorder recorder(*context, scrollableArea().box(), Displ ayItem::ScrollbarCorner, LayoutRect(absRect));
jbroman 2015/08/26 21:45:09 ditto
chrishtr 2015/08/26 22:32:21 Done.
199 context->fillRect(absRect, Color::white); 199 context->fillRect(absRect, Color::white);
200 } 200 }
201 201
202 DeprecatedPaintLayerScrollableArea& ScrollableAreaPainter::scrollableArea() cons t 202 DeprecatedPaintLayerScrollableArea& ScrollableAreaPainter::scrollableArea() cons t
203 { 203 {
204 return *m_scrollableArea; 204 return *m_scrollableArea;
205 } 205 }
206 206
207 } // namespace blink 207 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698