| 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 |
| 90 // Sets the location of the visual viewport relative to the outer viewport.
The | 92 // Sets the location of the visual viewport relative to the outer viewport.
The |
| 91 // coordinates are in partial CSS pixels. | 93 // coordinates are in partial CSS pixels. |
| 92 void setLocation(const FloatPoint&); | 94 void setLocation(const FloatPoint&); |
| 93 // FIXME: This should be called moveBy | 95 // FIXME: This should be called moveBy |
| 94 void move(const FloatPoint&); | 96 void move(const FloatPoint&); |
| 95 void move(const FloatSize&); | 97 void move(const FloatSize&); |
| 96 FloatPoint location() const { return m_offset; } | 98 FloatPoint location() const { return m_offset; } |
| 97 | 99 |
| 98 // Sets the size of the inner viewport when unscaled in CSS pixels. | 100 // Sets the size of the inner viewport when unscaled in CSS pixels. |
| 99 void setSize(const IntSize&); | 101 void setSize(const IntSize&); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 void setScrollOffset(const IntPoint&, ScrollType) override; | 190 void setScrollOffset(const IntPoint&, ScrollType) override; |
| 189 void setScrollOffset(const DoublePoint&, ScrollType) override; | 191 void setScrollOffset(const DoublePoint&, ScrollType) override; |
| 190 GraphicsLayer* layerForContainer() const override; | 192 GraphicsLayer* layerForContainer() const override; |
| 191 GraphicsLayer* layerForScrolling() const override; | 193 GraphicsLayer* layerForScrolling() const override; |
| 192 GraphicsLayer* layerForHorizontalScrollbar() const override; | 194 GraphicsLayer* layerForHorizontalScrollbar() const override; |
| 193 GraphicsLayer* layerForVerticalScrollbar() const override; | 195 GraphicsLayer* layerForVerticalScrollbar() const override; |
| 194 | 196 |
| 195 private: | 197 private: |
| 196 explicit VisualViewport(FrameHost&); | 198 explicit VisualViewport(FrameHost&); |
| 197 | 199 |
| 200 bool visualViewportSuppliesScrollbars() const; |
| 201 |
| 198 // GraphicsLayerClient implementation. | 202 // GraphicsLayerClient implementation. |
| 199 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& inClip) override; | 203 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& inClip) override; |
| 200 String debugName(const GraphicsLayer*) override; | 204 String debugName(const GraphicsLayer*) override; |
| 201 | 205 |
| 202 void setupScrollbar(WebScrollbar::Orientation); | 206 void setupScrollbar(WebScrollbar::Orientation); |
| 203 FloatPoint clampOffsetToBoundaries(const FloatPoint&); | 207 FloatPoint clampOffsetToBoundaries(const FloatPoint&); |
| 204 | 208 |
| 205 LocalFrame* mainFrame() const; | 209 LocalFrame* mainFrame() const; |
| 206 | 210 |
| 207 FrameHost& frameHost() const | 211 FrameHost& frameHost() const |
| (...skipping 16 matching lines...) Expand all Loading... |
| 224 // Offset of the visual viewport from the main frame's origin, in CSS pixels
. | 228 // Offset of the visual viewport from the main frame's origin, in CSS pixels
. |
| 225 FloatPoint m_offset; | 229 FloatPoint m_offset; |
| 226 float m_scale; | 230 float m_scale; |
| 227 IntSize m_size; | 231 IntSize m_size; |
| 228 float m_topControlsAdjustment; | 232 float m_topControlsAdjustment; |
| 229 }; | 233 }; |
| 230 | 234 |
| 231 } // namespace blink | 235 } // namespace blink |
| 232 | 236 |
| 233 #endif // VisualViewport_h | 237 #endif // VisualViewport_h |
| OLD | NEW |