WebKit Bugzilla
Attachment 369751 Details for
Bug 197821
: [iOS] When running layout tests that tap in the same location, subsequent tests fail to fire click handlers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197821-20190513111431.patch (text/plain), 7.60 KB, created by
Wenson Hsieh
on 2019-05-13 11:14:32 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2019-05-13 11:14:32 PDT
Size:
7.60 KB
patch
obsolete
>Subversion Revision: 245238 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6212239390af54e722899f1cbd1a723d5f8345d3..ab5cdaf5931ee0510c72013fcb4e148e25ace738 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,27 @@ >+2019-05-11 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] When running layout tests that tap in the same location, subsequent tests fail to fire click handlers >+ https://bugs.webkit.org/show_bug.cgi?id=197821 >+ <rdar://problem/50700512> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ After r244775, when running back-to-back layout tests on iOS that simulate taps in the same location, the double >+ tap gesture recognizer for recognizing double clicks ends up recognizing instead of the single tap gesture >+ recognizer in the subsequent test. This means that click handlers in the subsequent test will fail to recognize, >+ unless the element with the click handler is also accompanied by a dblclick handler. >+ >+ To avoid this, we reset the double click gesture recognizer when navigating; this has the additional effect of >+ making it such that the second page doesn't end up observing a dblclick when the first click was only sent to >+ the first page. >+ >+ * UIProcess/ios/PageClientImplIOS.mm: >+ (WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame): >+ * UIProcess/ios/WKContentViewInteraction.h: >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView setupInteraction]): >+ (-[WKContentView _didStartProvisionalLoadForMainFrame]): >+ > 2019-05-13 Chris Fleizach <cfleizach@apple.com> > > AX: Need an entitlement for WebContent to send accessibility notifications >diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >index 67fb2e3ba1f763a5835b312193869b4f0f0945da..09532ff27e99f4e9c893adc818df90d24fa1621a 100644 >--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >@@ -215,6 +215,7 @@ void PageClientImpl::decidePolicyForGeolocationPermissionRequest(WebFrameProxy& > void PageClientImpl::didStartProvisionalLoadForMainFrame() > { > [m_webView _didStartProvisionalLoadForMainFrame]; >+ [m_contentView _didStartProvisionalLoadForMainFrame]; > [m_webView _hidePasswordView]; > } > >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >index cf48911a31143150dcee8a85727ab1dc69e00420..c92b3f9d2208720acb31ab9894cd742f9bdf95ef 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >@@ -506,6 +506,8 @@ FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW) > > - (void)_handleAutocorrectionContext:(const WebKit::WebAutocorrectionContext&)context; > >+- (void)_didStartProvisionalLoadForMainFrame; >+ > @end > > @interface WKContentView (WKTesting) >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index e6b11236b976015bf9607a80ab12f91abc73a105..5c6653a826c6b74387f52cf365ff1f3df2f9e8d7 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -738,7 +738,6 @@ - (void)setupInteraction > _doubleTapGestureRecognizerForDoubleClick = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_doubleTapRecognizedForDoubleClick:)]); > [_doubleTapGestureRecognizerForDoubleClick setNumberOfTapsRequired:2]; > [_doubleTapGestureRecognizerForDoubleClick setDelegate:self]; >- [_doubleTapGestureRecognizerForDoubleClick setEnabled:YES]; > [self addGestureRecognizer:_doubleTapGestureRecognizerForDoubleClick.get()]; > > [self _createAndConfigureDoubleTapGestureRecognizer]; >@@ -3762,6 +3761,13 @@ - (void)_handleAutocorrectionContext:(const WebKit::WebAutocorrectionContext&)co > [self _invokePendingAutocorrectionContextHandler:[WKAutocorrectionContext autocorrectionContextWithWebContext:context]]; > } > >+- (void)_didStartProvisionalLoadForMainFrame >+{ >+ // Reset the double tap gesture recognizer to prevent any double click that is in the process of being recognized. >+ [_doubleTapGestureRecognizerForDoubleClick setEnabled:NO]; >+ [_doubleTapGestureRecognizerForDoubleClick setEnabled:YES]; >+} >+ > #if !USE(UIKIT_KEYBOARD_ADDITIONS) > - (NSArray *)keyCommands > { >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 36e3b4ce1a9f0c6e197cb0761fd7024fa1be57ed..39f94bade465d0596b8e597bada4a74fb03dd463 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2019-05-11 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] When running layout tests that tap in the same location, subsequent tests fail to fire click handlers >+ https://bugs.webkit.org/show_bug.cgi?id=197821 >+ <rdar://problem/50700512> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Removes workarounds in a couple of existing layout tests. >+ >+ * editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html: >+ * editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html: >+ > 2019-05-13 Wenson Hsieh <wenson_hsieh@apple.com> > > [macOS] Font formatting options don't work when composing a message in Yahoo mail >diff --git a/LayoutTests/editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html b/LayoutTests/editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html >index 2c8197cd95fa313a63347346cde2d99d154f404b..39465b05596d296cc95a3d2770b4f32608af9f6a 100644 >--- a/LayoutTests/editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html >+++ b/LayoutTests/editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html >@@ -42,15 +42,7 @@ > window.getSelection().setBaseAndExtent(target, 0, target, 6); > > await UIHelper.activateElement(clickTarget); >- >- setTimeout(async function () { >- // The test is done, but we need to tap again to ensure we don't >- // hang the next test with a double tap. >- document.removeEventListener("selectionchange", didChangeSelection); >- await UIHelper.tapAt(10, 500); >- >- testRunner.notifyDone(); >- }, 0); >+ setTimeout(() => testRunner.notifyDone(), 0); > } > </script> > </head> >diff --git a/LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html b/LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html >index 5ba42ac86dd37d2d9170dbddee38d63ada6b4a81..e38f4d30fc04ff431a713fbad6e152dc0a61e252 100644 >--- a/LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html >+++ b/LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html >@@ -41,15 +41,7 @@ > > clickTarget.addEventListener("click", event => { > event.preventDefault(); >- >- setTimeout(async function () { >- // The test is done, but we need to tap again to ensure we don't >- // hang the next test with a double tap. >- document.removeEventListener("selectionchange", didChangeSelection); >- await UIHelper.tapAt(10, 500); >- >- testRunner.notifyDone(); >- }, 0); >+ setTimeout(() => testRunner.notifyDone(), 0); > }); > > var target = document.getElementById("target");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197821
:
369668
|
369749
| 369751