| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef VisualViewport_h | 31 #ifndef VisualViewport_h |
| 32 #define VisualViewport_h | 32 #define VisualViewport_h |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "platform/geometry/FloatPoint.h" | 35 #include "platform/geometry/FloatPoint.h" |
| 36 #include "platform/geometry/FloatRect.h" | 36 #include "platform/geometry/FloatRect.h" |
| 37 #include "platform/geometry/IntSize.h" | 37 #include "platform/geometry/IntSize.h" |
| 38 #include "platform/graphics/GraphicsLayerClient.h" | 38 #include "platform/graphics/GraphicsLayerClient.h" |
| 39 #include "platform/scroll/ScrollableArea.h" | 39 #include "platform/scroll/ScrollableArea.h" |
| 40 #include "public/platform/WebScrollbar.h" | |
| 41 #include "public/platform/WebSize.h" | 40 #include "public/platform/WebSize.h" |
| 42 #include "wtf/OwnPtr.h" | 41 #include "wtf/OwnPtr.h" |
| 43 #include "wtf/PassOwnPtr.h" | 42 #include "wtf/PassOwnPtr.h" |
| 44 | 43 |
| 45 namespace blink { | 44 namespace blink { |
| 46 class WebLayerTreeView; | 45 class WebLayerTreeView; |
| 47 class WebScrollbarLayer; | |
| 48 } | 46 } |
| 49 | 47 |
| 50 namespace blink { | 48 namespace blink { |
| 51 | 49 |
| 52 class FrameHost; | 50 class FrameHost; |
| 53 class GraphicsContext; | 51 class GraphicsContext; |
| 54 class GraphicsLayer; | 52 class GraphicsLayer; |
| 55 class GraphicsLayerFactory; | 53 class GraphicsLayerFactory; |
| 56 class IntRect; | 54 class IntRect; |
| 57 class IntSize; | 55 class IntSize; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 GraphicsLayer* layerForHorizontalScrollbar() const override; | 190 GraphicsLayer* layerForHorizontalScrollbar() const override; |
| 193 GraphicsLayer* layerForVerticalScrollbar() const override; | 191 GraphicsLayer* layerForVerticalScrollbar() const override; |
| 194 | 192 |
| 195 private: | 193 private: |
| 196 explicit VisualViewport(FrameHost&); | 194 explicit VisualViewport(FrameHost&); |
| 197 | 195 |
| 198 // GraphicsLayerClient implementation. | 196 // GraphicsLayerClient implementation. |
| 199 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& inClip) override; | 197 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain
tingPhase, const IntRect& inClip) override; |
| 200 String debugName(const GraphicsLayer*) override; | 198 String debugName(const GraphicsLayer*) override; |
| 201 | 199 |
| 202 void setupScrollbar(WebScrollbar::Orientation); | |
| 203 FloatPoint clampOffsetToBoundaries(const FloatPoint&); | 200 FloatPoint clampOffsetToBoundaries(const FloatPoint&); |
| 204 | 201 |
| 205 LocalFrame* mainFrame() const; | 202 LocalFrame* mainFrame() const; |
| 206 | 203 |
| 207 FrameHost& frameHost() const | 204 FrameHost& frameHost() const |
| 208 { | 205 { |
| 209 ASSERT(m_frameHost); | 206 ASSERT(m_frameHost); |
| 210 return *m_frameHost; | 207 return *m_frameHost; |
| 211 } | 208 } |
| 212 | 209 |
| 213 RawPtrWillBeMember<FrameHost> m_frameHost; | 210 RawPtrWillBeMember<FrameHost> m_frameHost; |
| 214 OwnPtr<GraphicsLayer> m_rootTransformLayer; | 211 OwnPtr<GraphicsLayer> m_rootTransformLayer; |
| 215 OwnPtr<GraphicsLayer> m_innerViewportContainerLayer; | 212 OwnPtr<GraphicsLayer> m_innerViewportContainerLayer; |
| 216 OwnPtr<GraphicsLayer> m_overscrollElasticityLayer; | 213 OwnPtr<GraphicsLayer> m_overscrollElasticityLayer; |
| 217 OwnPtr<GraphicsLayer> m_pageScaleLayer; | 214 OwnPtr<GraphicsLayer> m_pageScaleLayer; |
| 218 OwnPtr<GraphicsLayer> m_innerViewportScrollLayer; | 215 OwnPtr<GraphicsLayer> m_innerViewportScrollLayer; |
| 219 OwnPtr<GraphicsLayer> m_overlayScrollbarHorizontal; | |
| 220 OwnPtr<GraphicsLayer> m_overlayScrollbarVertical; | |
| 221 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarHorizontal; | |
| 222 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarVertical; | |
| 223 | 216 |
| 224 // Offset of the visual viewport from the main frame's origin, in CSS pixels
. | 217 // Offset of the visual viewport from the main frame's origin, in CSS pixels
. |
| 225 FloatPoint m_offset; | 218 FloatPoint m_offset; |
| 226 float m_scale; | 219 float m_scale; |
| 227 IntSize m_size; | 220 IntSize m_size; |
| 228 float m_topControlsAdjustment; | 221 float m_topControlsAdjustment; |
| 229 }; | 222 }; |
| 230 | 223 |
| 231 } // namespace blink | 224 } // namespace blink |
| 232 | 225 |
| 233 #endif // VisualViewport_h | 226 #endif // VisualViewport_h |
| OLD | NEW |