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

Side by Side Diff: third_party/WebKit/Source/core/frame/VisualViewport.h

Issue 2743653003: Revert of Remove indirection: setup scrollbar scroll layers in the scrollbar constructor (Closed)
Patch Set: 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 #include "platform/geometry/FloatSize.h" 37 #include "platform/geometry/FloatSize.h"
38 #include "platform/geometry/IntSize.h" 38 #include "platform/geometry/IntSize.h"
39 #include "platform/graphics/GraphicsLayerClient.h" 39 #include "platform/graphics/GraphicsLayerClient.h"
40 #include "platform/scroll/ScrollableArea.h" 40 #include "platform/scroll/ScrollableArea.h"
41 #include "public/platform/WebScrollbar.h" 41 #include "public/platform/WebScrollbar.h"
42 #include "public/platform/WebSize.h" 42 #include "public/platform/WebSize.h"
43 #include <memory> 43 #include <memory>
44 44
45 namespace blink { 45 namespace blink {
46 class WebScrollbarLayer; 46 class WebScrollbarLayer;
47 class WebLayer;
47 } 48 }
48 49
49 namespace blink { 50 namespace blink {
50 51
51 class FrameHost; 52 class FrameHost;
52 class GraphicsContext; 53 class GraphicsContext;
53 class GraphicsLayer; 54 class GraphicsLayer;
54 class IntRect; 55 class IntRect;
55 class IntSize; 56 class IntSize;
56 class LocalFrame; 57 class LocalFrame;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Sets scale and location in one operation, preventing intermediate clamping. 113 // Sets scale and location in one operation, preventing intermediate clamping.
113 void setScaleAndLocation(float scale, const FloatPoint& location); 114 void setScaleAndLocation(float scale, const FloatPoint& location);
114 void setScale(float); 115 void setScale(float);
115 float scale() const { return m_scale; } 116 float scale() const { return m_scale; }
116 117
117 // Update scale factor, magnifying or minifying by magnifyDelta, centered 118 // Update scale factor, magnifying or minifying by magnifyDelta, centered
118 // around the point specified by anchor in window coordinates. Returns false 119 // around the point specified by anchor in window coordinates. Returns false
119 // if page scale factor is left unchanged. 120 // if page scale factor is left unchanged.
120 bool magnifyScaleAroundAnchor(float magnifyDelta, const FloatPoint& anchor); 121 bool magnifyScaleAroundAnchor(float magnifyDelta, const FloatPoint& anchor);
121 122
123 void setScrollLayerOnScrollbars(WebLayer*) const;
124
122 // The portion of the unzoomed frame visible in the visual viewport, 125 // The portion of the unzoomed frame visible in the visual viewport,
123 // in partial CSS pixels. Relative to the main frame. 126 // in partial CSS pixels. Relative to the main frame.
124 FloatRect visibleRect() const; 127 FloatRect visibleRect() const;
125 128
126 // The viewport rect relative to the document origin, in partial CSS pixels. 129 // The viewport rect relative to the document origin, in partial CSS pixels.
127 FloatRect visibleRectInDocument() const; 130 FloatRect visibleRectInDocument() const;
128 131
129 // Convert the given rect in the main FrameView's coordinates into a rect 132 // Convert the given rect in the main FrameView's coordinates into a rect
130 // in the viewport. The given and returned rects are in CSS pixels, meaning 133 // in the viewport. The given and returned rects are in CSS pixels, meaning
131 // scale isn't applied. 134 // scale isn't applied.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 float m_scale; 265 float m_scale;
263 IntSize m_size; 266 IntSize m_size;
264 float m_browserControlsAdjustment; 267 float m_browserControlsAdjustment;
265 float m_maxPageScale; 268 float m_maxPageScale;
266 bool m_trackPinchZoomStatsForPage; 269 bool m_trackPinchZoomStatsForPage;
267 }; 270 };
268 271
269 } // namespace blink 272 } // namespace blink
270 273
271 #endif // VisualViewport_h 274 #endif // VisualViewport_h
OLDNEW
« no previous file with comments | « cc/layers/solid_color_scrollbar_layer.cc ('k') | third_party/WebKit/Source/core/frame/VisualViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698