Changeset 142459 in webkit


Ignore:
Timestamp:
Feb 11, 2013 5:51:02 AM (11 years ago)
Author:
mkwst@chromium.org
Message:

Use IGNORE_EXCEPTION for Editor::countMatchesForText's ignored exceptions.
https://bugs.webkit.org/show_bug.cgi?id=109372

Reviewed by Jochen Eisinger.

Rather than implicitly ignoring exceptions, we should use the
IGNORE_EXCEPTION macro for clarity.

  • editing/Editor.cpp:

(WebCore::Editor::countMatchesForText):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142457 r142459  
     12013-02-11  Mike West  <mkwst@chromium.org>
     2
     3        Use IGNORE_EXCEPTION for Editor::countMatchesForText's ignored exceptions.
     4        https://bugs.webkit.org/show_bug.cgi?id=109372
     5
     6        Reviewed by Jochen Eisinger.
     7
     8        Rather than implicitly ignoring exceptions, we should use the
     9        IGNORE_EXCEPTION macro for clarity.
     10
     11        * editing/Editor.cpp:
     12        (WebCore::Editor::countMatchesForText):
     13
    1142013-02-11  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
    215
  • trunk/Source/WebCore/editing/Editor.cpp

    r142375 r142459  
    28112811    int originalEndOffset = searchRange->endOffset();
    28122812
    2813     ExceptionCode exception = 0;
    28142813    unsigned matchCount = 0;
    28152814    do {
    28162815        RefPtr<Range> resultRange(findPlainText(searchRange.get(), target, options & ~Backwards));
    2817         if (resultRange->collapsed(exception)) {
     2816        if (resultRange->collapsed(IGNORE_EXCEPTION)) {
    28182817            if (!resultRange->startContainer()->isInShadowTree())
    28192818                break;
    28202819
    2821             searchRange->setStartAfter(resultRange->startContainer()->shadowHost(), exception);
    2822             searchRange->setEnd(originalEndContainer, originalEndOffset, exception);
     2820            searchRange->setStartAfter(resultRange->startContainer()->shadowHost(), IGNORE_EXCEPTION);
     2821            searchRange->setEnd(originalEndContainer, originalEndOffset, IGNORE_EXCEPTION);
    28232822            continue;
    28242823        }
     
    28392838        // since findPlainText will use a TextIterator to go over the visible
    28402839        // text nodes.
    2841         searchRange->setStart(resultRange->endContainer(exception), resultRange->endOffset(exception), exception);
     2840        searchRange->setStart(resultRange->endContainer(IGNORE_EXCEPTION), resultRange->endOffset(IGNORE_EXCEPTION), IGNORE_EXCEPTION);
    28422841
    28432842        Node* shadowTreeRoot = searchRange->shadowRoot();
    2844         if (searchRange->collapsed(exception) && shadowTreeRoot)
    2845             searchRange->setEnd(shadowTreeRoot, shadowTreeRoot->childNodeCount(), exception);
     2843        if (searchRange->collapsed(IGNORE_EXCEPTION) && shadowTreeRoot)
     2844            searchRange->setEnd(shadowTreeRoot, shadowTreeRoot->childNodeCount(), IGNORE_EXCEPTION);
    28462845    } while (true);
    28472846
Note: See TracChangeset for help on using the changeset viewer.