Title: [207834] trunk
Revision
207834
Author
[email protected]
Date
2016-10-25 12:22:12 -0700 (Tue, 25 Oct 2016)

Log Message

Unreviewed, rolling out r207578.
https://bugs.webkit.org/show_bug.cgi?id=163962

Broke quip.com so that user can no longer type a space
(Requested by rniwa on #webkit).

Reverted changeset:

"Add a plain space instead of   between text nodes"
https://bugs.webkit.org/show_bug.cgi?id=123163
http://trac.webkit.org/changeset/207578

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (207833 => 207834)


--- trunk/LayoutTests/ChangeLog	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/ChangeLog	2016-10-25 19:22:12 UTC (rev 207834)
@@ -1,3 +1,17 @@
+2016-10-25  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r207578.
+        https://bugs.webkit.org/show_bug.cgi?id=163962
+
+        Broke quip.com so that user can no longer type a space
+        (Requested by rniwa on #webkit).
+
+        Reverted changeset:
+
+        "Add a plain space instead of &nbsp; between text nodes"
+        https://bugs.webkit.org/show_bug.cgi?id=123163
+        http://trac.webkit.org/changeset/207578
+
 2016-10-25  Ryan Haddad  <[email protected]>
 
         WebCryptoAPI test gardening after r207809.

Modified: trunk/LayoutTests/accessibility/mac/find-and-replace-match-capitalization-expected.txt (207833 => 207834)


--- trunk/LayoutTests/accessibility/mac/find-and-replace-match-capitalization-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/accessibility/mac/find-and-replace-match-capitalization-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -1,4 +1,4 @@
-The Test test TEST.
+The Test test TEST.
 
 This tests that find and replace will match the capitalization of the replaced word.
 
@@ -5,9 +5,9 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS document.getElementById('text').innerHTML is 'The Test&nbsp;jumped high.'
-PASS document.getElementById('text').innerHTML is 'The Test test&nbsp;high.'
-PASS document.getElementById('text').innerHTML is 'The Test test TEST.'
+PASS document.getElementById('text').innerHTML is 'The&nbsp;Test&nbsp;jumped high.'
+PASS document.getElementById('text').innerHTML is 'The&nbsp;Test&nbsp;test&nbsp;high.'
+PASS document.getElementById('text').innerHTML is 'The&nbsp;Test&nbsp;test&nbsp;TEST.'
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/accessibility/mac/find-and-replace-match-capitalization.html (207833 => 207834)


--- trunk/LayoutTests/accessibility/mac/find-and-replace-match-capitalization.html	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/accessibility/mac/find-and-replace-match-capitalization.html	2016-10-25 19:22:12 UTC (rev 207834)
@@ -20,15 +20,15 @@
       
         // 'Man' is capitalized, so the replaced text should end up capitalized.
         var result = text.selectTextWithCriteria("AXSelectTextAmbiguityResolutionClosestToSelection", "man", "test");
-        shouldBe("document.getElementById('text').innerHTML", "'The Test&nbsp;jumped high.'");
+        shouldBe("document.getElementById('text').innerHTML", "'The&nbsp;Test&nbsp;jumped high.'");
 
         // 'jumped' is not capitalized so the text should not be capitalized.
         result = text.selectTextWithCriteria("AXSelectTextAmbiguityResolutionClosestToSelection", "jumped", "Test");
-        shouldBe("document.getElementById('text').innerHTML", "'The Test test&nbsp;high.'");
+        shouldBe("document.getElementById('text').innerHTML", "'The&nbsp;Test&nbsp;test&nbsp;high.'");
 
         // The replacement text was all caps, so don't change based on the existing text.
         result = text.selectTextWithCriteria("AXSelectTextAmbiguityResolutionClosestToSelection", "high", "TEST");
-        shouldBe("document.getElementById('text').innerHTML", "'The Test test TEST.'");
+        shouldBe("document.getElementById('text').innerHTML", "'The&nbsp;Test&nbsp;test&nbsp;TEST.'");
 
     }
 </script>

Modified: trunk/LayoutTests/accessibility/mac/select-text/select-text-135575-expected.txt (207833 => 207834)


--- trunk/LayoutTests/accessibility/mac/select-text/select-text-135575-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/accessibility/mac/select-text/select-text-135575-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -1,6 +1,6 @@
 The quick brown fox jumps over the lazy dog.
 
-TEXT2: THE quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
+TEXT2: THE quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
 
 This tests the ability to select and replace text with respect to selection.
 

Modified: trunk/LayoutTests/accessibility/mac/select-text/select-text-7-expected.txt (207833 => 207834)


--- trunk/LayoutTests/accessibility/mac/select-text/select-text-7-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/accessibility/mac/select-text/select-text-7-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -1,4 +1,4 @@
-The slow brown fox jumps over the lazy dog.
+The slow brown fox jumps over the lazy dog.
 
 TEXT2: The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
 

Modified: trunk/LayoutTests/accessibility/mac/select-text/select-text-8-expected.txt (207833 => 207834)


--- trunk/LayoutTests/accessibility/mac/select-text/select-text-8-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/accessibility/mac/select-text/select-text-8-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -1,4 +1,4 @@
-The quick brown cat jumps over the lazy dog.
+The quick brown cat jumps over the lazy dog.
 
 TEXT2: The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
 

Modified: trunk/LayoutTests/accessibility/mac/select-text/select-text-9-expected.txt (207833 => 207834)


--- trunk/LayoutTests/accessibility/mac/select-text/select-text-9-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/accessibility/mac/select-text/select-text-9-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -1,4 +1,4 @@
-The quick Brown fox jumps over the lazy dog.
+The quick Brown fox jumps over the lazy dog.
 
 TEXT2: The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
 

Modified: trunk/LayoutTests/editing/mac/spelling/autocorrection-blockquote-crash-expected.txt (207833 => 207834)


--- trunk/LayoutTests/editing/mac/spelling/autocorrection-blockquote-crash-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/editing/mac/spelling/autocorrection-blockquote-crash-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -8,7 +8,7 @@
 TEST COMPLETE
 
 would this 
-test notational 
+test notational 
 make a difference?
 
 

Modified: trunk/LayoutTests/editing/pasteboard/paste-text-003-expected.txt (207833 => 207834)


--- trunk/LayoutTests/editing/pasteboard/paste-text-003-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/editing/pasteboard/paste-text-003-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -106,7 +106,7 @@
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 This test copies and pastes "is a tide in the affairs of men,\nWhich taken at the flood leads on to fortune.\nOmitted" twice.
 
-There is a tide in the affairs of men,
+There is a tide in the affairs of men,
 Which taken at the flood leads on to fortune.
 Omittedis a tide in the affairs of men,
 Which taken at the flood leads on to fortune.
@@ -113,5 +113,5 @@
 Omitted, all the voyage of their life,
 Is bound in shallows and in miseries.
 execCopyCommand: <div id="test" class="editing">There is a tide in the affairs of men, <div class="editing">Which taken at the flood leads on to fortune. <div class="editing">Omitted, all the voyage of their life, <div class="editing">Is bound in shallows and in miseries. </div> </div> </div> </div>
-execPasteCommand: <div id="test" class="editing">There is a tide in the affairs of men,<div class="editing">Which taken at the flood leads on to fortune.</div><div class="editing"><div class="editing">Omitted, all the voyage of their life, <div class="editing">Is bound in shallows and in miseries. </div> </div> </div> </div>
-execPasteCommand: <div id="test" class="editing">There is a tide in the affairs of men,<div class="editing">Which taken at the flood leads on to fortune.</div><div class="editing"><div class="editing">Omittedis a tide in the affairs of men,</div><div class="editing">Which taken at the flood leads on to fortune.</div><div class="editing">Omitted, all the voyage of their life, <div class="editing">Is bound in shallows and in miseries. </div> </div> </div> </div>
+execPasteCommand: <div id="test" class="editing">There&nbsp;is a tide in the affairs of men,<div class="editing">Which taken at the flood leads on to fortune.</div><div class="editing"><div class="editing">Omitted, all the voyage of their life, <div class="editing">Is bound in shallows and in miseries. </div> </div> </div> </div>
+execPasteCommand: <div id="test" class="editing">There&nbsp;is a tide in the affairs of men,<div class="editing">Which taken at the flood leads on to fortune.</div><div class="editing"><div class="editing">Omittedis a tide in the affairs of men,</div><div class="editing">Which taken at the flood leads on to fortune.</div><div class="editing">Omitted, all the voyage of their life, <div class="editing">Is bound in shallows and in miseries. </div> </div> </div> </div>

Modified: trunk/LayoutTests/platform/gtk/editing/execCommand/paste-1-expected.txt (207833 => 207834)


--- trunk/LayoutTests/platform/gtk/editing/execCommand/paste-1-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/platform/gtk/editing/execCommand/paste-1-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -10,9 +10,8 @@
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > BODY > HTML > #document to 7 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600

Modified: trunk/LayoutTests/platform/gtk/editing/pasteboard/paste-2-expected.txt (207833 => 207834)


--- trunk/LayoutTests/platform/gtk/editing/pasteboard/paste-2-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/platform/gtk/editing/pasteboard/paste-2-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -10,9 +10,8 @@
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > BODY > HTML > #document to 7 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600

Modified: trunk/LayoutTests/platform/gtk/editing/pasteboard/unrendered-br-expected.txt (207833 => 207834)


--- trunk/LayoutTests/platform/gtk/editing/pasteboard/unrendered-br-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/platform/gtk/editing/pasteboard/unrendered-br-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -2,9 +2,8 @@
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 17 of #text > DIV > DIV > BODY > HTML > #document to 17 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 17 of #text > DIV > DIV > BODY > HTML > #document to 17 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600

Modified: trunk/LayoutTests/platform/mac/editing/execCommand/paste-1-expected.txt (207833 => 207834)


--- trunk/LayoutTests/platform/mac/editing/execCommand/paste-1-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/platform/mac/editing/execCommand/paste-1-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -10,9 +10,8 @@
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > BODY > HTML > #document to 7 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600

Modified: trunk/LayoutTests/platform/mac/editing/pasteboard/paste-2-expected.txt (207833 => 207834)


--- trunk/LayoutTests/platform/mac/editing/pasteboard/paste-2-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/platform/mac/editing/pasteboard/paste-2-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -10,9 +10,8 @@
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > BODY > HTML > #document to 7 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600

Modified: trunk/LayoutTests/platform/mac/editing/pasteboard/unrendered-br-expected.txt (207833 => 207834)


--- trunk/LayoutTests/platform/mac/editing/pasteboard/unrendered-br-expected.txt	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/LayoutTests/platform/mac/editing/pasteboard/unrendered-br-expected.txt	2016-10-25 19:22:12 UTC (rev 207834)
@@ -2,9 +2,8 @@
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 17 of #text > DIV > DIV > BODY > HTML > #document to 17 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 17 of #text > DIV > DIV > BODY > HTML > #document to 17 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600

Modified: trunk/Source/WebCore/ChangeLog (207833 => 207834)


--- trunk/Source/WebCore/ChangeLog	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/Source/WebCore/ChangeLog	2016-10-25 19:22:12 UTC (rev 207834)
@@ -1,3 +1,17 @@
+2016-10-25  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r207578.
+        https://bugs.webkit.org/show_bug.cgi?id=163962
+
+        Broke quip.com so that user can no longer type a space
+        (Requested by rniwa on #webkit).
+
+        Reverted changeset:
+
+        "Add a plain space instead of &nbsp; between text nodes"
+        https://bugs.webkit.org/show_bug.cgi?id=123163
+        http://trac.webkit.org/changeset/207578
+
 2016-10-25  Chris Dumez  <[email protected]>
 
         LOG_WITH_STREAM() macro should not have a semi colon at the end

Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (207833 => 207834)


--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp	2016-10-25 19:22:12 UTC (rev 207834)
@@ -918,15 +918,13 @@
 
     VisiblePosition visibleUpstreamPos(Position(textNode, upstream));
     VisiblePosition visibleDownstreamPos(Position(textNode, downstream));
-
-    Node* nextSibling = textNode->nextSibling();
+    
     String string = text.substring(upstream, length);
     String rebalancedString = stringWithRebalancedWhitespace(string,
     // FIXME: Because of the problem mentioned at the top of this function, we must also use nbsps at the start/end of the string because
     // this function doesn't get all surrounding whitespace, just the whitespace in the current text node.
-        isStartOfParagraph(visibleUpstreamPos) || !upstream,
-        (isEndOfParagraph(visibleDownstreamPos) || (unsigned)downstream == text.length())
-        && !(nextSibling && nextSibling->isTextNode() && downcast<Text>(nextSibling)->data().at(0) != ' '));
+                                                             isStartOfParagraph(visibleUpstreamPos) || upstream == 0, 
+                                                             isEndOfParagraph(visibleDownstreamPos) || (unsigned)downstream == text.length());
     
     if (string != rebalancedString)
         replaceTextInNodePreservingMarkers(WTFMove(textNode), upstream, length, rebalancedString);

Modified: trunk/Source/WebCore/editing/htmlediting.cpp (207833 => 207834)


--- trunk/Source/WebCore/editing/htmlediting.cpp	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/Source/WebCore/editing/htmlediting.cpp	2016-10-25 19:22:12 UTC (rev 207834)
@@ -397,7 +397,7 @@
     return character == '\'' || character == '@' || character == rightSingleQuotationMark || character == hebrewPunctuationGershayim;
 }
 
-String stringWithRebalancedWhitespace(const String& string, bool startIsStartOfParagraph, bool shouldEmitNonBreakingSpaceBeforeEnd)
+String stringWithRebalancedWhitespace(const String& string, bool startIsStartOfParagraph, bool endIsEndOfParagraph)
 {
     StringBuilder rebalancedString;
 
@@ -410,8 +410,7 @@
             continue;
         }
         LChar selectedWhitespaceCharacter;
-        // We need to ensure there is no next sibling text node. See https://bugs.webkit.org/show_bug.cgi?id=123163
-        if (previousCharacterWasSpace || (!i && startIsStartOfParagraph) || (i == length - 1 && shouldEmitNonBreakingSpaceBeforeEnd)) {
+        if (previousCharacterWasSpace || (!i && startIsStartOfParagraph) || (i == length - 1 && endIsEndOfParagraph)) {
             selectedWhitespaceCharacter = noBreakSpace;
             previousCharacterWasSpace = false;
         } else {

Modified: trunk/Source/WebCore/editing/htmlediting.h (207833 => 207834)


--- trunk/Source/WebCore/editing/htmlediting.h	2016-10-25 19:20:59 UTC (rev 207833)
+++ trunk/Source/WebCore/editing/htmlediting.h	2016-10-25 19:22:12 UTC (rev 207834)
@@ -192,7 +192,7 @@
 
 bool isAmbiguousBoundaryCharacter(UChar);
 
-String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagraph, bool shouldEmitNonBreakingSpaceBeforeEnd);
+String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagraph, bool endIsEndOfParagraph);
 const String& nonBreakingSpaceString();
 
 // Miscellaneous functions for caret rendering.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to