Changeset 121357 in webkit
- Timestamp:
- Jun 27, 2012 12:42:22 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r121356 r121357 1 2012-06-27 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION (Safari 5?): Pasting a line into textarea inserts two newlines 4 https://bugs.webkit.org/show_bug.cgi?id=49288 5 6 Reviewed by Tony Chang. 7 8 Add a test regerssion test for copying & pasting a line in pre into textarea twice. 9 10 * editing/pasteboard/copy-paste-pre-line-content-expected.txt: Added. 11 * editing/pasteboard/copy-paste-pre-line-content.html: Added. 12 1 13 2012-06-27 Alpha Lam <hclam@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r121352 r121357 1 2012-06-27 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION (Safari 5?): Pasting a line into textarea inserts two newlines 4 https://bugs.webkit.org/show_bug.cgi?id=49288 5 6 Reviewed by Tony Chang. 7 8 The bug was caused by positionAvoidingPrecedingNodes getting out of a block when the insertion point is at a line break. 9 It caused the subsequent code to be misinformed of the insertion position and ended up not pruning the extra line break. 10 11 Fixed the bug by checking this special case and bailing out so that we don't crawl out of the enclosing block. 12 It's similar to checks several lines below it. 13 14 Test: editing/pasteboard/copy-paste-pre-line-content.html 15 16 * editing/ReplaceSelectionCommand.cpp: 17 (WebCore::positionAvoidingPrecedingNodes): 18 1 19 2012-06-27 Andrei Onea <onea@adobe.com> 2 20 -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r120044 r121357 124 124 Node* enclosingBlockNode = enclosingBlock(pos.containerNode()); 125 125 for (Position nextPosition = pos; nextPosition.containerNode() != enclosingBlockNode; pos = nextPosition) { 126 if (lineBreakExistsAtPosition(pos)) 127 break; 128 126 129 if (pos.containerNode()->nonShadowBoundaryParentNode()) 127 130 nextPosition = positionInParentAfterNode(pos.containerNode());
Note: See TracChangeset
for help on using the changeset viewer.