Changeset 74214 in webkit
- Timestamp:
- Dec 16, 2010 2:08:01 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r74213 r74214 1 2010-12-16 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 execCommand('JustifyCenter') adds extra BR 6 https://bugs.webkit.org/show_bug.cgi?id=51082 7 8 Added a test to ensure WebKit executes Justify* properly. In particular, 9 this test ensures WebKit does not erroneously add a BR at the end of each block. 10 11 * editing/execCommand/justify-expected.txt: Added. 12 * editing/execCommand/justify.html: Added. 13 1 14 2010-12-16 Jian Li <jianli@chromium.org> 2 15 -
trunk/WebCore/ChangeLog
r74208 r74214 1 2010-12-16 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 execCommand('JustifyCenter') adds extra BR 6 https://bugs.webkit.org/show_bug.cgi?id=51082 7 8 The bug was caused by moveParagraphContentsToNewBlockIfNecessary's adding a placeholder br 9 to new block and not removing it later. Fixed the bug by removing it when the paragraph 10 moved into the block didn't have a br at the end. 11 12 Test: editing/execCommand/justify.html 13 14 * editing/CompositeEditCommand.cpp: 15 (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): 16 1 17 2010-12-16 Jian Li <jianli@chromium.org> 2 18 -
trunk/WebCore/editing/CompositeEditCommand.cpp
r73416 r74214 717 717 RefPtr<Node> newBlock = insertNewDefaultParagraphElementAt(upstreamStart); 718 718 719 bool endWasBr = visibleParagraphEnd.deepEquivalent().node()->hasTagName(brTag); 720 719 721 moveParagraphs(visibleParagraphStart, visibleParagraphEnd, VisiblePosition(Position(newBlock.get(), 0))); 720 722 723 if (newBlock->lastChild() && newBlock->lastChild()->hasTagName(brTag) && !endWasBr) 724 removeNode(newBlock->lastChild()); 725 721 726 return newBlock.release(); 722 727 }
Note: See TracChangeset
for help on using the changeset viewer.