Changeset 242773 in webkit
- Timestamp:
- Mar 11, 2019 9:59:35 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r242763 r242773 1 2019-03-11 Simon Fraser <simon.fraser@apple.com> 2 3 Add testing API to hit-test and scroll overflow scrollers 4 https://bugs.webkit.org/show_bug.cgi?id=195278 5 6 Reviewed by Antti Koivisto. 7 8 The test loads a scaled page with accelerated overflow:scroll, and hit-tests 9 near the top-left and bottom-right corners to test the point conversion logic. 10 11 * scrollingcoordinator/ios/scroll-element-at-point-expected.txt: Added. 12 * scrollingcoordinator/ios/scroll-element-at-point.html: Added. 13 1 14 2019-03-11 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/Tools/ChangeLog
r242762 r242773 1 2019-03-11 Simon Fraser <simon.fraser@apple.com> 2 3 Add testing API to hit-test and scroll overflow scrollers 4 https://bugs.webkit.org/show_bug.cgi?id=195278 5 6 Reviewed by Antti Koivisto. 7 8 Add UIScriptController::immediateScrollElementAtContentPointToOffset() to enable 9 testing of the view hit-testing code path, and immediate scrolling of overflow:scroll. 10 11 Tests: scrollingcoordinator/ios/scroll-element-at-point.html 12 13 * DumpRenderTree/ios/UIScriptControllerIOS.mm: 14 (WTR::UIScriptController::immediateScrollElementAtContentPointToOffset): 15 * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: 16 * TestRunnerShared/UIScriptContext/UIScriptController.cpp: 17 (WTR::UIScriptController::immediateScrollElementAtContentPointToOffset): 18 * TestRunnerShared/UIScriptContext/UIScriptController.h: 19 * WebKitTestRunner/ios/UIScriptControllerIOS.mm: 20 (WTR::enclosingScrollViewIncludingSelf): 21 (WTR::UIScriptController::immediateScrollElementAtContentPointToOffset): 22 1 23 2019-03-11 Tim Horton <timothy_horton@apple.com> 2 24 -
trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm
r242069 r242773 249 249 } 250 250 251 void UIScriptController::immediateScrollElementAtContentPointToOffset(long x, long y, long xScrollOffset, long yScrollOffset) 252 { 253 } 254 251 255 void UIScriptController::immediateZoomToScale(double scale) 252 256 { -
trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
r242069 r242773 53 53 // Interaction. 54 54 // These functions post events asynchronously. The callback is fired when the events have been dispatched, but any 55 // resulting behavior may also be asynchronous. 55 // resulting behavior may also be asynchronous. Points are in "global" (WKWebView) coordinates. 56 56 void touchDownAtPoint(long x, long y, long touchCount, object callback); 57 57 void liftUpAtPoint(long x, long y, long touchCount, object callback); … … 251 251 void immediateZoomToScale(double scale); // Set the zoom scale in the UI process without animation. 252 252 253 // Find the scroller for the given point in content ("absolute") coordinates, and do an immediate scroll. 254 void immediateScrollElementAtContentPointToOffset(long x, long y, long xOffset, long yOffset); 255 253 256 // View state 254 257 readonly attribute double zoomScale; -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
r242069 r242773 394 394 } 395 395 396 void UIScriptController::immediateScrollElementAtContentPointToOffset(long x, long y, long xScrollOffset, long yScrollOffset) 397 { 398 } 399 396 400 void UIScriptController::immediateZoomToScale(double scale) 397 401 { -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
r242069 r242773 129 129 130 130 void immediateScrollToOffset(long x, long y); 131 void immediateScrollElementAtContentPointToOffset(long x, long y, long xScrollOffset, long yScrollOffset); 131 132 void immediateZoomToScale(double scale); 132 133 -
trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm
r241971 r242773 559 559 } 560 560 561 static UIScrollView *enclosingScrollViewIncludingSelf(UIView *view) 562 { 563 do { 564 if ([view isKindOfClass:[UIScrollView self]]) 565 return static_cast<UIScrollView *>(view); 566 } while ((view = [view superview])); 567 568 return nil; 569 } 570 571 void UIScriptController::immediateScrollElementAtContentPointToOffset(long x, long y, long xScrollOffset, long yScrollOffset) 572 { 573 UIView *contentView = platformContentView(); 574 UIView *hitView = [contentView hitTest:CGPointMake(x, y) withEvent:nil]; 575 UIScrollView *enclosingScrollView = enclosingScrollViewIncludingSelf(hitView); 576 [enclosingScrollView setContentOffset:CGPointMake(xScrollOffset, yScrollOffset)]; 577 } 578 561 579 void UIScriptController::immediateZoomToScale(double scale) 562 580 {
Note: See TracChangeset
for help on using the changeset viewer.