LayoutTests:
Reviewed by harrison
<rdar://problem/
4700297>
REGRESSION: After replacing a misspelled word in a sentence, the selection extends to end of current line
Fixed:
* editing/pasteboard/smart-paste-002-expected.checksum:
* editing/pasteboard/smart-paste-002-expected.png:
* editing/pasteboard/smart-paste-002-expected.txt:
Added to demonstrate fix:
* editing/pasteboard/
4700297-expected.checksum: Added.
* editing/pasteboard/
4700297-expected.png: Added.
* editing/pasteboard/
4700297-expected.txt: Added.
* editing/pasteboard/
4700297.html: Added.
Removed a superfluous style span:
* editing/deleting/pruning-after-merge-1-expected.txt:
* editing/pasteboard/interchange-newline-1-expected.txt:
* editing/pasteboard/paste-text-019-expected.checksum:
* editing/pasteboard/paste-text-019-expected.png:
* editing/pasteboard/paste-text-019-expected.txt:
* editing/selection/drag-to-contenteditable-iframe-expected.txt:
Accidently checked in bad results yesterday:
* editing/pasteboard/copy-paste-bidi-expected.txt:
Equivalent render tree:
* editing/pasteboard/smart-paste-001-expected.txt:
WebCore:
Reviewed by harrison
<rdar://problem/
4700297>
REGRESSION: After replacing a misspelled word in a sentence, the selection extends to end of current line
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply): Rebalance whitespace
around insertionPos before insertion because the content might
cause a collapse, e.g. inserting <div>foo</div> at hello^ world.
* editing/htmlediting.cpp:
(WebCore::rebalanceWhitespaceInTextNode): Rebalance with all nbsps
for simplicity, we can produce sequences of regular spaces and
nbsps on serialization (10636).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16122
268f45cc-cd09-0410-ab3c-
d52691b4dbfc