<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>72957</bug_id>
          
          <creation_ts>2011-11-22 06:56:57 -0800</creation_ts>
          <short_desc>:only-of-type pseudo selector breaks :hover on &lt;summary&gt;</short_desc>
          <delta_ts>2012-02-13 22:37:00 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>75930</dependson>
          <blocked>72352</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Mattias Nissler">mnissler</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dominicc</cc>
    
    <cc>hyatt</cc>
    
    <cc>mkwst</cc>
    
    <cc>morrita</cc>
    
    <cc>shanestephens</cc>
    
    <cc>shinyak</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>507587</commentid>
    <comment_count>0</comment_count>
      <attachid>116219</attachid>
    <who name="Mattias Nissler">mnissler</who>
    <bug_when>2011-11-22 06:56:57 -0800</bug_when>
    <thetext>Created attachment 116219
Reduced test case.

summary:hover doesn&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512367</commentid>
    <comment_count>1</comment_count>
    <who name="Shane Stephens">shanestephens</who>
    <bug_when>2011-11-30 19:42:41 -0800</bug_when>
    <thetext>Also see https://bugs.webkit.org/show_bug.cgi?id=73068 which might be related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>527195</commentid>
    <comment_count>2</comment_count>
    <who name="Shinya Kawanaka">shinyak</who>
    <bug_when>2011-12-26 04:44:33 -0800</bug_when>
    <thetext>I&apos;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&apos;s recalcStyle(), DIV&apos;s recalcStyle() is called.
2) In DIV&apos;s recalcStyle(), currentStyle is NULL but newStyle is not NULL
3) so reattach() will be called in DIV&apos;s recalcStyle().
4) This will make DETAILS&apos;s shadow-&gt;needsStyleRecalc() true.
5) So DETAILS&apos;s recalcShadowTreeStyle is called. It detaches shadow and re-attaches. This schedules SUMMARY&apos;s hover timer.
6) Since :only-of-time is specified, when whole DETAILS&apos;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&apos;t happen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>548556</commentid>
    <comment_count>3</comment_count>
    <who name="Shinya Kawanaka">shinyak</who>
    <bug_when>2012-02-03 01:11:41 -0800</bug_when>
    <thetext>I think this will be fix in r106637.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>548564</commentid>
    <comment_count>4</comment_count>
    <who name="Shinya Kawanaka">shinyak</who>
    <bug_when>2012-02-03 01:26:30 -0800</bug_when>
    <thetext>I confirmed that this is fixed in r106637.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>555960</commentid>
    <comment_count>5</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2012-02-13 22:37:00 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; I confirmed that this is fixed in r106637.
closing.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>116219</attachid>
            <date>2011-11-22 06:56:57 -0800</date>
            <delta_ts>2011-11-22 06:56:57 -0800</delta_ts>
            <desc>Reduced test case.</desc>
            <filename>details_hover.html</filename>
            <type>text/html</type>
            <size>344</size>
            <attacher name="Mattias Nissler">mnissler</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgogIDxzdHlsZT4KYm9keSA+IGRpdjpvbmx5LW9mLXR5cGUgewp9CgpzdW1t
YXJ5IHsKICBiYWNrZ3JvdW5kLWNvbG9yOiBncmVlbjsKfQoKc3VtbWFyeTpob3ZlciB7CiAgYmFj
a2dyb3VuZC1jb2xvcjogcmVkOwp9CiAgPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KICA8ZGl2Pgog
ICAgPGRldGFpbHM+CiAgICAgIDxzdW1tYXJ5PlNob3VsZCB0dXJuIHJlZCBvbiBob3Zlci4uLjwv
c3VtbWFyeT4KICAgICAgPGRpdj4uLi5idXQgb25seSBkb2VzIHNvIG9uY2UgdGhlIGRldGFpbHMg
YXJlIHZpc2libGUhPC9kaXY+CiAgICA8L2RldGFpbHM+CiAgPC9kaXY+CjwvYm9keT4KPC9odG1s
Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>