Changeset 243241 in webkit
- Timestamp:
- Mar 20, 2019, 2:27:47 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
- 2 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt (modified) (1 diff)
-
LayoutTests/fast/events/ios/ipad/fast-click-always.html (modified) (2 diffs)
-
LayoutTests/fast/events/ios/ipad/fast-click-not-always-expected.txt (copied) (copied from trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt ) (1 diff)
-
LayoutTests/fast/events/ios/ipad/fast-click-not-always.html (copied) (copied from trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html ) (3 diffs)
-
LayoutTests/resources/ui-helper.js (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Shared/WebPreferences.yaml (modified) (1 diff)
-
Source/WebKit/Shared/WebPreferencesDefaultValues.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243239 r243241 1 2019-03-20 Dean Jackson <dino@apple.com> 2 3 [iOS] Enable fast clicking everywhere 4 https://bugs.webkit.org/show_bug.cgi?id=196023 5 <rdar://problem/49073589> 6 7 Reviewed by Wenson Hsieh. 8 9 Add a new test for the case where "Fast Clicks Everywhere" is explicitly 10 set to false. This required implementing a humanSpeedZoomByDoubleTappingAt 11 variation. 12 13 * fast/events/ios/ipad/fast-click-always-expected.txt: 14 * fast/events/ios/ipad/fast-click-always.html: 15 * fast/events/ios/ipad/fast-click-not-always-expected.txt: Added. 16 * fast/events/ios/ipad/fast-click-not-always.html: 17 * resources/ui-helper.js: 18 (window.UIHelper.humanSpeedZoomByDoubleTappingAt): New helper function that pauses between 19 double taps, and resolves when the zoom finishes. 20 1 21 2019-03-19 Ryosuke Niwa <rniwa@webkit.org> 2 22 -
trunk/LayoutTests/fast/events/ios/ipad/fast-click-always-expected.txt
r243015 r243241 1 1 PASS: Click fired on element with handler. 2 This document doesn't have fast clicks because it sets a viewport width. It has a significant zoom since the viewport width is significantly bigger than the body width. However, it sets fast click everywhere to on, sodouble tapping on the rectangle above should send a click event.2 This document doesn't have fast clicks because it sets a viewport width. It has a significant zoom since the viewport width is significantly bigger than the body width. However, since fast click everywhere is set to true, double tapping on the rectangle above should send a click event. -
trunk/LayoutTests/fast/events/ios/ipad/fast-click-always.html
r243015 r243241 1 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:FastClicksEverywhere=true] -->1 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> 2 2 3 3 <html> … … 50 50 <div id="description">This document doesn't have fast clicks because 51 51 it sets a viewport width. It has a significant zoom since the viewport 52 width is significantly bigger than the body width. However, it sets fast click everywhere to53 on, sodouble tapping on the rectangle above should send a click event.</div>52 width is significantly bigger than the body width. However, since fast click everywhere 53 is set to true, double tapping on the rectangle above should send a click event.</div> 54 54 </body> 55 55 </html> -
trunk/LayoutTests/fast/events/ios/ipad/fast-click-not-always-expected.txt
r243240 r243241 1 PASS: Click fired on element with handler.2 This document doesn't have fast clicks because it sets a viewport width. It has a significant zoom since the viewport width is significantly bigger than the body width. However, it sets fast click everywhere to on, so double tapping on the rectangle above should send a click event.1 PASS: Double tap caused zoom. 2 This document doesn't have fast clicks because it sets a viewport width. It has a significant zoom since the viewport width is significantly bigger than the body width. However, it sets fast click everywhere to false, so double tapping on the rectangle above should zoom. -
trunk/LayoutTests/fast/events/ios/ipad/fast-click-not-always.html
r243240 r243241 1 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:FastClicksEverywhere= true ] -->1 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:FastClicksEverywhere=false ] --> 2 2 3 3 <html> … … 26 26 if (!window.testRunner) 27 27 return; 28 await UIHelper.humanSpeedDoubleTapAt(30, 30); 28 29 await UIHelper.humanSpeedZoomByDoubleTappingAt(30, 30); 30 document.getElementById("target").textContent = "PASS: Double tap caused zoom."; 31 testRunner.notifyDone(); 29 32 } 30 33 31 34 function handleClick(event) 32 35 { 33 document.getElementById("target").textContent = " PASS: Click fired on element with handler.";36 document.getElementById("target").textContent = "FAIL: Click fired on element with handler."; 34 37 testRunner.notifyDone(); 35 38 } … … 51 54 it sets a viewport width. It has a significant zoom since the viewport 52 55 width is significantly bigger than the body width. However, it sets fast click everywhere to 53 on, so double tapping on the rectangle above should send a click event.</div>56 false, so double tapping on the rectangle above should zoom.</div> 54 57 </body> 55 58 </html> -
trunk/LayoutTests/resources/ui-helper.js
r242979 r243241 96 96 await new Promise(resolveAfterDelay => setTimeout(resolveAfterDelay, 120)); 97 97 await UIHelper.tapAt(x, y); 98 resolve(); 99 }); 100 } 101 102 static humanSpeedZoomByDoubleTappingAt(x, y) 103 { 104 console.assert(this.isIOS()); 105 106 if (!this.isWebKit2()) { 107 // FIXME: Add a sleep in here. 108 eventSender.addTouchPoint(x, y); 109 eventSender.touchStart(); 110 eventSender.releaseTouchPoint(0); 111 eventSender.touchEnd(); 112 eventSender.addTouchPoint(x, y); 113 eventSender.touchStart(); 114 eventSender.releaseTouchPoint(0); 115 eventSender.touchEnd(); 116 return Promise.resolve(); 117 } 118 119 return new Promise(async (resolve) => { 120 await UIHelper.tapAt(x, y); 121 await new Promise(resolveAfterDelay => setTimeout(resolveAfterDelay, 120)); 122 await new Promise((resolveAfterZoom) => { 123 testRunner.runUIScript(` 124 uiController.didEndZoomingCallback = () => { 125 uiController.didEndZoomingCallback = null; 126 uiController.uiScriptComplete(uiController.zoomScale); 127 }; 128 uiController.singleTapAtPoint(${x}, ${y}, () => {});`, resolveAfterZoom); 129 }); 98 130 resolve(); 99 131 }); -
trunk/Source/WebKit/ChangeLog
r243240 r243241 1 2019-03-20 Dean Jackson <dino@apple.com> 2 3 [iOS] Enable fast clicking everywhere 4 https://bugs.webkit.org/show_bug.cgi?id=196023 5 <rdar://problem/49073589> 6 7 Reviewed by Wenson Hsieh. 8 9 Set FastClicksEverywhere to on by default for iPhone & iPad. 10 11 * Shared/WebPreferences.yaml: 12 * Shared/WebPreferencesDefaultValues.h: 13 1 14 2019-03-20 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WebKit/Shared/WebPreferences.yaml
r243181 r243241 1504 1504 FastClicksEverywhere: 1505 1505 type: bool 1506 defaultValue: false1506 defaultValue: DEFAULT_FAST_CLICKS_EVERYWHERE 1507 1507 condition: PLATFORM(IOS_FAMILY) 1508 1508 humanReadableName: "Fast clicks everywhere" -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h
r242814 r243241 252 252 #define DEFAULT_DOM_PASTE_ACCESS_REQUESTS_ENABLED false 253 253 #endif 254 255 #if PLATFORM(IOS_FAMILY) 256 #if PLATFORM(WATCHOS) 257 #define DEFAULT_FAST_CLICKS_EVERYWHERE false 258 #else 259 #define DEFAULT_FAST_CLICKS_EVERYWHERE true 260 #endif 261 #endif
Note:
See TracChangeset
for help on using the changeset viewer.