summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderTheme.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebCore/rendering/RenderTheme.cpp
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/rendering/RenderTheme.cpp')
-rw-r--r--WebCore/rendering/RenderTheme.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/WebCore/rendering/RenderTheme.cpp b/WebCore/rendering/RenderTheme.cpp
index 4aaf9be..63e7d45 100644
--- a/WebCore/rendering/RenderTheme.cpp
+++ b/WebCore/rendering/RenderTheme.cpp
@@ -42,6 +42,12 @@ namespace WebCore {
using namespace HTMLNames;
+static Color& customFocusRingColor()
+{
+ DEFINE_STATIC_LOCAL(Color, color, ());
+ return color;
+}
+
RenderTheme::RenderTheme()
#if USE(NEW_THEME)
: m_theme(platformTheme())
@@ -62,7 +68,7 @@ void RenderTheme::adjustStyle(CSSStyleSelector* selector, RenderStyle* style, El
else if (style->display() == COMPACT || style->display() == RUN_IN || style->display() == LIST_ITEM || style->display() == TABLE)
style->setDisplay(BLOCK);
- if (UAHasAppearance && theme()->isControlStyled(style, border, background, backgroundColor)) {
+ if (UAHasAppearance && isControlStyled(style, border, background, backgroundColor)) {
if (part == MenulistPart) {
style->setAppearance(MenulistButtonPart);
part = MenulistButtonPart;
@@ -266,6 +272,10 @@ bool RenderTheme::paint(RenderObject* o, const RenderObject::PaintInfo& paintInf
return paintMediaSeekBackButton(o, paintInfo, r);
case MediaSeekForwardButtonPart:
return paintMediaSeekForwardButton(o, paintInfo, r);
+ case MediaRewindButtonPart:
+ return paintMediaRewindButton(o, paintInfo, r);
+ case MediaReturnToRealtimeButtonPart:
+ return paintMediaReturnToRealtimeButton(o, paintInfo, r);
case MediaSliderPart:
return paintMediaSliderTrack(o, paintInfo, r);
case MediaSliderThumbPart:
@@ -276,8 +286,8 @@ bool RenderTheme::paint(RenderObject* o, const RenderObject::PaintInfo& paintInf
return paintMediaTimeRemaining(o, paintInfo, r);
case MediaCurrentTimePart:
return paintMediaCurrentTime(o, paintInfo, r);
- case MediaTimelineContainerPart:
- return paintMediaTimelineContainer(o, paintInfo, r);
+ case MediaControlsBackgroundPart:
+ return paintMediaControlsBackground(o, paintInfo, r);
case MenulistButtonPart:
case TextFieldPart:
case TextAreaPart:
@@ -313,6 +323,7 @@ bool RenderTheme::paintBorderOnly(RenderObject* o, const RenderObject::PaintInfo
case TextAreaPart:
return paintTextArea(o, paintInfo, r);
case MenulistButtonPart:
+ case SearchFieldPart:
return true;
case CheckboxPart:
case RadioPart:
@@ -325,7 +336,6 @@ bool RenderTheme::paintBorderOnly(RenderObject* o, const RenderObject::PaintInfo
case SliderVerticalPart:
case SliderThumbHorizontalPart:
case SliderThumbVerticalPart:
- case SearchFieldPart:
case SearchFieldCancelButtonPart:
case SearchFieldDecorationPart:
case SearchFieldResultsDecorationPart:
@@ -853,4 +863,14 @@ Color RenderTheme::platformInactiveTextSearchHighlightColor() const
return Color(255, 255, 0); // Yellow.
}
+void RenderTheme::setCustomFocusRingColor(const Color& c)
+{
+ customFocusRingColor() = c;
+}
+
+Color RenderTheme::focusRingColor()
+{
+ return customFocusRingColor().isValid() ? customFocusRingColor() : defaultTheme()->platformFocusRingColor();
+}
+
} // namespace WebCore