Bug 139556

Summary: [iOS][WK2] Ignore synthetic click initiated on a previous page
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, ap, ddkilzer, sam, simon.fraser, thorton
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Benjamin Poulain 2014-12-11 12:57:03 PST
[iOS][WK2] Ignore synthetic click initiated on a previous page
Comment 1 Benjamin Poulain 2014-12-11 14:22:30 PST
Created attachment 243146 [details]
Patch
Comment 2 Benjamin Poulain 2014-12-12 17:17:32 PST
rdar://problem/18586008
Comment 3 Alexey Proskuryakov 2014-12-16 20:06:12 PST
Comment on attachment 243146 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=243146&action=review

> Source/WebKit2/ChangeLog:27
> +        First, in the UIProcess, we just cancel the HighlightLongPressGestureRecognizer
> +        on didCommitLoadForMainFrame. This prevents "fast clicks" from accidentally going through.
> +        This is not bullet proof because we get didCommitLoadForMainFrame asynchronously but
> +        killing the timer and gesture seems like a good idea.

Also, it's not just the main frame that has this problem, secondary frames too.

> Source/WebKit2/ChangeLog:39
> +        If the user interaction result in a tap, we send the commit ID along the tap commands.
> +        In the WebProcess, we know the actual layer tree commit associated with the current page.
> +        If the tap was generated with a layer ID preceding the current page, we fail the command.

I'm somewhat concerned here, because I don't understand how FOUC prevention works. We don't necessarily paint after committing a load, but what happens with events that are delivered when there is some content loaded, but we are blocking painting? Seems like we might still have the same problem.
Comment 4 David Kilzer (:ddkilzer) 2015-01-17 14:43:36 PST
Comment on attachment 243146 [details]
Patch

Overall this seems fine, but r- to address Alexey's concerns.
Comment 5 David Kilzer (:ddkilzer) 2015-01-22 15:08:41 PST
Comment on attachment 243146 [details]
Patch

Ben and Alexey talked offline.  The plan is for Ben to file a follow-up bug for the non-main frame case, but land this fix to move forward with fixing this issue with the main frame.
Comment 6 David Kilzer (:ddkilzer) 2015-01-22 15:08:56 PST
(In reply to comment #5)
> Comment on attachment 243146 [details]
> Patch
> 
> Ben and Alexey talked offline.  The plan is for Ben to file a follow-up bug
> for the non-main frame case, but land this fix to move forward with fixing
> this issue with the main frame.

r=me
Comment 7 Benjamin Poulain 2015-01-22 20:17:04 PST
Comment on attachment 243146 [details]
Patch

Clearing flags on attachment: 243146

Committed r178980: <http://trac.webkit.org/changeset/178980>
Comment 8 Benjamin Poulain 2015-01-22 20:17:08 PST
All reviewed patches have been landed.  Closing bug.