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

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

Issue 2728253002: Remove indirection: setup scrollbar scroll layers in the scrollbar constructor (Closed)
Patch Set: Really fix reivewer comment 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;
48 } 47 }
49 48
50 namespace blink { 49 namespace blink {
51 50
52 class FrameHost; 51 class FrameHost;
53 class GraphicsContext; 52 class GraphicsContext;
54 class GraphicsLayer; 53 class GraphicsLayer;
55 class IntRect; 54 class IntRect;
56 class IntSize; 55 class IntSize;
57 class LocalFrame; 56 class LocalFrame;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Sets scale and location in one operation, preventing intermediate clamping. 112 // Sets scale and location in one operation, preventing intermediate clamping.
114 void setScaleAndLocation(float scale, const FloatPoint& location); 113 void setScaleAndLocation(float scale, const FloatPoint& location);
115 void setScale(float); 114 void setScale(float);
116 float scale() const { return m_scale; } 115 float scale() const { return m_scale; }
117 116
118 // Update scale factor, magnifying or minifying by magnifyDelta, centered 117 // Update scale factor, magnifying or minifying by magnifyDelta, centered
119 // around the point specified by anchor in window coordinates. Returns false 118 // around the point specified by anchor in window coordinates. Returns false
120 // if page scale factor is left unchanged. 119 // if page scale factor is left unchanged.
121 bool magnifyScaleAroundAnchor(float magnifyDelta, const FloatPoint& anchor); 120 bool magnifyScaleAroundAnchor(float magnifyDelta, const FloatPoint& anchor);
122 121
123 void setScrollLayerOnScrollbars(WebLayer*) const;
124
125 // The portion of the unzoomed frame visible in the visual viewport, 122 // The portion of the unzoomed frame visible in the visual viewport,
126 // in partial CSS pixels. Relative to the main frame. 123 // in partial CSS pixels. Relative to the main frame.
127 FloatRect visibleRect() const; 124 FloatRect visibleRect() const;
128 125
129 // The viewport rect relative to the document origin, in partial CSS pixels. 126 // The viewport rect relative to the document origin, in partial CSS pixels.
130 FloatRect visibleRectInDocument() const; 127 FloatRect visibleRectInDocument() const;
131 128
132 // Convert the given rect in the main FrameView's coordinates into a rect 129 // Convert the given rect in the main FrameView's coordinates into a rect
133 // in the viewport. The given and returned rects are in CSS pixels, meaning 130 // in the viewport. The given and returned rects are in CSS pixels, meaning
134 // scale isn't applied. 131 // scale isn't applied.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 float m_scale; 262 float m_scale;
266 IntSize m_size; 263 IntSize m_size;
267 float m_browserControlsAdjustment; 264 float m_browserControlsAdjustment;
268 float m_maxPageScale; 265 float m_maxPageScale;
269 bool m_trackPinchZoomStatsForPage; 266 bool m_trackPinchZoomStatsForPage;
270 }; 267 };
271 268
272 } // namespace blink 269 } // namespace blink
273 270
274 #endif // VisualViewport_h 271 #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