Changeset 151404 in webkit
- Timestamp:
- Jun 10, 2013, 2:36:51 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r151402 r151404 1 2013-06-10 Andreas Kling <akling@apple.com> 2 3 REGRESSION(r150633): Find on page non-focused text highlight color is bright yellow. 4 <rdar://problem/14098882> 5 <http://webkit.org/b/117371> 6 7 Reviewed by Anders Carlsson. 8 9 There was a mistake in the parameter ordering which still compiled because of 10 implicit bool/unsigned conversion. 11 Changed the interface of Page::findMatchesForText() to use enums instead of bools. 12 13 No test because the color of the highlighted matches is not available through APIs. 14 15 * page/Page.h: 16 * page/Page.cpp: 17 (WebCore::Page::findMatchesForText): 18 (WebCore::Page::markAllMatchesForText): 19 (WebCore::Page::countFindMatches): 20 1 21 2013-06-10 Bear Travis <betravis@adobe.com> 2 22 -
trunk/Source/WebCore/page/Page.cpp
r151244 r151404 649 649 } 650 650 651 unsigned Page::findMatchesForText(const String& target, FindOptions options, unsigned maxMatchCount, bool shouldHighlight, bool markMatches)651 unsigned Page::findMatchesForText(const String& target, FindOptions options, unsigned maxMatchCount, ShouldHighlightMatches shouldHighlightMatches, ShouldMarkMatches shouldMarkMatches) 652 652 { 653 653 if (target.isEmpty() || !mainFrame()) … … 658 658 Frame* frame = mainFrame(); 659 659 do { 660 if ( markMatches)661 frame->editor().setMarkedTextMatchesAreHighlighted(shouldHighlight );662 matchCount += frame->editor().countMatchesForText(target, 0, options, maxMatchCount ? (maxMatchCount - matchCount) : 0, markMatches, 0);660 if (shouldMarkMatches == MarkMatches) 661 frame->editor().setMarkedTextMatchesAreHighlighted(shouldHighlightMatches == HighlightMatches); 662 matchCount += frame->editor().countMatchesForText(target, 0, options, maxMatchCount ? (maxMatchCount - matchCount) : 0, shouldMarkMatches == MarkMatches, 0); 663 663 frame = incrementFrame(frame, true, false); 664 664 } while (frame); … … 669 669 unsigned Page::markAllMatchesForText(const String& target, FindOptions options, bool shouldHighlight, unsigned maxMatchCount) 670 670 { 671 return findMatchesForText(target, options, shouldHighlight, maxMatchCount, /*markMatches*/ true);671 return findMatchesForText(target, options, maxMatchCount, shouldHighlight ? HighlightMatches : DoNotHighlightMatches, MarkMatches); 672 672 } 673 673 674 674 unsigned Page::countFindMatches(const String& target, FindOptions options, unsigned maxMatchCount) 675 675 { 676 return findMatchesForText(target, options, /*shouldHighlight*/ false, maxMatchCount, /*markMatches*/ false);676 return findMatchesForText(target, options, maxMatchCount, DoNotHighlightMatches, DoNotMarkMatches); 677 677 } 678 678 -
trunk/Source/WebCore/page/Page.h
r151244 r151404 420 420 #endif 421 421 422 unsigned findMatchesForText(const String&, FindOptions, unsigned maxMatchCount, bool shouldHighlight, bool markMatches); 422 enum ShouldHighlightMatches { DoNotHighlightMatches, HighlightMatches }; 423 enum ShouldMarkMatches { DoNotMarkMatches, MarkMatches }; 424 425 unsigned findMatchesForText(const String&, FindOptions, unsigned maxMatchCount, ShouldHighlightMatches, ShouldMarkMatches); 423 426 424 427 MediaCanStartListener* takeAnyMediaCanStartListener();
Note:
See TracChangeset
for help on using the changeset viewer.