Mail hangs when removing multiple rows from large table.
[WebKit-https.git] / Source / WebCore / ChangeLog
index e01a695..5255e79 100644 (file)
@@ -1,3 +1,26 @@
+2017-02-10  Zalan Bujtas  <zalan@apple.com>
+
+        Mail hangs when removing multiple rows from large table.
+        https://bugs.webkit.org/show_bug.cgi?id=168103
+        <rdar://problem/30090186>
+
+        Reviewed by Ryosuke Niwa.
+
+        DeleteSelectionCommand::removeNode doesn't actually destroy table structure items,
+        but instead it removes their content. In order to be able to continue editing the table after
+        the delete, we need to ensure that its cells' width and height are > 0. Currently we issue layout on
+        each table item recursively.
+        This patch delays the layout until after we've finished with the entire subtree delete (10x progression).
+
+        Performance test added.
+
+        * editing/DeleteSelectionCommand.cpp:
+        (WebCore::DeleteSelectionCommand::insertBlockPlaceholderForTableCellIfNeeded):
+        (WebCore::DeleteSelectionCommand::removeNodeUpdatingStates):
+        (WebCore::shouldRemoveContentOnly):
+        (WebCore::DeleteSelectionCommand::removeNode):
+        * editing/DeleteSelectionCommand.h:
+
 2017-02-10  Joseph Pecoraro  <pecoraro@apple.com>
 
         [Resource Timing] Enable Resource Timing by default in Tests