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

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

Issue 2724543002: Renamed deviceScaleFactor() to deviceScaleFactorDeprecated() in Page (Closed)
Patch Set: Rebase Created 3 years, 9 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 context.setStrokeThickness(1.0f); 63 context.setStrokeThickness(1.0f);
64 context.setFillColor(Color::transparent); 64 context.setFillColor(Color::transparent);
65 context.drawRect(largerCorner); 65 context.drawRect(largerCorner);
66 } 66 }
67 } 67 }
68 68
69 void ScrollableAreaPainter::drawPlatformResizerImage( 69 void ScrollableAreaPainter::drawPlatformResizerImage(
70 GraphicsContext& context, 70 GraphicsContext& context,
71 IntRect resizerCornerRect) { 71 IntRect resizerCornerRect) {
72 float oldDeviceScaleFactor = 72 float oldDeviceScaleFactor =
73 blink::deviceScaleFactor(getScrollableArea().box().frame()); 73 blink::deviceScaleFactorDeprecated(getScrollableArea().box().frame());
74 // |blink::deviceScaleFactor| returns different values between MAC (2 or 1) 74 // |blink::deviceScaleFactor| returns different values between MAC (2 or 1)
75 // and other platforms (always 1). For this reason we cannot hardcode the 75 // and other platforms (always 1). For this reason we cannot hardcode the
76 // value of 1 in the call for |windowToViewportScalar|. Since zoom-for-dsf is 76 // value of 1 in the call for |windowToViewportScalar|. Since zoom-for-dsf is
77 // disabled on MAC, |windowToViewportScalar| will be a no-op on it. 77 // disabled on MAC, |windowToViewportScalar| will be a no-op on it.
78 float deviceScaleFactor = 78 float deviceScaleFactor =
79 getScrollableArea().getHostWindow()->windowToViewportScalar( 79 getScrollableArea().getHostWindow()->windowToViewportScalar(
80 oldDeviceScaleFactor); 80 oldDeviceScaleFactor);
81 81
82 RefPtr<Image> resizeCornerImage; 82 RefPtr<Image> resizeCornerImage;
83 IntSize cornerResizerSize; 83 IntSize cornerResizerSize;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 LayoutObjectDrawingRecorder recorder(context, getScrollableArea().box(), 264 LayoutObjectDrawingRecorder recorder(context, getScrollableArea().box(),
265 DisplayItem::kScrollbarCorner, absRect); 265 DisplayItem::kScrollbarCorner, absRect);
266 context.fillRect(absRect, Color::white); 266 context.fillRect(absRect, Color::white);
267 } 267 }
268 268
269 PaintLayerScrollableArea& ScrollableAreaPainter::getScrollableArea() const { 269 PaintLayerScrollableArea& ScrollableAreaPainter::getScrollableArea() const {
270 return *m_scrollableArea; 270 return *m_scrollableArea;
271 } 271 }
272 272
273 } // namespace blink 273 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/FramePainter.cpp ('k') | third_party/WebKit/Source/web/DevToolsEmulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698