<?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>57431</bug_id>
          
          <creation_ts>2011-03-30 00:59:46 -0700</creation_ts>
          <short_desc>Crash when dynamically adding input fields with certain css and attributes to a div</short_desc>
          <delta_ts>2011-03-30 21:38:33 -0700</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>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>46088</dup_id>
          
          <bug_file_loc>http://jsfiddle.net/jbrichau/cERX6/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>johan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aestes</cc>
    
    <cc>ap</cc>
    
    <cc>mitz</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tkent</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>376121</commentid>
    <comment_count>0</comment_count>
    <who name="">johan</who>
    <bug_when>2011-03-30 00:59:46 -0700</bug_when>
    <thetext>The fiddle that is available in the url shows how webkit crashes when I dynamically add input fields to a div. 

On Webkit or Safari, it takes a couple of seconds before it crashes. On Chrome, I get the &apos;aw snap&apos; page. 
I just tried it on the Webkit nightly build of March 30th 2011. 

The first link in the page makes webkit crash. This one adds two input fields to the page using jquery.

The second link makes the password input field appear twice on the same page. Although only a single one exists in the DOM. The difference is that we left out the label of the password field.

The third link makes it work. Here, we removed the autofocus attribute from the first input field.

If we remove the css, it works as well.

However, all the above are workarounds trying to circumvent a problem I am unable to pinpoint, but which seems to be in webkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>376424</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-30 10:06:01 -0700</bug_when>
    <thetext>Could you please attach a self-contained test case to this Bugzilla bug? It&apos;s better to have everything pertinent to an issue in one place, not on 3rd party servers.

Asserts with a debug build of ToT:

ASSERTION FAILED: !renderer()
/Users/ap/Safari/OpenSource/Source/WebCore/dom/Node.cpp(1449) : void WebCore::Node::createRendererIfNeeded()
1   WebCore::Node::createRendererIfNeeded()
2   WebCore::Element::attach()
3   WebCore::ContainerNode::attach()
4   WebCore::Element::attach()
5   WebCore::HTMLFormControlElement::attach()
6   WebCore::ContainerNode::appendChild(WTF::PassRefPtr&lt;WebCore::Node&gt;, int&amp;, bool)
7   WebCore::replaceChildrenWithFragment(WebCore::HTMLElement*, WTF::PassRefPtr&lt;WebCore::DocumentFragment&gt;, int&amp;)
8   WebCore::HTMLElement::setInnerHTML(WTF::String const&amp;, int&amp;)
9   WebCore::setJSHTMLElementInnerHTML(JSC::ExecState*, JSC::JSObject*, JSC::JSValue)
10  bool JSC::lookupPut&lt;WebCore::JSHTMLElement&gt;(JSC::ExecState*, JSC::Identifier const&amp;, JSC::JSValue, JSC::HashTable const*, WebCore::JSHTMLElement*)
11  void JSC::lookupPut&lt;WebCore::JSHTMLElement, WebCore::JSElement&gt;(JSC::ExecState*, JSC::Identifier const&amp;, JSC::JSValue, JSC::HashTable const*, WebCore::JSHTMLElement*, JSC::PutPropertySlot&amp;)
&lt;...&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>376432</commentid>
    <comment_count>2</comment_count>
      <attachid>87559</attachid>
    <who name="">johan</who>
    <bug_when>2011-03-30 10:16:04 -0700</bug_when>
    <thetext>Created attachment 87559
self-contained testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>376934</commentid>
    <comment_count>3</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-03-30 21:38:01 -0700</bug_when>
    <thetext>This is a variant of the autofocus issue, Bug 46088.
I confirmed a patch in Bug 46088 fixed the problem in the attachment johan posted.

However some reviewers didn&apos;t like the patches in Bug 46088.  Do you have any good idea to fix this issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>376935</commentid>
    <comment_count>4</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-03-30 21:38:33 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 46088 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>87559</attachid>
            <date>2011-03-30 10:16:04 -0700</date>
            <delta_ts>2011-03-30 10:16:04 -0700</delta_ts>
            <desc>self-contained testcase</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>1943</size>
            <attacher>johan</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hodG1s
IiB4bWw6bGFuZz0iZW4iIGxhbmc9ImVuIj4KCTxoZWFkPgoJCTx0aXRsZT4KCQkJU2Vhc2lkZQoJ
CTwvdGl0bGU+CgkJPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0
L2h0bWw7IGNoYXJzZXQ9dXRmLTgiIC8+CgkJPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1TY3Jp
cHQtVHlwZSIgY29udGVudD0idGV4dC9qYXZhc2NyaXB0IiAvPgoJCTxsaW5rIHJlbD0ic3R5bGVz
aGVldCIgdHlwZT0idGV4dC9jc3MiIGhyZWY9Ii4vc3RyaXBwZWQuY3NzIiAvPgoJCTxz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