summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/rendering/RenderThemeChromiumWin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderThemeChromiumWin.cpp')
-rw-r--r--Source/WebCore/rendering/RenderThemeChromiumWin.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/Source/WebCore/rendering/RenderThemeChromiumWin.cpp b/Source/WebCore/rendering/RenderThemeChromiumWin.cpp
index 5b41ea2..bba0520 100644
--- a/Source/WebCore/rendering/RenderThemeChromiumWin.cpp
+++ b/Source/WebCore/rendering/RenderThemeChromiumWin.cpp
@@ -30,7 +30,6 @@
#include <vssym32.h>
#include "CSSValueKeywords.h"
-#include "ChromiumBridge.h"
#include "CurrentTime.h"
#include "FontSelector.h"
#include "FontUtilsChromiumWin.h"
@@ -39,6 +38,7 @@
#include "HTMLNames.h"
#include "MediaControlElements.h"
#include "PaintInfo.h"
+#include "PlatformBridge.h"
#include "RenderBox.h"
#include "RenderProgress.h"
#include "RenderSlider.h"
@@ -238,7 +238,7 @@ bool RenderThemeChromiumWin::supportsFocusRing(const RenderStyle* style) const
Color RenderThemeChromiumWin::platformActiveSelectionBackgroundColor() const
{
- if (ChromiumBridge::layoutTestMode())
+ if (PlatformBridge::layoutTestMode())
return Color(0x00, 0x00, 0xff); // Royal blue.
COLORREF color = GetSysColor(COLOR_HIGHLIGHT);
return Color(GetRValue(color), GetGValue(color), GetBValue(color), 0xff);
@@ -246,7 +246,7 @@ Color RenderThemeChromiumWin::platformActiveSelectionBackgroundColor() const
Color RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor() const
{
- if (ChromiumBridge::layoutTestMode())
+ if (PlatformBridge::layoutTestMode())
return Color(0x99, 0x99, 0x99); // Medium gray.
COLORREF color = GetSysColor(COLOR_GRAYTEXT);
return Color(GetRValue(color), GetGValue(color), GetBValue(color), 0xff);
@@ -254,7 +254,7 @@ Color RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor() const
Color RenderThemeChromiumWin::platformActiveSelectionForegroundColor() const
{
- if (ChromiumBridge::layoutTestMode())
+ if (PlatformBridge::layoutTestMode())
return Color(0xff, 0xff, 0xcc); // Pale yellow.
COLORREF color = GetSysColor(COLOR_HIGHLIGHTTEXT);
return Color(GetRValue(color), GetGValue(color), GetBValue(color), 0xff);
@@ -375,7 +375,7 @@ static int cssValueIdToSysColorIndex(int cssValueId)
Color RenderThemeChromiumWin::systemColor(int cssValueId) const
{
int sysColorIndex = cssValueIdToSysColorIndex(cssValueId);
- if (ChromiumBridge::layoutTestMode() || (sysColorIndex == -1))
+ if (PlatformBridge::layoutTestMode() || (sysColorIndex == -1))
return RenderTheme::systemColor(cssValueId);
COLORREF color = GetSysColor(sysColorIndex);
@@ -411,7 +411,7 @@ bool RenderThemeChromiumWin::paintButton(RenderObject* o, const PaintInfo& i, co
const ThemeData& themeData = getThemeData(o);
ThemePainter painter(i.context, r);
- ChromiumBridge::paintButton(painter.context(),
+ PlatformBridge::paintButton(painter.context(),
themeData.m_part,
themeData.m_state,
themeData.m_classicState,
@@ -429,7 +429,7 @@ bool RenderThemeChromiumWin::paintSliderTrack(RenderObject* o, const PaintInfo&
const ThemeData& themeData = getThemeData(o);
ThemePainter painter(i.context, r);
- ChromiumBridge::paintTrackbar(painter.context(),
+ PlatformBridge::paintTrackbar(painter.context(),
themeData.m_part,
themeData.m_state,
themeData.m_classicState,
@@ -444,7 +444,7 @@ bool RenderThemeChromiumWin::paintSliderThumb(RenderObject* o, const PaintInfo&
static int menuListButtonWidth()
{
- static int width = ChromiumBridge::layoutTestMode() ? kStandardMenuListButtonWidth : GetSystemMetrics(SM_CXVSCROLL);
+ static int width = PlatformBridge::layoutTestMode() ? kStandardMenuListButtonWidth : GetSystemMetrics(SM_CXVSCROLL);
return width;
}
@@ -492,7 +492,7 @@ bool RenderThemeChromiumWin::paintMenuList(RenderObject* o, const PaintInfo& i,
// Get the correct theme data for a textfield and paint the menu.
ThemePainter painter(i.context, rect);
- ChromiumBridge::paintMenuList(painter.context(),
+ PlatformBridge::paintMenuList(painter.context(),
CP_DROPDOWNBUTTON,
determineState(o),
determineClassicState(o),
@@ -657,7 +657,7 @@ bool RenderThemeChromiumWin::paintTextFieldInternal(RenderObject* o,
bool drawEdges)
{
// Fallback to white if the specified color object is invalid.
- // (Note ChromiumBridge::paintTextField duplicates this check).
+ // (Note PlatformBridge::paintTextField duplicates this check).
Color backgroundColor(Color::white);
if (o->style()->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
backgroundColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor);
@@ -676,14 +676,12 @@ bool RenderThemeChromiumWin::paintTextFieldInternal(RenderObject* o,
// background (themed or filled) appropriately.
// FIXME: make sure we do the right thing if css background-clip is set.
i.context->save();
- IntSize topLeft, topRight, bottomLeft, bottomRight;
- o->style()->getBorderRadiiForRect(r, topLeft, topRight, bottomLeft, bottomRight);
- i.context->addRoundedRectClip(r, topLeft, topRight, bottomLeft, bottomRight);
+ i.context->addRoundedRectClip(o->style()->getRoundedBorderFor(r));
}
{
const ThemeData& themeData = getThemeData(o);
ThemePainter painter(i.context, r);
- ChromiumBridge::paintTextField(painter.context(),
+ PlatformBridge::paintTextField(painter.context(),
themeData.m_part,
themeData.m_state,
themeData.m_classicState,
@@ -712,7 +710,7 @@ bool RenderThemeChromiumWin::paintInnerSpinButton(RenderObject* object, const Pa
half.setHeight(rect.height() / 2);
const ThemeData& upThemeData = getThemeData(object, SpinButtonUp);
ThemePainter upPainter(info.context, half);
- ChromiumBridge::paintSpinButton(upPainter.context(),
+ PlatformBridge::paintSpinButton(upPainter.context(),
upThemeData.m_part,
upThemeData.m_state,
upThemeData.m_classicState,
@@ -721,7 +719,7 @@ bool RenderThemeChromiumWin::paintInnerSpinButton(RenderObject* object, const Pa
half.setY(rect.y() + rect.height() / 2);
const ThemeData& downThemeData = getThemeData(object, SpinButtonDown);
ThemePainter downPainter(info.context, half);
- ChromiumBridge::paintSpinButton(downPainter.context(),
+ PlatformBridge::paintSpinButton(downPainter.context(),
downThemeData.m_part,
downThemeData.m_state,
downThemeData.m_classicState,
@@ -762,7 +760,7 @@ bool RenderThemeChromiumWin::paintProgressBar(RenderObject* o, const PaintInfo&
IntRect valueRect = renderProgress->isDeterminate() ? determinateProgressValueRectFor(renderProgress, r) : IntRect(0, 0, 0, 0);
double animatedSeconds = renderProgress->animationStartTime() ? WTF::currentTime() - renderProgress->animationStartTime() : 0;
ThemePainter painter(i.context, r);
- ChromiumBridge::paintProgressBar(painter.context(), r, valueRect, renderProgress->isDeterminate(), animatedSeconds);
+ PlatformBridge::paintProgressBar(painter.context(), r, valueRect, renderProgress->isDeterminate(), animatedSeconds);
return false;
}