Changeset 142459 in webkit
- Timestamp:
- Feb 11, 2013 5:51:02 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r142457 r142459 1 2013-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 1 14 2013-02-11 Zoltan Arvai <zarvai@inf.u-szeged.hu> 2 15 -
trunk/Source/WebCore/editing/Editor.cpp
r142375 r142459 2811 2811 int originalEndOffset = searchRange->endOffset(); 2812 2812 2813 ExceptionCode exception = 0;2814 2813 unsigned matchCount = 0; 2815 2814 do { 2816 2815 RefPtr<Range> resultRange(findPlainText(searchRange.get(), target, options & ~Backwards)); 2817 if (resultRange->collapsed( exception)) {2816 if (resultRange->collapsed(IGNORE_EXCEPTION)) { 2818 2817 if (!resultRange->startContainer()->isInShadowTree()) 2819 2818 break; 2820 2819 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); 2823 2822 continue; 2824 2823 } … … 2839 2838 // since findPlainText will use a TextIterator to go over the visible 2840 2839 // 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); 2842 2841 2843 2842 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); 2846 2845 } while (true); 2847 2846
Note: See TracChangeset
for help on using the changeset viewer.