| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 class WebLayerScrollClient; | 53 class WebLayerScrollClient; |
| 54 struct WebFloatPoint; | 54 struct WebFloatPoint; |
| 55 struct WebLayerPositionConstraint; | 55 struct WebLayerPositionConstraint; |
| 56 struct WebLayerStickyPositionConstraint; | 56 struct WebLayerStickyPositionConstraint; |
| 57 | 57 |
| 58 class WebLayer { | 58 class WebLayer { |
| 59 public: | 59 public: |
| 60 virtual ~WebLayer() {} | 60 virtual ~WebLayer() {} |
| 61 | 61 |
| 62 // Returns a positive ID that will be unique across all WebLayers allocated in
this process. | 62 // Returns a positive ID that will be unique across all WebLayers allocated in |
| 63 // this process. |
| 63 virtual int id() const = 0; | 64 virtual int id() const = 0; |
| 64 | 65 |
| 65 // Sets a region of the layer as invalid, i.e. needs to update its content. | 66 // Sets a region of the layer as invalid, i.e. needs to update its content. |
| 66 virtual void invalidateRect(const WebRect&) = 0; | 67 virtual void invalidateRect(const WebRect&) = 0; |
| 67 | 68 |
| 68 // Sets the entire layer as invalid, i.e. needs to update its content. | 69 // Sets the entire layer as invalid, i.e. needs to update its content. |
| 69 virtual void invalidate() = 0; | 70 virtual void invalidate() = 0; |
| 70 | 71 |
| 71 // These functions do not take ownership of the WebLayer* parameter. | 72 // These functions do not take ownership of the WebLayer* parameter. |
| 72 virtual void addChild(WebLayer*) = 0; | 73 virtual void addChild(WebLayer*) = 0; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 155 |
| 155 // A layer will not respect any clips established by layers between it and | 156 // A layer will not respect any clips established by layers between it and |
| 156 // its nearest clipping ancestor. Note, the clip parent must be an ancestor. | 157 // its nearest clipping ancestor. Note, the clip parent must be an ancestor. |
| 157 // This is not a requirement of the scroll parent. | 158 // This is not a requirement of the scroll parent. |
| 158 virtual void setClipParent(WebLayer*) = 0; | 159 virtual void setClipParent(WebLayer*) = 0; |
| 159 | 160 |
| 160 // Scrolling | 161 // Scrolling |
| 161 virtual void setScrollPositionDouble(WebDoublePoint) = 0; | 162 virtual void setScrollPositionDouble(WebDoublePoint) = 0; |
| 162 virtual WebDoublePoint scrollPositionDouble() const = 0; | 163 virtual WebDoublePoint scrollPositionDouble() const = 0; |
| 163 | 164 |
| 164 // To set a WebLayer as scrollable we must specify the corresponding clip laye
r. | 165 // To set a WebLayer as scrollable we must specify the corresponding clip |
| 166 // layer. |
| 165 virtual void setScrollClipLayer(WebLayer*) = 0; | 167 virtual void setScrollClipLayer(WebLayer*) = 0; |
| 166 virtual bool scrollable() const = 0; | 168 virtual bool scrollable() const = 0; |
| 167 virtual void setUserScrollable(bool horizontal, bool vertical) = 0; | 169 virtual void setUserScrollable(bool horizontal, bool vertical) = 0; |
| 168 virtual bool userScrollableHorizontal() const = 0; | 170 virtual bool userScrollableHorizontal() const = 0; |
| 169 virtual bool userScrollableVertical() const = 0; | 171 virtual bool userScrollableVertical() const = 0; |
| 170 | 172 |
| 171 // Indicates that this layer will always scroll on the main thread for the pro
vided reason. | 173 // Indicates that this layer will always scroll on the main thread for the |
| 174 // provided reason. |
| 172 virtual void addMainThreadScrollingReasons(uint32_t) = 0; | 175 virtual void addMainThreadScrollingReasons(uint32_t) = 0; |
| 173 virtual void clearMainThreadScrollingReasons( | 176 virtual void clearMainThreadScrollingReasons( |
| 174 uint32_t mainThreadScrollingReasonsToClear) = 0; | 177 uint32_t mainThreadScrollingReasonsToClear) = 0; |
| 175 virtual uint32_t mainThreadScrollingReasons() = 0; | 178 virtual uint32_t mainThreadScrollingReasons() = 0; |
| 176 virtual bool shouldScrollOnMainThread() const = 0; | 179 virtual bool shouldScrollOnMainThread() const = 0; |
| 177 | 180 |
| 178 virtual void setNonFastScrollableRegion(const WebVector<WebRect>&) = 0; | 181 virtual void setNonFastScrollableRegion(const WebVector<WebRect>&) = 0; |
| 179 virtual WebVector<WebRect> nonFastScrollableRegion() const = 0; | 182 virtual WebVector<WebRect> nonFastScrollableRegion() const = 0; |
| 180 | 183 |
| 181 virtual void setTouchEventHandlerRegion(const WebVector<WebRect>&) = 0; | 184 virtual void setTouchEventHandlerRegion(const WebVector<WebRect>&) = 0; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 217 |
| 215 virtual void setCompositorMutableProperties(uint32_t) = 0; | 218 virtual void setCompositorMutableProperties(uint32_t) = 0; |
| 216 virtual uint32_t compositorMutableProperties() const = 0; | 219 virtual uint32_t compositorMutableProperties() const = 0; |
| 217 | 220 |
| 218 virtual void setHasWillChangeTransformHint(bool) = 0; | 221 virtual void setHasWillChangeTransformHint(bool) = 0; |
| 219 }; | 222 }; |
| 220 | 223 |
| 221 } // namespace blink | 224 } // namespace blink |
| 222 | 225 |
| 223 #endif // WebLayer_h | 226 #endif // WebLayer_h |
| OLD | NEW |