Web Inspector: support undo/redo of insertAdjacentHTML
[WebKit-https.git] / Source / WebCore / ChangeLog
index 5dc03d9..a21161a 100644 (file)
@@ -1,3 +1,29 @@
+2017-11-09  Devin Rousso  <webkit@devinrousso.com>
+
+        Web Inspector: support undo/redo of insertAdjacentHTML
+        https://bugs.webkit.org/show_bug.cgi?id=179283
+
+        Reviewed by Joseph Pecoraro.
+
+        Test: inspector/dom/insertAdjacentHTML.html
+
+        Create another version of Element::insertAdjacentHTML that keeps track of the nodes that are
+        added. This is necessary because the children of a DocumentFragment are removed when it is
+        added to a ContainerNode. In this way, it is possible to remove those nodes during an undo.
+
+        * dom/Element.h:
+        * dom/Element.cpp:
+        (WebCore::Element::insertAdjacentHTML):
+
+        * inspector/DOMEditor.h:
+        * inspector/DOMEditor.cpp:
+        (WebCore::DOMEditor::insertAdjacentHTML):
+        Drive-by fix: sort functions and class declarations.
+
+        * inspector/agents/InspectorDOMAgent.h:
+        * inspector/agents/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::insertAdjacentHTML):
+
 2017-11-09  Zalan Bujtas  <zalan@apple.com>
 
         [LayoutState cleanup] Remove redundant LayoutState c'tor