| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |