Changeset 121933 in webkit
- Timestamp:
- Jul 5, 2012 6:27:35 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r121930 r121933 1 2012-07-05 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r121921. 4 http://trac.webkit.org/changeset/121921 5 https://bugs.webkit.org/show_bug.cgi?id=90648 6 7 caused hundreds of crashes on Mac (Requested by pizlo on 8 #webkit). 9 10 * platform/chromium/editing/surrounding-text/surrounding-text-expected.txt: 11 * platform/chromium/editing/surrounding-text/surrounding-text.html: 12 1 13 2012-07-05 Hayato Ito <hayato@chromium.org> 2 14 -
trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text-expected.txt
r121921 r121933 16 16 PASS surroundingText('<option>.</option>12345<button id="here">test</button><option>.</option>', 0, 100) is "" 17 17 PASS surroundingText('<option>.</option>12345<button>te<span id="here">st</span></button><option>.</option>', 0, 100) is "" 18 PASS surroundingText('<p id="here">.', 0, 2) is "."19 18 PASS successfullyParsed is true 20 19 -
trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text.html
r121921 r121933 41 41 shouldBeEqualToString('surroundingText(\'<option>.</option>12345<button id="here">test</button><option>.</option>\', 0, 100)', ''); 42 42 shouldBeEqualToString('surroundingText(\'<option>.</option>12345<button>te<span id="here">st</span></button><option>.</option>\', 0, 100)', ''); 43 shouldBeEqualToString('surroundingText(\'<p id="here">.\', 0, 2)', '.');44 43 45 44 document.body.removeChild(document.getElementById('test')); -
trunk/Source/WebCore/ChangeLog
r121932 r121933 1 2012-07-05 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r121921. 4 http://trac.webkit.org/changeset/121921 5 https://bugs.webkit.org/show_bug.cgi?id=90648 6 7 caused hundreds of crashes on Mac (Requested by pizlo on 8 #webkit). 9 10 * editing/SurroundingText.cpp: 11 (WebCore::SurroundingText::SurroundingText): 12 * editing/TextIterator.cpp: 13 (WebCore::CharacterIterator::advance): 14 (WebCore::BackwardsCharacterIterator::advance): 15 1 16 2012-07-05 Anders Carlsson <andersca@apple.com> 2 17 -
trunk/Source/WebCore/editing/SurroundingText.cpp
r121921 r121933 46 46 const unsigned halfMaxLength = maxLength / 2; 47 47 CharacterIterator forwardIterator(makeRange(visiblePosition, endOfDocument(visiblePosition)).get(), TextIteratorStopsOnFormControls); 48 if (!forwardIterator.atEnd()) 49 forwardIterator.advance(maxLength - halfMaxLength); 48 forwardIterator.advance(maxLength - halfMaxLength); 50 49 51 50 Position position = visiblePosition.deepEquivalent().parentAnchoredEquivalent(); … … 55 54 56 55 BackwardsCharacterIterator backwardsIterator(makeRange(startOfDocument(visiblePosition), visiblePosition).get(), TextIteratorStopsOnFormControls); 57 if (!backwardsIterator.atEnd()) 58 backwardsIterator.advance(halfMaxLength); 56 backwardsIterator.advance(halfMaxLength); 59 57 60 58 m_positionOffsetInContent = Range::create(document, backwardsIterator.range()->endPosition(), position)->text().length(); -
trunk/Source/WebCore/editing/TextIterator.cpp
r121921 r121933 1407 1407 void CharacterIterator::advance(int count) 1408 1408 { 1409 ASSERT(!atEnd());1410 1411 1409 if (count <= 0) { 1412 1410 ASSERT(count == 0); … … 1517 1515 void BackwardsCharacterIterator::advance(int count) 1518 1516 { 1519 ASSERT(!atEnd());1520 1521 1517 if (count <= 0) { 1522 1518 ASSERT(!count);
Note: See TracChangeset
for help on using the changeset viewer.