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

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

Issue 1318603005: Revert of Replace pinch scrollbars with regular scrollbars. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/frame/VisualViewport.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 GraphicsLayer* containerLayer() 81 GraphicsLayer* containerLayer()
82 { 82 {
83 return m_innerViewportContainerLayer.get(); 83 return m_innerViewportContainerLayer.get();
84 } 84 }
85 GraphicsLayer* scrollLayer() 85 GraphicsLayer* scrollLayer()
86 { 86 {
87 return m_innerViewportScrollLayer.get(); 87 return m_innerViewportScrollLayer.get();
88 } 88 }
89 89
90 void initializeScrollbars();
91
92 // Sets the location of the visual viewport relative to the outer viewport. The 90 // Sets the location of the visual viewport relative to the outer viewport. The
93 // coordinates are in partial CSS pixels. 91 // coordinates are in partial CSS pixels.
94 void setLocation(const FloatPoint&); 92 void setLocation(const FloatPoint&);
95 // FIXME: This should be called moveBy 93 // FIXME: This should be called moveBy
96 void move(const FloatPoint&); 94 void move(const FloatPoint&);
97 void move(const FloatSize&); 95 void move(const FloatSize&);
98 FloatPoint location() const { return m_offset; } 96 FloatPoint location() const { return m_offset; }
99 97
100 // Sets the size of the inner viewport when unscaled in CSS pixels. 98 // Sets the size of the inner viewport when unscaled in CSS pixels.
101 void setSize(const IntSize&); 99 void setSize(const IntSize&);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 void setScrollOffset(const IntPoint&, ScrollType) override; 188 void setScrollOffset(const IntPoint&, ScrollType) override;
191 void setScrollOffset(const DoublePoint&, ScrollType) override; 189 void setScrollOffset(const DoublePoint&, ScrollType) override;
192 GraphicsLayer* layerForContainer() const override; 190 GraphicsLayer* layerForContainer() const override;
193 GraphicsLayer* layerForScrolling() const override; 191 GraphicsLayer* layerForScrolling() const override;
194 GraphicsLayer* layerForHorizontalScrollbar() const override; 192 GraphicsLayer* layerForHorizontalScrollbar() const override;
195 GraphicsLayer* layerForVerticalScrollbar() const override; 193 GraphicsLayer* layerForVerticalScrollbar() const override;
196 194
197 private: 195 private:
198 explicit VisualViewport(FrameHost&); 196 explicit VisualViewport(FrameHost&);
199 197
200 bool visualViewportSuppliesScrollbars() const;
201
202 // GraphicsLayerClient implementation. 198 // GraphicsLayerClient implementation.
203 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect& inClip) override; 199 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect& inClip) override;
204 String debugName(const GraphicsLayer*) override; 200 String debugName(const GraphicsLayer*) override;
205 201
206 void setupScrollbar(WebScrollbar::Orientation); 202 void setupScrollbar(WebScrollbar::Orientation);
207 FloatPoint clampOffsetToBoundaries(const FloatPoint&); 203 FloatPoint clampOffsetToBoundaries(const FloatPoint&);
208 204
209 LocalFrame* mainFrame() const; 205 LocalFrame* mainFrame() const;
210 206
211 FrameHost& frameHost() const 207 FrameHost& frameHost() const
(...skipping 16 matching lines...) Expand all
228 // Offset of the visual viewport from the main frame's origin, in CSS pixels . 224 // Offset of the visual viewport from the main frame's origin, in CSS pixels .
229 FloatPoint m_offset; 225 FloatPoint m_offset;
230 float m_scale; 226 float m_scale;
231 IntSize m_size; 227 IntSize m_size;
232 float m_topControlsAdjustment; 228 float m_topControlsAdjustment;
233 }; 229 };
234 230
235 } // namespace blink 231 } // namespace blink
236 232
237 #endif // VisualViewport_h 233 #endif // VisualViewport_h
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/frame/VisualViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698