Web Inspector: if you rename an element into the INPUT element the browser will crash.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2011 05:54:15 +0000 (05:54 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2011 05:54:15 +0000 (05:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=64292

Reviewed by Joseph Pecoraro.

Source/WebCore:

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setNodeName):
Unnecessary function call copyNonAttributeProperties was removed.

LayoutTests:

* inspector/elements/edit-dom-actions-expected.txt:
* inspector/elements/edit-dom-actions.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90980 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/inspector/elements/edit-dom-actions-expected.txt
LayoutTests/inspector/elements/edit-dom-actions.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorDOMAgent.cpp

index f4da38a5e0208232f55346afbcdc32da1586c674..a87cccbc2c48b8f5aa1225c56a0d7cace30cc888 100644 (file)
@@ -1,3 +1,13 @@
+2011-07-13  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: if you rename an element into the INPUT element the browser will crash.
+        https://bugs.webkit.org/show_bug.cgi?id=64292
+
+        Reviewed by Joseph Pecoraro.
+
+        * inspector/elements/edit-dom-actions-expected.txt:
+        * inspector/elements/edit-dom-actions.html:
+
 2011-07-13  Yuta Kitamura  <yutak@chromium.org>
 
         WebSocket: Implement hybi handshake
index 5ad08819a95d58bd1d65a67cd01aa3126bfdfaf5..d5f72a5aaf7e29424cdd3fa870ecb7df9332d762 100644 (file)
@@ -1,5 +1,6 @@
 Tests that user can mutate DOM by means of elements panel.
 
 Edited Text
 Span contents
 
@@ -24,6 +25,16 @@ Running: testSetNodeName
       <span id="node-to-set-name" ></span>
   </div>
 
+Running: testSetNodeNameInput
+==== before ====
+- <div id="testSetNodeNameInput">
+      <div id="node-to-set-name-input"></div>
+  </div>
+==== after ====
+- <div id="testSetNodeNameInput">
+      <input id="node-to-set-name-input" >
+  </div>
+
 Running: testSetNodeValue
 ==== before ====
 - <div id="testSetNodeValue">
index 07033d9a7ddae6cdc7ca281b1e356c768b3ea82d..4b6c5fc95087ae99ee6c0ef2a67ef1a5482c391b 100644 (file)
@@ -38,6 +38,16 @@ function test()
             }
         },
 
+        function testSetNodeNameInput(next)
+        {
+            domActionTest("testSetNodeNameInput", "node-to-set-name-input", testBody, next);
+
+            function testBody(node, done)
+            {
+                editNodePartAndRun(node, "webkit-html-tag-name", "input", done);
+            }
+        },
+
         function testSetNodeValue(next)
         {
             domActionTest("testSetNodeValue", "node-to-set-value", testBody, next);
@@ -175,6 +185,10 @@ Tests that user can mutate DOM by means of elements panel.
         <div id="node-to-set-name"></div>
     </div>
 
+    <div id="testSetNodeNameInput">
+        <div id="node-to-set-name-input"></div>
+    </div>
+
     <div id="testSetNodeValue">
         <div id="node-to-set-value">Text</div>
     </div>
index 7a45e75e0cffb5e68c0a6e3dc4ed4fffa98a81cc..5b5d1bdcf26aab3b9002bd304696487e954428e3 100644 (file)
@@ -1,3 +1,14 @@
+2011-07-13  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: if you rename an element into the INPUT element the browser will crash.
+        https://bugs.webkit.org/show_bug.cgi?id=64292
+
+        Reviewed by Joseph Pecoraro.
+
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::setNodeName):
+        Unnecessary function call copyNonAttributeProperties was removed.
+
 2011-07-13  Yuta Kitamura  <yutak@chromium.org>
 
         WebSocket: Implement hybi handshake
index 639868f3b14ccffe0b349732b0d2d91875ed24d3..6a1b150760873502c59c1a2ad787ec31b6160fea 100644 (file)
@@ -682,7 +682,6 @@ void InspectorDOMAgent::setNodeName(ErrorString*, int nodeId, const String& tagN
 
     // Copy over the original node's attributes.
     Element* oldElem = static_cast<Element*>(oldNode);
-    newElem->copyNonAttributeProperties(oldElem);
     if (oldElem->attributes())
         newElem->attributes()->setAttributes(*(oldElem->attributes(true)));