<?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>72439</bug_id>
          
          <creation_ts>2011-11-15 16:21:11 -0800</creation_ts>
          <short_desc>Crash when ShadowRoot content is smaller than host element</short_desc>
          <delta_ts>2011-12-07 18:08:05 -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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Dominic Cooney">dominicc</reporter>
          <assigned_to name="Dominic Cooney">dominicc</assigned_to>
          <cc>morrita</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>503404</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2011-11-15 16:21:11 -0800</bug_when>
    <thetext>When the content of a ShadowRoot is smaller than the host element, clicking in the &quot;void&quot; tries to create a range without an associated DOM element and causes a crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>514957</commentid>
    <comment_count>1</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2011-12-05 00:32:44 -0800</bug_when>
    <thetext>Signing up myself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>515661</commentid>
    <comment_count>2</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2011-12-05 22:34:50 -0800</bug_when>
    <thetext>I cannot reproduce this:

----
&lt;!DOCTYPE html&gt;                                                                                                                                                                                                                                                                                                                                                             
&lt;html&gt;                                                                                                                                                                                                                                                                                                                                                                      
&lt;head&gt;                                                                                                                                                                                                                                                                                                                                                                      
&lt;/head&gt;                                                                                                                                                                                                                                                                                                                                                                     
&lt;body&gt;                                                                                                                                                                                                                                                                                                                                                                      
&lt;pre id=&quot;console&quot;&gt;                                                                                                                                                                                                                                                                                                                                                          
&lt;/pre&gt;                                                                                                                                                                                                                                                                                                                                                                      
&lt;div id=&quot;container&quot;&gt;&lt;/div&gt;                                                                                                                                                                                                                                                                                                                                                  
&lt;script&gt;                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                            
var container = document.getElementById(&quot;container&quot;);                                                                                                                                                                                                                                                                                                                       
var shadowHost = document.createElement(&quot;div&quot;);                                                                                                                                                                                                                                                                                                                             
shadowHost.setAttribute(&quot;style&quot;, &quot;width: 500px; height: 500px;&quot;);                                                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                                                                            
var shadowRoot = internals.ensureShadowRoot(shadowHost);                                                                                                                                                                                                                                                                                                                    
content = document.createElement(&quot;p&quot;);                                                                                                                                                                                                                                                                                                                                      
content.setAttribute(&quot;style&quot;, &quot;width: 50px; height: 50px;&quot;);                                                                                                                                                                                                                                                                                                                
shadowRoot.appendChild(content);                                                                                                                                                                                                                                                                                                                                            
container.appendChild(shadowHost);                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                            
shadowHost.onclick = function() { console.log(&apos;clicked&apos;); }                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                                                                            
var p = content;                                                                                                                                                                                                                                                                                                                                                            
var x = p.offsetLeft + p.offsetWidth + 10;                                                                                                                                                                                                                                                                                                                                  
var y = p.offsetTop + p.offsetHeight + 10;                                                                                                                                                                                                                                                                                                                                  
eventSender.mouseMoveTo(x , y);                                                                                                                                                                                                                                                                                                                                             
eventSender.mouseDown();                                                                                                                                                                                                                                                                                                                                                    
eventSender.mouseUp();                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                            
&lt;/script&gt;                                                                                                                                                                                                                                                                                                                                                                   
&lt;/body&gt;                                                                                                                                                                                                                                                                                                                                                                     
&lt;/html&gt;
--
This printed &quot;clicked&quot; without any crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>515724</commentid>
    <comment_count>3</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2011-12-06 01:06:54 -0800</bug_when>
    <thetext>Unassigning for now because the crash cannot be reproduced.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>515727</commentid>
    <comment_count>4</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2011-12-06 01:20:01 -0800</bug_when>
    <thetext>Let me try to reproduce it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>517061</commentid>
    <comment_count>5</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2011-12-07 18:08:05 -0800</bug_when>
    <thetext>I can not reproduce this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>