| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 virtual void setScrollParent(WebLayer*) = 0; | 148 virtual void setScrollParent(WebLayer*) = 0; |
| 149 | 149 |
| 150 // A layer will not respect any clips established by layers between it and | 150 // A layer will not respect any clips established by layers between it and |
| 151 // its nearest clipping ancestor. Note, the clip parent must be an ancestor. | 151 // its nearest clipping ancestor. Note, the clip parent must be an ancestor. |
| 152 // This is not a requirement of the scroll parent. | 152 // This is not a requirement of the scroll parent. |
| 153 virtual void setClipParent(WebLayer*) = 0; | 153 virtual void setClipParent(WebLayer*) = 0; |
| 154 | 154 |
| 155 // Scrolling | 155 // Scrolling |
| 156 virtual void setScrollPositionDouble(WebDoublePoint) = 0; | 156 virtual void setScrollPositionDouble(WebDoublePoint) = 0; |
| 157 virtual WebDoublePoint scrollPositionDouble() const = 0; | 157 virtual WebDoublePoint scrollPositionDouble() const = 0; |
| 158 // Blink tells cc the scroll offset through setScrollPositionDouble() using | |
| 159 // floating precision but it currently can only position cc layers at intege
r | |
| 160 // boundary. So Blink needs to also call setScrollCompensationAdjustment() | |
| 161 // to tell cc what's the part of the scroll offset that Blink doesn't handle | |
| 162 // but cc needs to take into consideration, e.g. compensating | |
| 163 // for fixed-position layer that's positioned in Blink using only integer sc
roll | |
| 164 // offset. | |
| 165 // We make this call explicit, instead of letting cc to infer the fractional
part | |
| 166 // from the scroll offset, to be clear that this is Blink's limitation. Once | |
| 167 // Blink can fully handle fractional scroll offset, it can stop calling | |
| 168 // this function and cc side would just work. | |
| 169 virtual void setScrollCompensationAdjustment(WebDoublePoint) = 0; | |
| 170 | 158 |
| 171 // To set a WebLayer as scrollable we must specify the corresponding clip la
yer. | 159 // To set a WebLayer as scrollable we must specify the corresponding clip la
yer. |
| 172 virtual void setScrollClipLayer(WebLayer*) = 0; | 160 virtual void setScrollClipLayer(WebLayer*) = 0; |
| 173 virtual bool scrollable() const = 0; | 161 virtual bool scrollable() const = 0; |
| 174 virtual void setUserScrollable(bool horizontal, bool vertical) = 0; | 162 virtual void setUserScrollable(bool horizontal, bool vertical) = 0; |
| 175 virtual bool userScrollableHorizontal() const = 0; | 163 virtual bool userScrollableHorizontal() const = 0; |
| 176 virtual bool userScrollableVertical() const = 0; | 164 virtual bool userScrollableVertical() const = 0; |
| 177 | 165 |
| 178 // Indicates that this layer will always scroll on the main thread for the p
rovided reason. | 166 // Indicates that this layer will always scroll on the main thread for the p
rovided reason. |
| 179 virtual void addMainThreadScrollingReasons(uint32_t) = 0; | 167 virtual void addMainThreadScrollingReasons(uint32_t) = 0; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 virtual void setElementId(uint64_t) = 0; | 209 virtual void setElementId(uint64_t) = 0; |
| 222 virtual uint64_t elementId() const = 0; | 210 virtual uint64_t elementId() const = 0; |
| 223 | 211 |
| 224 virtual void setCompositorMutableProperties(uint32_t) = 0; | 212 virtual void setCompositorMutableProperties(uint32_t) = 0; |
| 225 virtual uint32_t compositorMutableProperties() const = 0; | 213 virtual uint32_t compositorMutableProperties() const = 0; |
| 226 }; | 214 }; |
| 227 | 215 |
| 228 } // namespace blink | 216 } // namespace blink |
| 229 | 217 |
| 230 #endif // WebLayer_h | 218 #endif // WebLayer_h |
| OLD | NEW |