Modified: trunk/Source/WebCore/ChangeLog (151403 => 151404)
--- trunk/Source/WebCore/ChangeLog 2013-06-10 21:32:35 UTC (rev 151403)
+++ trunk/Source/WebCore/ChangeLog 2013-06-10 21:36:51 UTC (rev 151404)
@@ -1,3 +1,23 @@
+2013-06-10 Andreas Kling <[email protected]>
+
+ REGRESSION(r150633): Find on page non-focused text highlight color is bright yellow.
+ <rdar://problem/14098882>
+ <http://webkit.org/b/117371>
+
+ Reviewed by Anders Carlsson.
+
+ There was a mistake in the parameter ordering which still compiled because of
+ implicit bool/unsigned conversion.
+ Changed the interface of Page::findMatchesForText() to use enums instead of bools.
+
+ No test because the color of the highlighted matches is not available through APIs.
+
+ * page/Page.h:
+ * page/Page.cpp:
+ (WebCore::Page::findMatchesForText):
+ (WebCore::Page::markAllMatchesForText):
+ (WebCore::Page::countFindMatches):
+
2013-06-10 Bear Travis <[email protected]>
[CSS Shapes][CSS Exclusions] Split CSS Exclusions and CSS Shapes code
Modified: trunk/Source/WebCore/page/Page.cpp (151403 => 151404)
--- trunk/Source/WebCore/page/Page.cpp 2013-06-10 21:32:35 UTC (rev 151403)
+++ trunk/Source/WebCore/page/Page.cpp 2013-06-10 21:36:51 UTC (rev 151404)
@@ -648,7 +648,7 @@
return 0;
}
-unsigned Page::findMatchesForText(const String& target, FindOptions options, unsigned maxMatchCount, bool shouldHighlight, bool markMatches)
+unsigned Page::findMatchesForText(const String& target, FindOptions options, unsigned maxMatchCount, ShouldHighlightMatches shouldHighlightMatches, ShouldMarkMatches shouldMarkMatches)
{
if (target.isEmpty() || !mainFrame())
return 0;
@@ -657,9 +657,9 @@
Frame* frame = mainFrame();
do {
- if (markMatches)
- frame->editor().setMarkedTextMatchesAreHighlighted(shouldHighlight);
- matchCount += frame->editor().countMatchesForText(target, 0, options, maxMatchCount ? (maxMatchCount - matchCount) : 0, markMatches, 0);
+ if (shouldMarkMatches == MarkMatches)
+ frame->editor().setMarkedTextMatchesAreHighlighted(shouldHighlightMatches == HighlightMatches);
+ matchCount += frame->editor().countMatchesForText(target, 0, options, maxMatchCount ? (maxMatchCount - matchCount) : 0, shouldMarkMatches == MarkMatches, 0);
frame = incrementFrame(frame, true, false);
} while (frame);
@@ -668,12 +668,12 @@
unsigned Page::markAllMatchesForText(const String& target, FindOptions options, bool shouldHighlight, unsigned maxMatchCount)
{
- return findMatchesForText(target, options, shouldHighlight, maxMatchCount, /*markMatches*/ true);
+ return findMatchesForText(target, options, maxMatchCount, shouldHighlight ? HighlightMatches : DoNotHighlightMatches, MarkMatches);
}
unsigned Page::countFindMatches(const String& target, FindOptions options, unsigned maxMatchCount)
{
- return findMatchesForText(target, options, /*shouldHighlight*/ false, maxMatchCount, /*markMatches*/ false);
+ return findMatchesForText(target, options, maxMatchCount, DoNotHighlightMatches, DoNotMarkMatches);
}
void Page::unmarkAllTextMatches()
Modified: trunk/Source/WebCore/page/Page.h (151403 => 151404)
--- trunk/Source/WebCore/page/Page.h 2013-06-10 21:32:35 UTC (rev 151403)
+++ trunk/Source/WebCore/page/Page.h 2013-06-10 21:36:51 UTC (rev 151404)
@@ -419,8 +419,11 @@
void checkSubframeCountConsistency() const;
#endif
- unsigned findMatchesForText(const String&, FindOptions, unsigned maxMatchCount, bool shouldHighlight, bool markMatches);
+ enum ShouldHighlightMatches { DoNotHighlightMatches, HighlightMatches };
+ enum ShouldMarkMatches { DoNotMarkMatches, MarkMatches };
+ unsigned findMatchesForText(const String&, FindOptions, unsigned maxMatchCount, ShouldHighlightMatches, ShouldMarkMatches);
+
MediaCanStartListener* takeAnyMediaCanStartListener();
void setMinimumTimerInterval(double);