Title: [266281] trunk/Source/WebCore
Revision
266281
Author
[email protected]
Date
2020-08-28 10:00:27 -0700 (Fri, 28 Aug 2020)

Log Message

Remove adopted node from TextManipulationController
https://bugs.webkit.org/show_bug.cgi?id=215914

Reviewed by Wenson Hsieh.

Remove Node from TextManipulationController when it gets adopted to a new document.

* dom/Node.cpp:
(WebCore::Node::moveNodeToNewDocument):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (266280 => 266281)


--- trunk/Source/WebCore/ChangeLog	2020-08-28 16:47:59 UTC (rev 266280)
+++ trunk/Source/WebCore/ChangeLog	2020-08-28 17:00:27 UTC (rev 266281)
@@ -1,3 +1,15 @@
+2020-08-28  Ryosuke Niwa  <[email protected]>
+
+        Remove adopted node from TextManipulationController
+        https://bugs.webkit.org/show_bug.cgi?id=215914
+
+        Reviewed by Wenson Hsieh.
+
+        Remove Node from TextManipulationController when it gets adopted to a new document.
+
+        * dom/Node.cpp:
+        (WebCore::Node::moveNodeToNewDocument):
+
 2020-08-28  Antoine Quint  <[email protected]>
 
         REGRESSION (r263506): scale transform transitions won't overshoot

Modified: trunk/Source/WebCore/dom/Node.cpp (266280 => 266281)


--- trunk/Source/WebCore/dom/Node.cpp	2020-08-28 16:47:59 UTC (rev 266280)
+++ trunk/Source/WebCore/dom/Node.cpp	2020-08-28 17:00:27 UTC (rev 266281)
@@ -2071,6 +2071,10 @@
             cache->remove(*this);
     }
 
+    auto* textManipulationController = oldDocument.textManipulationControllerIfExists();
+    if (UNLIKELY(textManipulationController))
+        textManipulationController->removeNode(this);
+
     if (auto* eventTargetData = this->eventTargetData()) {
         if (!eventTargetData->eventListenerMap.isEmpty()) {
             for (auto& type : eventTargetData->eventListenerMap.eventTypes())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to