Changeset 152185 in webkit
- Timestamp:
- Jun 28, 2013 12:59:04 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r152184 r152185 1 2013-06-28 Ryosuke Niwa <rniwa@webkit.org> 2 3 -webkit-line-break: after-white-space sometimes truncates DOM on copy & paste 4 https://bugs.webkit.org/show_bug.cgi?id=118164 5 6 Reviewed by Sam Weinig. 7 8 Add a regression test. 9 10 * editing/pasteboard/simplfiying-markup-should-not-strip-content-expected.txt: Added. 11 * editing/pasteboard/simplfiying-markup-should-not-strip-content.html: Added. 12 1 13 2013-06-28 Jer Noble <jer.noble@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r152183 r152185 1 2013-06-28 Ryosuke Niwa <rniwa@webkit.org> 2 3 -webkit-line-break: after-white-space sometimes truncates DOM on copy & paste 4 https://bugs.webkit.org/show_bug.cgi?id=118164 5 6 Reviewed by Sam Weinig. 7 8 We can't assume that all subsequent ancestors contain exactly one child since they could have been 9 added in the first if statement matching: currentNode->parentNode() != rootNode && isRemovableBlock(currentNode) 10 11 Exit early when we encounter such an ancestor since removing its ancestor (that contains multiple children 12 some of which aren't in nodesToRemove) can clobber more nodes than we're allowed to remove. 13 14 Test: editing/pasteboard/simplfiying-markup-should-not-strip-content.html 15 16 * editing/SimplifyMarkupCommand.cpp: 17 (WebCore::SimplifyMarkupCommand::doApply): 18 (WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove): 19 1 20 2013-06-28 Gwang Yoon Hwang <ryumiel@company100.net> 2 21 -
trunk/Source/WebCore/editing/SimplifyMarkupCommand.cpp
r138303 r152185 45 45 Vector<RefPtr<Node> > nodesToRemove; 46 46 47 document()->updateLayoutIgnorePendingStylesheets(); 48 47 49 // Walk through the inserted nodes, to see if there are elements that could be removed 48 50 // without affecting the style. The goal is to produce leaner markup even when starting … … 103 105 if (nodesToRemove[pastLastNodeToRemove - 1]->parentNode() != nodesToRemove[pastLastNodeToRemove]) 104 106 break; 105 ASSERT(nodesToRemove[pastLastNodeToRemove]->firstChild() == nodesToRemove[pastLastNodeToRemove]->lastChild()); 107 if (nodesToRemove[pastLastNodeToRemove]->firstChild() != nodesToRemove[pastLastNodeToRemove]->lastChild()) 108 break; 106 109 } 107 110
Note: See TracChangeset
for help on using the changeset viewer.