Bug 158340 - :hover CSS pseudo-class sometimes keeps matching ever after mouse has left the element
Summary: :hover CSS pseudo-class sometimes keeps matching ever after mouse has left th...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac OS X 10.11
: P2 Normal
Assignee: Benjamin Poulain
URL: https://jsfiddle.net/cvrebert/rgq9zwc2/
Keywords: HasReduction, InRadar
Depends on:
Blocks: 159753
  Show dependency treegraph
 
Reported: 2016-06-02 22:27 PDT by Chris Rebert
Modified: 2016-08-29 23:50 PDT (History)
7 users (show)

See Also:


Attachments
Video of the bug in action (123.64 KB, video/mp4)
2016-06-02 22:27 PDT, Chris Rebert
no flags Details
Patch (13.64 KB, patch)
2016-06-20 21:04 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (13.64 KB, patch)
2016-06-20 21:10 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2 (671.59 KB, application/zip)
2016-06-20 22:05 PDT, Build Bot
no flags Details
Patch (14.60 KB, patch)
2016-06-21 21:12 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rebert 2016-06-02 22:27:39 PDT
Created attachment 280426 [details]
Video of the bug in action

Steps to reproduce:
1. Open https://jsfiddle.net/cvrebert/rgq9zwc2/ in WebKit Nightly or Safari 9.
2. Move the mouse pointer to the star in the lower-right corner.
3. Observe that a tooltip appears.
4. Move the mouse pointer vertically upward along the column of stars.

Actual result:
Several of the gray boxes turn blue and stay blue,
indicating that the :hover pseudo-class is applying to several of them simultaneously.
See attached video, courtesy of https://github.com/RopoMen

Expected result:
Only the box currently being hovered over should be blue.
Each box should turn gray again immediately after the pointer moves outside of the box's respective bounds.

Original Bootstrap bug:
https://github.com/twbs/bootstrap/issues/20012
Comment 1 Benjamin Poulain 2016-06-20 16:51:52 PDT
I know what is up.
Not looking forward to writing more tests though :(
Comment 2 Radar WebKit Bug Importer 2016-06-20 16:52:04 PDT
<rdar://problem/26905293>
Comment 3 Benjamin Poulain 2016-06-20 21:04:45 PDT
Created attachment 281709 [details]
Patch
Comment 4 WebKit Commit Bot 2016-06-20 21:07:14 PDT
Attachment 281709 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:35:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 1 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Benjamin Poulain 2016-06-20 21:10:45 PDT
Created attachment 281710 [details]
Patch
Comment 6 Build Bot 2016-06-20 22:05:36 PDT
Comment on attachment 281710 [details]
Patch

Attachment 281710 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1539894

New failing tests:
fast/css/ancestor-of-hovered-element-detached.html
fast/css/ancestor-of-hovered-element-removed.html
Comment 7 Build Bot 2016-06-20 22:05:39 PDT
Created attachment 281713 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 8 Benjamin Poulain 2016-06-20 22:22:00 PDT
I'll have to skip those tests on iOS before landing.
Comment 9 Simon Fraser (smfr) 2016-06-21 15:13:09 PDT
Comment on attachment 281710 [details]
Patch

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

Please fix or skip the test for iOS.

> Source/WebCore/ChangeLog:14
> +        -"a" starts being removed from the tree, its renderer are destroyed.

its render is

> Source/WebCore/ChangeLog:16
> +         and call hoveredElementDidDetach().

calls

> Source/WebCore/ChangeLog:20
> +         and call hoveredElementDidDetach().

calls
Comment 10 Benjamin Poulain 2016-06-21 21:12:33 PDT
Created attachment 281812 [details]
Patch
Comment 11 WebKit Commit Bot 2016-06-21 22:52:16 PDT
Comment on attachment 281812 [details]
Patch

Clearing flags on attachment: 281812

Committed r202324: <http://trac.webkit.org/changeset/202324>
Comment 12 WebKit Commit Bot 2016-06-21 22:52:21 PDT
All reviewed patches have been landed.  Closing bug.