<?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>52423</bug_id>
          
          <creation_ts>2011-01-13 22:00:16 -0800</creation_ts>
          <short_desc>RenderObject::canHaveChildren()==false prevents shadow renderer creation</short_desc>
          <delta_ts>2012-02-26 21:59:04 -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>DOM</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>
          
          <blocked>72352</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kent Tamura">tkent</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cmarcelo</cc>
    
    <cc>dglazkov</cc>
    
    <cc>dominicc</cc>
    
    <cc>morrita</cc>
    
    <cc>shinyak</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>334115</commentid>
    <comment_count>0</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-01-13 22:00:16 -0800</bug_when>
    <thetext>Some renderers return false for canHaveChildren().  So if we try to convert the legacy shadow DOM code to the new API, the shadow nodes won&apos;t have their renderers.  See Node::createRendererIfNeeded().

dglazkov said:
&gt; I think it should be a function on an Element which indicates whether its children should be rendered

Source/WebCore/rendering/RenderButton.h:    virtual bool canHaveChildren() const;
Source/WebCore/rendering/RenderDataGrid.h:    virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderIndicator.h:    virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderListBox.h:    virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderMenuList.h:    virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderReplaced.h:    virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderTableCol.h:    virtual bool canHaveChildren() const;
Source/WebCore/rendering/RenderTextControl.h:    virtual bool canHaveChildren() const { return false; }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>383194</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2011-04-11 09:00:41 -0700</bug_when>
    <thetext>This is going to be part of &lt;content&gt; element machinery. By default, if the element has shadow DOM subtree, the children aren&apos;t rendered, so this decision becomes runtime, not compile-time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>384994</commentid>
    <comment_count>2</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2011-04-13 10:45:15 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; This is going to be part of &lt;content&gt; element machinery. By default, if the element has shadow DOM subtree, the children aren&apos;t rendered, so this decision becomes runtime, not compile-time.

Turns out that the best solution is just to never render children for Elements that have shadow DOM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>565315</commentid>
    <comment_count>3</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2012-02-26 21:59:04 -0800</bug_when>
    <thetext>Fixed by http://trac.webkit.org/changeset/108758.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>