Title: [236618] trunk/Source/WebCore
Revision
236618
Author
[email protected]
Date
2018-09-28 15:32:56 -0700 (Fri, 28 Sep 2018)

Log Message

REGRESSION(r236609): API tests for mso list preservation are failing
https://bugs.webkit.org/show_bug.cgi?id=190095

Reviewed by Wenson Hsieh.

The regression was caused by appendNodeToPreserveMSOList called after an early return for not having renderer.
Clearly, comment & style elements coming from a MS word document wouldn't have a renderer.

Fixed the bug by changing the order.

* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (236617 => 236618)


--- trunk/Source/WebCore/ChangeLog	2018-09-28 22:32:34 UTC (rev 236617)
+++ trunk/Source/WebCore/ChangeLog	2018-09-28 22:32:56 UTC (rev 236618)
@@ -1,5 +1,20 @@
 2018-09-28  Ryosuke Niwa  <[email protected]>
 
+        REGRESSION(r236609): API tests for mso list preservation are failing
+        https://bugs.webkit.org/show_bug.cgi?id=190095
+
+        Reviewed by Wenson Hsieh.
+
+        The regression was caused by appendNodeToPreserveMSOList called after an early return for not having renderer.
+        Clearly, comment & style elements coming from a MS word document wouldn't have a renderer.
+
+        Fixed the bug by changing the order.
+
+        * editing/markup.cpp:
+        (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
+
+2018-09-28  Ryosuke Niwa  <[email protected]>
+
         Build fix after r236612.
 
         * platform/win/PasteboardWin.cpp:

Modified: trunk/Source/WebCore/editing/markup.cpp (236617 => 236618)


--- trunk/Source/WebCore/editing/markup.cpp	2018-09-28 22:32:34 UTC (rev 236617)
+++ trunk/Source/WebCore/editing/markup.cpp	2018-09-28 22:32:56 UTC (rev 236618)
@@ -523,14 +523,14 @@
 
     unsigned depth = 0;
     auto enterNode = [&] (Node& node) {
-        if (!node.renderer() && !enclosingElementWithTag(firstPositionInOrBeforeNode(&node), selectTag))
-            return false;
-
         if (UNLIKELY(m_shouldPreserveMSOList) && shouldEmit) {
             if (appendNodeToPreserveMSOList(node))
                 return false;
         }
 
+        if (!node.renderer() && !enclosingElementWithTag(firstPositionInOrBeforeNode(&node), selectTag))
+            return false;
+
         ++depth;
         if (shouldEmit)
             appendStartTag(node);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to