RESOLVED FIXED 72957
:only-of-type pseudo selector breaks :hover on <summary>
https://bugs.webkit.org/show_bug.cgi?id=72957
Summary :only-of-type pseudo selector breaks :hover on <summary>
Mattias Nissler
Reported 2011-11-22 06:56:57 PST
Created attachment 116219 [details] Reduced test case. summary:hover doesn't trigger if the summary element is nested in a div that has a div:only-of-type rule and the details contain another div container. The contents of the div:only-of-type rule are not important, an empty rule triggers the problem. I see this on the nightly at r100982 on Mac and on Chromium (webkit revision r100825). Test case reduction is attached.
Attachments
Reduced test case. (344 bytes, text/html)
2011-11-22 06:56 PST, Mattias Nissler
no flags
Shane Stephens
Comment 1 2011-11-30 19:42:41 PST
Also see https://bugs.webkit.org/show_bug.cgi?id=73068 which might be related.
Shinya Kawanaka
Comment 2 2011-12-26 04:44:33 PST
I've investigated this issue. Let me try to explain the cause. Actually, :hover is triggered but discarded soon. This is DOM tree of the DETAILS element. DETAILS |-- SUMMARY |-- DIV 1) In DETAILS element's recalcStyle(), DIV's recalcStyle() is called. 2) In DIV's recalcStyle(), currentStyle is NULL but newStyle is not NULL 3) so reattach() will be called in DIV's recalcStyle(). 4) This will make DETAILS's shadow->needsStyleRecalc() true. 5) So DETAILS's recalcShadowTreeStyle is called. It detaches shadow and re-attaches. This schedules SUMMARY's hover timer. 6) Since :only-of-time is specified, when whole DETAILS's style is calculated again 7) Return to (1). You will be able to find that recalcStyle will be triggered many times when mouse cursor is located on DETAILS element. Once DIV is shown, (2) won't happen.
Shinya Kawanaka
Comment 3 2012-02-03 01:11:41 PST
I think this will be fix in r106637.
Shinya Kawanaka
Comment 4 2012-02-03 01:26:30 PST
I confirmed that this is fixed in r106637.
Hajime Morrita
Comment 5 2012-02-13 22:37:00 PST
(In reply to comment #4) > I confirmed that this is fixed in r106637. closing.
Note You need to log in before you can comment on or make changes to this bug.