Commit 5b4e8cab authored by staikos@webkit.org's avatar staikos@webkit.org

2007-11-12 George Staikos <staikos@kde.org>

        Reviewed by Tim.

        Extract the text match marker highlight color into RenderTheme instead
        of the hardcoded yellow.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintTextMatchMarker):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::platformTextSearchHighlightColor):
        * rendering/RenderTheme.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 821cc726
2007-11-12 George Staikos <staikos@kde.org>
Reviewed by Tim.
Extract the text match marker highlight color into RenderTheme instead
of the hardcoded yellow.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintTextMatchMarker):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::platformTextSearchHighlightColor):
* rendering/RenderTheme.h:
2007-11-12 Mark Rowe <mrowe@apple.com> 2007-11-12 Mark Rowe <mrowe@apple.com>
Fix deadlock on launch on the Mac. Fix deadlock on launch on the Mac.
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "HitTestResult.h" #include "HitTestResult.h"
#include "RenderArena.h" #include "RenderArena.h"
#include "RenderBlock.h" #include "RenderBlock.h"
#include "RenderTheme.h"
#include "Text.h" #include "Text.h"
#include "TextStyle.h" #include "TextStyle.h"
#include "break_lines.h" #include "break_lines.h"
...@@ -658,11 +659,11 @@ void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, int tx, int ty, Do ...@@ -658,11 +659,11 @@ void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, int tx, int ty, Do
// Optionally highlight the text // Optionally highlight the text
if (object()->document()->frame()->markedTextMatchesAreHighlighted()) { if (object()->document()->frame()->markedTextMatchesAreHighlighted()) {
Color yellow = Color(255, 255, 0); Color color = theme()->platformTextSearchHighlightColor();
pt->save(); pt->save();
updateGraphicsContext(pt, yellow, yellow, 0); // Don't draw text at all! updateGraphicsContext(pt, color, color, 0); // Don't draw text at all!
pt->clip(IntRect(tx + m_x, ty + y, m_width, h)); pt->clip(IntRect(tx + m_x, ty + y, m_width, h));
pt->drawHighlightForText(run, startPoint, h, renderStyle, yellow, sPos, ePos); pt->drawHighlightForText(run, startPoint, h, renderStyle, color, sPos, ePos);
pt->restore(); pt->restore();
} }
} }
......
...@@ -478,4 +478,9 @@ void RenderTheme::platformColorsDidChange() ...@@ -478,4 +478,9 @@ void RenderTheme::platformColorsDidChange()
m_inactiveSelectionColor = Color(); m_inactiveSelectionColor = Color();
} }
Color RenderTheme::platformTextSearchHighlightColor() const
{
return Color(255, 255, 0);
}
} // namespace WebCore } // namespace WebCore
...@@ -103,6 +103,8 @@ public: ...@@ -103,6 +103,8 @@ public:
Color activeSelectionBackgroundColor() const; Color activeSelectionBackgroundColor() const;
Color inactiveSelectionBackgroundColor() const; Color inactiveSelectionBackgroundColor() const;
virtual Color platformTextSearchHighlightColor() const;
// The platform selection color. // The platform selection color.
virtual Color platformActiveSelectionBackgroundColor() const; virtual Color platformActiveSelectionBackgroundColor() const;
virtual Color platformInactiveSelectionBackgroundColor() const; virtual Color platformInactiveSelectionBackgroundColor() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment