megan_gardner@apple.com | 07573fa | 2019-02-06 05:52:01 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | |
| 4 | <style> |
| 5 | .editing { |
| 6 | border: 2px solid red; |
| 7 | font-size: 24px; |
| 8 | } |
| 9 | .explanation { |
| 10 | border: 2px solid blue; |
| 11 | padding: 12px; |
| 12 | font-size: 24px; |
| 13 | margin-bottom: 24px; |
| 14 | } |
| 15 | .scenario { margin-bottom: 16px;} |
| 16 | .scenario:first-line { font-weight: bold; margin-bottom: 16px;} |
| 17 | .expected-results:first-line { font-weight: bold } |
| 18 | </style> |
justing | 6904406 | 2006-05-11 01:26:20 +0000 | [diff] [blame] | 19 | |
megan_gardner@apple.com | f597bed | 2019-02-01 23:27:30 +0000 | [diff] [blame] | 20 | <script src="../editing.js"></script> |
| 21 | <script src="../../resources/ui-helper.js"></script> |
justing | 6904406 | 2006-05-11 01:26:20 +0000 | [diff] [blame] | 22 | <script> |
justing | 6904406 | 2006-05-11 01:26:20 +0000 | [diff] [blame] | 23 | |
megan_gardner@apple.com | 07573fa | 2019-02-06 05:52:01 +0000 | [diff] [blame] | 24 | async function editingTest() { |
megan_gardner@apple.com | f597bed | 2019-02-01 23:27:30 +0000 | [diff] [blame] | 25 | await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); |
| 26 | copyCommand(); |
| 27 | moveSelectionBackwardByCharacterCommand(); |
| 28 | moveSelectionForwardByCharacterCommand(); |
| 29 | extendSelectionForwardByLineCommand(); |
| 30 | pasteCommand(); |
| 31 | } |
megan_gardner@apple.com | 07573fa | 2019-02-06 05:52:01 +0000 | [diff] [blame] | 32 | </script> |
megan_gardner@apple.com | f597bed | 2019-02-01 23:27:30 +0000 | [diff] [blame] | 33 | |
megan_gardner@apple.com | 07573fa | 2019-02-06 05:52:01 +0000 | [diff] [blame] | 34 | <div class="explanation"> |
| 35 | <div class="scenario"> |
| 36 | <p>There was a bug in paste's smart replace whitespace handling. In some cases, it used information gathered at the start of the selection being pasted into to decide whether or not a space needed to be added to the end of the incoming content.</p> |
| 37 | <div class="expected-results"> |
| 38 | Expected Results: |
| 39 | <br> |
| 40 | A smart paste is performed into a selection starting in one block and ending in another. Spaces should surround the pasted word and look like: |
| 41 | <br> |
| 42 | f foo bar |
| 43 | </div> |
| 44 | <div id="test" contenteditable="true"><div>foo</div><div>x bar</div></div> |
| 45 | |
| 46 | <script> |
| 47 | runDumpAsTextEditingTest(true); |
rniwa@webkit.org | 14f6b5b | 2012-06-13 08:51:53 +0000 | [diff] [blame] | 48 | </script> |