Bug 195520

Summary: [ContentChangeObserver] Click event fires immediately on hover menu at seriouseats.com
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description zalan 2019-03-09 07:27:05 PST
ssia
Comment 1 Radar WebKit Bug Importer 2019-03-09 07:27:27 PST
<rdar://problem/48740098>
Comment 2 zalan 2019-03-09 08:40:37 PST
Created attachment 364130 [details]
Patch
Comment 3 Simon Fraser (smfr) 2019-03-09 11:38:54 PST
Comment on attachment 364130 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        Unfortunately seriouseats has a 300ms hover intent delay to deal with accidental menupane pop-ups.

Maybe say something about the other changes in this patch.

> Source/WebCore/page/ios/ContentChangeObserver.cpp:352
> +    if (style.hasOutOfFlowPosition() && left.isFixed() && left.value() <= -999)
> +        return true;

What about negative X?
Don't you also need to check the element width? Something at -999 could be on-screen, especially if it has 100% width on iPad.
You should also add a test for this.
Comment 4 zalan 2019-03-09 18:54:16 PST
(In reply to Simon Fraser (smfr) from comment #3)
> Comment on attachment 364130 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=364130&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +        Unfortunately seriouseats has a 300ms hover intent delay to deal with accidental menupane pop-ups.
> 
> Maybe say something about the other changes in this patch.
I did, it's next to "StyleChangeScope::isConsideredHidden const" but yeah, I should put some more words in there.

> 
> > Source/WebCore/page/ios/ContentChangeObserver.cpp:352
> > +    if (style.hasOutOfFlowPosition() && left.isFixed() && left.value() <= -999)
> > +        return true;
> 
> What about negative X?
> Don't you also need to check the element width? Something at -999 could be
> on-screen, especially if it has 100% width on iPad.
That case is covered already. This is about when we don't know the exact width (percent or calculated) and the _out-of-flow_ content seems suspiciously positioned to the far left.

> You should also add a test for this.
Comment 5 zalan 2019-03-09 19:15:00 PST
Created attachment 364157 [details]
Patch
Comment 6 zalan 2019-03-09 19:42:36 PST
Created attachment 364160 [details]
Patch
Comment 7 WebKit Commit Bot 2019-03-09 20:48:39 PST
Comment on attachment 364160 [details]
Patch

Clearing flags on attachment: 364160

Committed r242679: <https://trac.webkit.org/changeset/242679>
Comment 8 WebKit Commit Bot 2019-03-09 20:48:41 PST
All reviewed patches have been landed.  Closing bug.