Changeset 121933 in webkit


Ignore:
Timestamp:
Jul 5, 2012 6:27:35 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r121921.
http://trac.webkit.org/changeset/121921
https://bugs.webkit.org/show_bug.cgi?id=90648

caused hundreds of crashes on Mac (Requested by pizlo on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-07-05

Source/WebCore:

  • editing/SurroundingText.cpp:

(WebCore::SurroundingText::SurroundingText):

  • editing/TextIterator.cpp:

(WebCore::CharacterIterator::advance):
(WebCore::BackwardsCharacterIterator::advance):

LayoutTests:

  • platform/chromium/editing/surrounding-text/surrounding-text-expected.txt:
  • platform/chromium/editing/surrounding-text/surrounding-text.html:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r121930 r121933  
     12012-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
    1132012-07-05  Hayato Ito  <hayato@chromium.org>
    214
  • trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text-expected.txt

    r121921 r121933  
    1616PASS surroundingText('<option>.</option>12345<button id="here">test</button><option>.</option>', 0, 100) is ""
    1717PASS 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 "."
    1918PASS successfullyParsed is true
    2019
  • trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text.html

    r121921 r121933  
    4141    shouldBeEqualToString('surroundingText(\'<option>.</option>12345<button id="here">test</button><option>.</option>\', 0, 100)', '');
    4242    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)', '.');
    4443
    4544    document.body.removeChild(document.getElementById('test'));
  • trunk/Source/WebCore/ChangeLog

    r121932 r121933  
     12012-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
    1162012-07-05  Anders Carlsson  <andersca@apple.com>
    217
  • trunk/Source/WebCore/editing/SurroundingText.cpp

    r121921 r121933  
    4646    const unsigned halfMaxLength = maxLength / 2;
    4747    CharacterIterator forwardIterator(makeRange(visiblePosition, endOfDocument(visiblePosition)).get(), TextIteratorStopsOnFormControls);
    48     if (!forwardIterator.atEnd())
    49         forwardIterator.advance(maxLength - halfMaxLength);
     48    forwardIterator.advance(maxLength - halfMaxLength);
    5049
    5150    Position position = visiblePosition.deepEquivalent().parentAnchoredEquivalent();
     
    5554
    5655    BackwardsCharacterIterator backwardsIterator(makeRange(startOfDocument(visiblePosition), visiblePosition).get(), TextIteratorStopsOnFormControls);
    57     if (!backwardsIterator.atEnd())
    58         backwardsIterator.advance(halfMaxLength);
     56    backwardsIterator.advance(halfMaxLength);
    5957
    6058    m_positionOffsetInContent = Range::create(document, backwardsIterator.range()->endPosition(), position)->text().length();
  • trunk/Source/WebCore/editing/TextIterator.cpp

    r121921 r121933  
    14071407void CharacterIterator::advance(int count)
    14081408{
    1409     ASSERT(!atEnd());
    1410 
    14111409    if (count <= 0) {
    14121410        ASSERT(count == 0);
     
    15171515void BackwardsCharacterIterator::advance(int count)
    15181516{
    1519     ASSERT(!atEnd());
    1520 
    15211517    if (count <= 0) {
    15221518        ASSERT(!count);
Note: See TracChangeset for help on using the changeset viewer.