Title: [122106] trunk
- Revision
- 122106
- Author
- [email protected]
- Date
- 2012-07-09 06:45:34 -0700 (Mon, 09 Jul 2012)
Log Message
Web Inspector: inspector does not reflect newly created text nodes from contenteditable
https://bugs.webkit.org/show_bug.cgi?id=90779
Reviewed by Vsevolod Vlasov.
Source/WebCore:
We need to report first text node as inserted, otherwise we fail to report character data modified on it.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::characterDataModified):
LayoutTests:
* inspector/elements/insert-node-expected.txt:
* inspector/elements/insert-node.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (122105 => 122106)
--- trunk/LayoutTests/ChangeLog 2012-07-09 13:36:07 UTC (rev 122105)
+++ trunk/LayoutTests/ChangeLog 2012-07-09 13:45:34 UTC (rev 122106)
@@ -1,3 +1,13 @@
+2012-07-09 Pavel Feldman <[email protected]>
+
+ Web Inspector: inspector does not reflect newly created text nodes from contenteditable
+ https://bugs.webkit.org/show_bug.cgi?id=90779
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/elements/insert-node-expected.txt:
+ * inspector/elements/insert-node.html:
+
2012-07-09 Andrey Kosyakov <[email protected]>
REGRESSION(r121980) Layout Test inspector/timeline/timeline-frames.html started to crash.
Modified: trunk/LayoutTests/inspector/elements/insert-node-expected.txt (122105 => 122106)
--- trunk/LayoutTests/inspector/elements/insert-node-expected.txt 2012-07-09 13:36:07 UTC (rev 122105)
+++ trunk/LayoutTests/inspector/elements/insert-node-expected.txt 2012-07-09 13:45:34 UTC (rev 122106)
@@ -1,5 +1,6 @@
Tests that elements panel updates dom tree structure upon node insertion.
+First text
Running: testDumpInitial
========= Original ========
@@ -52,3 +53,18 @@
</div>
Success: child text is bound
+Running: testInsertFirstTextNode
+======== Inserted first text node =========
+- <div id="container">
+ <div id="child-before"></div>
+ <div id="child1"></div>
+ <div id="child-middle"></div>
+ <div id="child2"></div>
+ - <div id="child3">First text</div>
+ "First text"
+ </div>
+ <div id="child-after"></div>
+ <div style="display: none; " id="child-with-text">Text</div>
+ </div>
+Success: child text is bound
+
Modified: trunk/LayoutTests/inspector/elements/insert-node.html (122105 => 122106)
--- trunk/LayoutTests/inspector/elements/insert-node.html 2012-07-09 13:36:07 UTC (rev 122105)
+++ trunk/LayoutTests/inspector/elements/insert-node.html 2012-07-09 13:45:34 UTC (rev 122106)
@@ -39,6 +39,12 @@
container.appendChild(child);
}
+function insertFirstTextNode()
+{
+ var child3 = document.getElementById("child3");
+ child3.innerText = "First text";
+}
+
function test()
{
var containerNode;
@@ -104,6 +110,27 @@
next();
}
InspectorTest.evaluateInPage("appendChildWithText()", callback);
+ },
+
+ function testInsertFirstTextNode(next)
+ {
+ function callback()
+ {
+ InspectorTest.addResult("======== Inserted first text node =========");
+ InspectorTest.expandElementsTree(callback2);
+ }
+
+ function callback2()
+ {
+ InspectorTest.dumpElementsTree(containerNode);
+ var newNode = InspectorTest.expandedNodeWithId("child3");
+ if (WebInspector.domAgent.nodeForId(newNode.firstChild.id))
+ InspectorTest.addResult("Success: child text is bound");
+ else
+ InspectorTest.addResult("Failed: child text is not bound");
+ next();
+ }
+ InspectorTest.evaluateInPage("insertFirstTextNode()", callback);
}
]);
}
Modified: trunk/Source/WebCore/ChangeLog (122105 => 122106)
--- trunk/Source/WebCore/ChangeLog 2012-07-09 13:36:07 UTC (rev 122105)
+++ trunk/Source/WebCore/ChangeLog 2012-07-09 13:45:34 UTC (rev 122106)
@@ -1,3 +1,15 @@
+2012-07-09 Pavel Feldman <[email protected]>
+
+ Web Inspector: inspector does not reflect newly created text nodes from contenteditable
+ https://bugs.webkit.org/show_bug.cgi?id=90779
+
+ Reviewed by Vsevolod Vlasov.
+
+ We need to report first text node as inserted, otherwise we fail to report character data modified on it.
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::characterDataModified):
+
2012-07-09 Andrey Kosyakov <[email protected]>
REGRESSION(r121980) Layout Test inspector/timeline/timeline-frames.html started to crash.
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (122105 => 122106)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2012-07-09 13:36:07 UTC (rev 122105)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2012-07-09 13:45:34 UTC (rev 122106)
@@ -1511,8 +1511,11 @@
void InspectorDOMAgent::characterDataModified(CharacterData* characterData)
{
int id = m_documentNodeToIdMap.get(characterData);
- if (!id)
+ if (!id) {
+ // Push text node if it is being created.
+ didInsertDOMNode(characterData);
return;
+ }
m_frontend->characterDataModified(id, characterData->data());
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes