Changeset 55705 in webkit
- Timestamp:
- Mar 8, 2010 8:32:08 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55686 r55705 1 2010-03-08 Tony Chang <tony@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 https://bugs.webkit.org/show_bug.cgi?id=32131 6 Work around a crash when inserting an ordered list. This was caused 7 by incorrect logic when trying to restore a range from a location. 8 We compute the offset using TextIterator, but were sometimes using 9 VisiblePosition::next() to iterate instead. 10 11 * editing/execCommand/insert-ordered-list-expected.txt: Added. 12 * editing/execCommand/insert-ordered-list.html: Added. 13 1 14 2010-03-08 Dimitri Glazkov <dglazkov@chromium.org> 2 15 -
trunk/WebCore/ChangeLog
r55701 r55705 1 2010-03-08 Tony Chang <tony@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 https://bugs.webkit.org/show_bug.cgi?id=32131 6 Crash when inserting an ordered list. 7 8 Test: editing/execCommand/insert-ordered-list.html 9 10 * editing/CompositeEditCommand.cpp: 11 (WebCore::CompositeEditCommand::moveParagraphs): 12 * editing/TextIterator.cpp: 13 (WebCore::TextIterator::rangeFromLocationAndLength): 14 1 15 2010-03-08 Darin Adler <darin@apple.com> 2 16 -
trunk/WebCore/editing/CompositeEditCommand.cpp
r55271 r55705 951 951 952 952 cleanupAfterDeletion(); 953 ASSERT(destination.deepEquivalent().node()->inDocument()); 953 954 954 955 // Add a br if pruning an empty block level element caused a collapse. For example: … … 972 973 973 974 setEndingSelection(destination); 975 ASSERT(endingSelection().isCaretOrRange()); 974 976 applyCommandToComposite(ReplaceSelectionCommand::create(document(), fragment, true, false, !preserveStyle, false, true)); 975 977 -
trunk/WebCore/editing/TextIterator.cpp
r53151 r55705 2038 2038 // Fix textRunRange->endPosition(), but only if foundStart || foundEnd, because it is only 2039 2039 // in those cases that textRunRange is used. 2040 if (found Start || foundEnd) {2040 if (foundEnd) { 2041 2041 // FIXME: This is a workaround for the fact that the end of a run is often at the wrong 2042 2042 // position for emitted '\n's. 2043 2043 if (len == 1 && it.characters()[0] == '\n') { 2044 Position runStart = textRunRange->startPosition(); 2045 Position runEnd = VisiblePosition(runStart).next().deepEquivalent(); 2046 if (runEnd.isNotNull()) { 2044 scope->document()->updateLayoutIgnorePendingStylesheets(); 2045 it.advance(); 2046 if (!it.atEnd()) { 2047 RefPtr<Range> range = it.range(); 2047 2048 ExceptionCode ec = 0; 2048 textRunRange->setEnd(r unEnd.node(), runEnd.deprecatedEditingOffset(), ec);2049 textRunRange->setEnd(range->startContainer(), range->startOffset(), ec); 2049 2050 ASSERT(!ec); 2051 } else { 2052 Position runStart = textRunRange->startPosition(); 2053 Position runEnd = VisiblePosition(runStart).next().deepEquivalent(); 2054 if (runEnd.isNotNull()) { 2055 ExceptionCode ec = 0; 2056 textRunRange->setEnd(runEnd.node(), runEnd.deprecatedEditingOffset(), ec); 2057 ASSERT(!ec); 2058 } 2050 2059 } 2051 2060 }
Note: See TracChangeset
for help on using the changeset viewer.