Changeset 245268 in webkit
- Timestamp:
- May 13, 2019, 7:25:34 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html (modified) (1 diff)
-
LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245262 r245268 1 2019-05-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS] When running layout tests that tap in the same location, subsequent tests fail to fire click handlers 4 https://bugs.webkit.org/show_bug.cgi?id=197821 5 <rdar://problem/50700512> 6 7 Reviewed by Tim Horton. 8 9 Removes workarounds in a couple of existing layout tests. 10 11 * editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html: 12 * editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html: 13 1 14 2019-05-13 Jiewen Tan <jiewen_tan@apple.com> 2 15 -
trunk/LayoutTests/editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html
r245067 r245268 43 43 44 44 await UIHelper.activateElement(clickTarget); 45 46 setTimeout(async function () { 47 // The test is done, but we need to tap again to ensure we don't 48 // hang the next test with a double tap. 49 document.removeEventListener("selectionchange", didChangeSelection); 50 await UIHelper.tapAt(10, 500); 51 52 testRunner.notifyDone(); 53 }, 0); 45 setTimeout(() => testRunner.notifyDone(), 0); 54 46 } 55 47 </script> -
trunk/LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html
r245067 r245268 42 42 clickTarget.addEventListener("click", event => { 43 43 event.preventDefault(); 44 45 setTimeout(async function () { 46 // The test is done, but we need to tap again to ensure we don't 47 // hang the next test with a double tap. 48 document.removeEventListener("selectionchange", didChangeSelection); 49 await UIHelper.tapAt(10, 500); 50 51 testRunner.notifyDone(); 52 }, 0); 44 setTimeout(() => testRunner.notifyDone(), 0); 53 45 }); 54 46 -
trunk/Source/WebKit/ChangeLog
r245267 r245268 1 2019-05-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS] When running layout tests that tap in the same location, subsequent tests fail to fire click handlers 4 https://bugs.webkit.org/show_bug.cgi?id=197821 5 <rdar://problem/50700512> 6 7 Reviewed by Tim Horton. 8 9 After r244775, when running back-to-back layout tests on iOS that simulate taps in the same location, the double 10 tap gesture recognizer for recognizing double clicks ends up recognizing instead of the single tap gesture 11 recognizer in the subsequent test. This means that click handlers in the subsequent test will fail to recognize, 12 unless the element with the click handler is also accompanied by a dblclick handler. 13 14 To avoid this, we reset the double click gesture recognizer when navigating; this has the additional effect of 15 making it such that the second page doesn't end up observing a dblclick when the first click was only sent to 16 the first page. 17 18 * UIProcess/ios/PageClientImplIOS.mm: 19 (WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame): 20 * UIProcess/ios/WKContentViewInteraction.h: 21 * UIProcess/ios/WKContentViewInteraction.mm: 22 (-[WKContentView setupInteraction]): 23 (-[WKContentView _didStartProvisionalLoadForMainFrame]): 24 1 25 2019-05-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 26 -
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
r245112 r245268 216 216 { 217 217 [m_webView _didStartProvisionalLoadForMainFrame]; 218 [m_contentView _didStartProvisionalLoadForMainFrame]; 218 219 [m_webView _hidePasswordView]; 219 220 } -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r245154 r245268 507 507 - (void)_handleAutocorrectionContext:(const WebKit::WebAutocorrectionContext&)context; 508 508 509 - (void)_didStartProvisionalLoadForMainFrame; 510 509 511 @end 510 512 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r245154 r245268 739 739 [_doubleTapGestureRecognizerForDoubleClick setNumberOfTapsRequired:2]; 740 740 [_doubleTapGestureRecognizerForDoubleClick setDelegate:self]; 741 [_doubleTapGestureRecognizerForDoubleClick setEnabled:YES];742 741 [self addGestureRecognizer:_doubleTapGestureRecognizerForDoubleClick.get()]; 743 742 … … 3761 3760 { 3762 3761 [self _invokePendingAutocorrectionContextHandler:[WKAutocorrectionContext autocorrectionContextWithWebContext:context]]; 3762 } 3763 3764 - (void)_didStartProvisionalLoadForMainFrame 3765 { 3766 // Reset the double tap gesture recognizer to prevent any double click that is in the process of being recognized. 3767 [_doubleTapGestureRecognizerForDoubleClick setEnabled:NO]; 3768 [_doubleTapGestureRecognizerForDoubleClick setEnabled:YES]; 3763 3769 } 3764 3770
Note:
See TracChangeset
for help on using the changeset viewer.