<?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>61766</bug_id>
          
          <creation_ts>2011-05-31 00:17:01 -0700</creation_ts>
          <short_desc>details::before/after rendered incorrectly</short_desc>
          <delta_ts>2024-11-23 11:18:53 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>157323</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>72352</blocked>
    
    <blocked>252223</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Roland Steiner">rolandsteiner</reporter>
          <assigned_to name="Web Components Team">webcomponents-bugzilla</assigned_to>
          <cc>dglazkov</cc>
    
    <cc>dominicc</cc>
    
    <cc>esprehn</cc>
    
    <cc>igor.oliveira</cc>
    
    <cc>jonlee</cc>
    
    <cc>morrita</cc>
    
    <cc>ntim</cc>
    
    <cc>rniwa</cc>
    
    <cc>shinyak</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>412477</commentid>
    <comment_count>0</comment_count>
    <who name="Roland Steiner">rolandsteiner</who>
    <bug_when>2011-05-31 00:17:01 -0700</bug_when>
    <thetext>This is similar to bug 61426 (see there for a test case)

Generated content from a details::before selector render before any summary or other details-content. Per the CSS spec, content generated with a :before rule should be rendered as if it was the first child of the parent element. For &lt;details&gt; this means that the generated content should become part of the non-&lt;summary&gt; content of the &lt;details&gt; element (and thus hidden if the &lt;details&gt; element is collapsed).

Similarly for details::after - this should also become part of the non-summary content (as if the last child) and thus hidden if the element is collapsed (currently it is rendered always).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>514941</commentid>
    <comment_count>1</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2011-12-05 00:02:08 -0800</bug_when>
    <thetext>Tree reforming: Unblocking 72352 because 59827 is already blocking it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848562</commentid>
    <comment_count>2</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2013-03-06 00:36:08 -0800</bug_when>
    <thetext>The generated content doesn&apos;t display at all in this test anymore. Something is bad here because it will show if you create a shadow root manually on an element.

Something weird is going on with &lt;details&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848566</commentid>
    <comment_count>3</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2013-03-06 00:41:56 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; The generated content doesn&apos;t display at all in this test anymore. Something is bad here because it will show if you create a shadow root manually on an element.
&gt; 
&gt; Something weird is going on with &lt;details&gt;

This is because of the logic in HTMLDetailsElement::childShouldCreateRenderer. It&apos;s unfortunate that the ShadowRoot things in WebCore side step the usual mechanisms that JS developers would use because we end up with behavior you can&apos;t explain with the Shadow DOM/HTML Components specs.

I think we should fix Shadow DOM to perform distribution on generated content so &lt;content select=&quot;:before&quot;&gt; works and then explain &lt;input&gt;&apos;s weirdness with webkit having a &lt;content select=&quot;:before&quot;&gt; in there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2077293</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2024-11-23 11:18:53 -0800</bug_when>
    <thetext>Fixed by bug 157323

*** This bug has been marked as a duplicate of bug 157323 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>