Changeset 242683 in webkit
- Timestamp:
- Mar 9, 2019, 9:52:21 PM (7 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 added
- 2 edited
-
ChangeLog (modified) (1 diff)
-
resources/ui-helper.js (modified) (1 diff)
-
scrollingcoordinator/ios/ui-scroll-fixed-expected.html (added)
-
scrollingcoordinator/ios/ui-scroll-fixed.html (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r242682 r242683 1 2019-03-09 Simon Fraser <simon.fraser@apple.com> 2 3 Add a test for scrolling tree adjustment of fixed layers (r242601) 4 https://bugs.webkit.org/show_bug.cgi?id=195521 5 6 Reviewed by Sam Weinig. 7 8 This test sets the "unstable" scrolling state (as if the user is actively scrolling) and scrolls, 9 then changes style to trigger a scrolling tree commit with a changed offset for a fixed layer. 10 The test shows the wrong fixed layer position before r242601. 11 12 Helpers are added to UIHelper to do the scroll, and to wrap setTimeout in an async function. 13 Sadly we have to wait about 120ms for the scrollbars to fade out. 14 15 * resources/ui-helper.js: 16 (window.UIHelper.async.delayFor): 17 (window.UIHelper.async.immediateScrollTo): 18 (window.UIHelper.async.immediateUnstableScrollTo): 19 * scrollingcoordinator/ios/ui-scroll-fixed-expected.html: Added. 20 * scrollingcoordinator/ios/ui-scroll-fixed.html: Added. 21 1 22 2019-03-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 23 -
trunk/LayoutTests/resources/ui-helper.js
r242401 r242683 198 198 } 199 199 200 static async delayFor(ms) 201 { 202 return new Promise(resolve => setTimeout(resolve, ms)); 203 } 204 205 static async immediateScrollTo(x, y) 206 { 207 if (!this.isWebKit2()) { 208 window.scrollTo(x, y); 209 return Promise.resolve(); 210 } 211 212 await new Promise(resolve => { 213 testRunner.runUIScript(` 214 uiController.immediateScrollToOffset(${x}, ${y});`, resolve); 215 }); 216 } 217 218 static async immediateUnstableScrollTo(x, y) 219 { 220 if (!this.isWebKit2()) { 221 window.scrollTo(x, y); 222 return Promise.resolve(); 223 } 224 225 await new Promise(resolve => { 226 testRunner.runUIScript(` 227 uiController.stableStateOverride = false; 228 uiController.immediateScrollToOffset(${x}, ${y});`, resolve); 229 }); 230 } 231 200 232 static ensureVisibleContentRectUpdate() 201 233 {
Note:
See TracChangeset
for help on using the changeset viewer.