Bug 195520 - [ContentChangeObserver] Click event fires immediately on hover menu at seriouseats.com
Summary: [ContentChangeObserver] Click event fires immediately on hover menu at seriou...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-09 07:27 PST by zalan
Modified: 2019-03-09 20:48 PST (History)
5 users (show)

See Also:


Attachments
Patch (6.55 KB, patch)
2019-03-09 08:40 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (6.70 KB, patch)
2019-03-09 19:15 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (6.68 KB, patch)
2019-03-09 19:42 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.