Changeset 207834 in webkit


Ignore:
Timestamp:
Oct 25, 2016 12:22:12 PM (7 years ago)
Author:
commit-queue@webkit.org
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

Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207830 r207834  
     12016-10-25  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r207578.
     4        https://bugs.webkit.org/show_bug.cgi?id=163962
     5
     6        Broke quip.com so that user can no longer type a space
     7        (Requested by rniwa on #webkit).
     8
     9        Reverted changeset:
     10
     11        "Add a plain space instead of &nbsp; between text nodes"
     12        https://bugs.webkit.org/show_bug.cgi?id=123163
     13        http://trac.webkit.org/changeset/207578
     14
    1152016-10-25  Ryan Haddad  <ryanhaddad@apple.com>
    216
  • trunk/LayoutTests/accessibility/mac/find-and-replace-match-capitalization-expected.txt

    r207578 r207834  
    1 The Test test TEST.
     1The Test test TEST.
    22
    33This tests that find and replace will match the capitalization of the replaced word.
     
    66
    77
    8 PASS document.getElementById('text').innerHTML is 'The Test&nbsp;jumped high.'
    9 PASS document.getElementById('text').innerHTML is 'The Test test&nbsp;high.'
    10 PASS document.getElementById('text').innerHTML is 'The Test test TEST.'
     8PASS document.getElementById('text').innerHTML is 'The&nbsp;Test&nbsp;jumped high.'
     9PASS document.getElementById('text').innerHTML is 'The&nbsp;Test&nbsp;test&nbsp;high.'
     10PASS document.getElementById('text').innerHTML is 'The&nbsp;Test&nbsp;test&nbsp;TEST.'
    1111PASS successfullyParsed is true
    1212
  • trunk/LayoutTests/accessibility/mac/find-and-replace-match-capitalization.html

    r207578 r207834  
    2121        // 'Man' is capitalized, so the replaced text should end up capitalized.
    2222        var result = text.selectTextWithCriteria("AXSelectTextAmbiguityResolutionClosestToSelection", "man", "test");
    23         shouldBe("document.getElementById('text').innerHTML", "'The Test&nbsp;jumped high.'");
     23        shouldBe("document.getElementById('text').innerHTML", "'The&nbsp;Test&nbsp;jumped high.'");
    2424
    2525        // 'jumped' is not capitalized so the text should not be capitalized.
    2626        result = text.selectTextWithCriteria("AXSelectTextAmbiguityResolutionClosestToSelection", "jumped", "Test");
    27         shouldBe("document.getElementById('text').innerHTML", "'The Test test&nbsp;high.'");
     27        shouldBe("document.getElementById('text').innerHTML", "'The&nbsp;Test&nbsp;test&nbsp;high.'");
    2828
    2929        // The replacement text was all caps, so don't change based on the existing text.
    3030        result = text.selectTextWithCriteria("AXSelectTextAmbiguityResolutionClosestToSelection", "high", "TEST");
    31         shouldBe("document.getElementById('text').innerHTML", "'The Test test TEST.'");
     31        shouldBe("document.getElementById('text').innerHTML", "'The&nbsp;Test&nbsp;test&nbsp;TEST.'");
    3232
    3333    }
  • trunk/LayoutTests/accessibility/mac/select-text/select-text-135575-expected.txt

    r207578 r207834  
    11The quick brown fox jumps over the lazy dog.
    22
    3 TEXT2: THE quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
     3TEXT2: THE quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
    44
    55This tests the ability to select and replace text with respect to selection.
  • trunk/LayoutTests/accessibility/mac/select-text/select-text-7-expected.txt

    r207578 r207834  
    1 The slow brown fox jumps over the lazy dog.
     1The slow brown fox jumps over the lazy dog.
    22
    33TEXT2: The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
  • trunk/LayoutTests/accessibility/mac/select-text/select-text-8-expected.txt

    r207578 r207834  
    1 The quick brown cat jumps over the lazy dog.
     1The quick brown cat jumps over the lazy dog.
    22
    33TEXT2: The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
  • trunk/LayoutTests/accessibility/mac/select-text/select-text-9-expected.txt

    r207578 r207834  
    1 The quick Brown fox jumps over the lazy dog.
     1The quick Brown fox jumps over the lazy dog.
    22
    33TEXT2: The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
  • trunk/LayoutTests/editing/mac/spelling/autocorrection-blockquote-crash-expected.txt

    r207578 r207834  
    99
    1010would this
    11 test notational 
     11test notational 
    1212make a difference?
    1313
  • trunk/LayoutTests/editing/pasteboard/paste-text-003-expected.txt

    r207578 r207834  
    107107This test copies and pastes "is a tide in the affairs of men,\nWhich taken at the flood leads on to fortune.\nOmitted" twice.
    108108
    109 There is a tide in the affairs of men,
     109There is a tide in the affairs of men,
    110110Which taken at the flood leads on to fortune.
    111111Omittedis a tide in the affairs of men,
     
    114114Is bound in shallows and in miseries.
    115115execCopyCommand: <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>
    116 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>
    117 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>
     116execPasteCommand: <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>
     117execPasteCommand: <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>
  • trunk/LayoutTests/platform/gtk/editing/execCommand/paste-1-expected.txt

    r207578 r207834  
    1111EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    1212EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
    13 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    14 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
     13EDITING 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
    1514EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1615EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/gtk/editing/pasteboard/paste-2-expected.txt

    r207578 r207834  
    1111EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    1212EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
    13 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    14 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
     13EDITING 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
    1514EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1615EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/gtk/editing/pasteboard/unrendered-br-expected.txt

    r207578 r207834  
    33EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6 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
     5EDITING 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
    76EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    87EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/execCommand/paste-1-expected.txt

    r207578 r207834  
    1111EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    1212EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
    13 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    14 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
     13EDITING 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
    1514EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1615EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/paste-2-expected.txt

    r207578 r207834  
    1111EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    1212EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
    13 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    14 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
     13EDITING 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
    1514EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1615EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/unrendered-br-expected.txt

    r207578 r207834  
    33EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6 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
     5EDITING 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
    76EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    87EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/Source/WebCore/ChangeLog

    r207833 r207834  
     12016-10-25  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r207578.
     4        https://bugs.webkit.org/show_bug.cgi?id=163962
     5
     6        Broke quip.com so that user can no longer type a space
     7        (Requested by rniwa on #webkit).
     8
     9        Reverted changeset:
     10
     11        "Add a plain space instead of &nbsp; between text nodes"
     12        https://bugs.webkit.org/show_bug.cgi?id=123163
     13        http://trac.webkit.org/changeset/207578
     14
    1152016-10-25  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/editing/CompositeEditCommand.cpp

    r207698 r207834  
    919919    VisiblePosition visibleUpstreamPos(Position(textNode, upstream));
    920920    VisiblePosition visibleDownstreamPos(Position(textNode, downstream));
    921 
    922     Node* nextSibling = textNode->nextSibling();
     921   
    923922    String string = text.substring(upstream, length);
    924923    String rebalancedString = stringWithRebalancedWhitespace(string,
    925924    // 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
    926925    // this function doesn't get all surrounding whitespace, just the whitespace in the current text node.
    927         isStartOfParagraph(visibleUpstreamPos) || !upstream,
    928         (isEndOfParagraph(visibleDownstreamPos) || (unsigned)downstream == text.length())
    929         && !(nextSibling && nextSibling->isTextNode() && downcast<Text>(nextSibling)->data().at(0) != ' '));
     926                                                             isStartOfParagraph(visibleUpstreamPos) || upstream == 0,
     927                                                             isEndOfParagraph(visibleDownstreamPos) || (unsigned)downstream == text.length());
    930928   
    931929    if (string != rebalancedString)
  • trunk/Source/WebCore/editing/htmlediting.cpp

    r207578 r207834  
    398398}
    399399
    400 String stringWithRebalancedWhitespace(const String& string, bool startIsStartOfParagraph, bool shouldEmitNonBreakingSpaceBeforeEnd)
     400String stringWithRebalancedWhitespace(const String& string, bool startIsStartOfParagraph, bool endIsEndOfParagraph)
    401401{
    402402    StringBuilder rebalancedString;
     
    411411        }
    412412        LChar selectedWhitespaceCharacter;
    413         // We need to ensure there is no next sibling text node. See https://bugs.webkit.org/show_bug.cgi?id=123163
    414         if (previousCharacterWasSpace || (!i && startIsStartOfParagraph) || (i == length - 1 && shouldEmitNonBreakingSpaceBeforeEnd)) {
     413        if (previousCharacterWasSpace || (!i && startIsStartOfParagraph) || (i == length - 1 && endIsEndOfParagraph)) {
    415414            selectedWhitespaceCharacter = noBreakSpace;
    416415            previousCharacterWasSpace = false;
  • trunk/Source/WebCore/editing/htmlediting.h

    r207578 r207834  
    193193bool isAmbiguousBoundaryCharacter(UChar);
    194194
    195 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagraph, bool shouldEmitNonBreakingSpaceBeforeEnd);
     195String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagraph, bool endIsEndOfParagraph);
    196196const String& nonBreakingSpaceString();
    197197
Note: See TracChangeset for help on using the changeset viewer.