Summary: | :only-of-type pseudo selector breaks :hover on <summary> | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mattias Nissler <mnissler> | ||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | dominicc, hyatt, mkwst, morrita, shanestephens, shinyak | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | 75930 | ||||||
Bug Blocks: | 72352 | ||||||
Attachments: |
|
Description
Mattias Nissler
2011-11-22 06:56:57 PST
Also see https://bugs.webkit.org/show_bug.cgi?id=73068 which might be related. 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. (In reply to comment #4) > I confirmed that this is fixed in r106637. closing. |