2 * This file is part of the WebKit project.
4 * Copyright (C) 2006, 2007 Apple Computer, Inc.
5 * Copyright (C) 2007-2009 Torch Mobile, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
25 #include "RenderThemeWinCE.h"
27 #include "CSSStyleSheet.h"
28 #include "CSSValueKeywords.h"
30 #include "GraphicsContext.h"
32 #include "HTMLMediaElement.h"
34 #include "NotImplemented.h"
35 #include "PaintInfo.h"
40 * The following constants are used to determine how a widget is drawn using
41 * Windows' Theme API. For more information on theme parts and states see
42 * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/userex/topics/partsandstates.asp
44 #define THEME_COLOR 204
45 #define THEME_FONT 210
47 // Generic state constants
59 // Textfield constants
60 #define TFP_TEXTFIELD 1
61 #define TFS_READONLY 6
63 typedef HANDLE (WINAPI*openThemeDataPtr)(HWND hwnd, LPCWSTR pszClassList);
64 typedef HRESULT (WINAPI*closeThemeDataPtr)(HANDLE hTheme);
65 typedef HRESULT (WINAPI*drawThemeBackgroundPtr)(HANDLE hTheme, HDC hdc, int iPartId,
66 int iStateId, const RECT *pRect,
67 const RECT* pClipRect);
68 typedef HRESULT (WINAPI*drawThemeEdgePtr)(HANDLE hTheme, HDC hdc, int iPartId,
69 int iStateId, const RECT *pRect,
70 unsigned uEdge, unsigned uFlags,
71 const RECT* pClipRect);
72 typedef HRESULT (WINAPI*getThemeContentRectPtr)(HANDLE hTheme, HDC hdc, int iPartId,
73 int iStateId, const RECT* pRect,
75 typedef HRESULT (WINAPI*getThemePartSizePtr)(HANDLE hTheme, HDC hdc, int iPartId,
76 int iStateId, RECT* prc, int ts,
78 typedef HRESULT (WINAPI*getThemeSysFontPtr)(HANDLE hTheme, int iFontId, OUT LOGFONT* pFont);
79 typedef HRESULT (WINAPI*getThemeColorPtr)(HANDLE hTheme, HDC hdc, int iPartId,
80 int iStateId, int iPropId, OUT COLORREF* pFont);
84 static const int dropDownButtonWidth = 17;
85 static const int trackWidth = 4;
87 PassRefPtr<RenderTheme> RenderThemeWinCE::create()
89 return adoptRef(new RenderThemeWinCE);
92 PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
94 static RenderTheme* winceTheme = RenderThemeWinCE::create().releaseRef();
98 RenderThemeWinCE::RenderThemeWinCE()
102 RenderThemeWinCE::~RenderThemeWinCE()
106 Color RenderThemeWinCE::platformActiveSelectionBackgroundColor() const
108 COLORREF color = GetSysColor(COLOR_HIGHLIGHT);
109 return Color(GetRValue(color), GetGValue(color), GetBValue(color), 255);
112 Color RenderThemeWinCE::platformInactiveSelectionBackgroundColor() const
114 COLORREF color = GetSysColor(COLOR_GRAYTEXT);
115 return Color(GetRValue(color), GetGValue(color), GetBValue(color), 255);
118 Color RenderThemeWinCE::platformActiveSelectionForegroundColor() const
120 COLORREF color = GetSysColor(COLOR_HIGHLIGHTTEXT);
121 return Color(GetRValue(color), GetGValue(color), GetBValue(color), 255);
124 Color RenderThemeWinCE::platformInactiveSelectionForegroundColor() const
129 bool RenderThemeWinCE::supportsFocus(ControlPart appearance) const
131 switch (appearance) {
144 bool RenderThemeWinCE::supportsFocusRing(const RenderStyle *style) const
146 return supportsFocus(style->appearance());
149 unsigned RenderThemeWinCE::determineClassicState(RenderObject* o)
152 if (!isEnabled(o) || isReadOnlyControl(o))
153 result = DFCS_INACTIVE;
154 else if (isPressed(o)) // Active supersedes hover
155 result = DFCS_PUSHED;
158 result |= DFCS_CHECKED;
162 ThemeData RenderThemeWinCE::getThemeData(RenderObject* o)
165 switch (o->style()->appearance()) {
168 result.m_part = BP_BUTTON;
169 result.m_classicState = DFCS_BUTTONPUSH;
172 result.m_part = BP_CHECKBOX;
173 result.m_classicState = DFCS_BUTTONCHECK;
176 result.m_part = BP_RADIO;
177 result.m_classicState = DFCS_BUTTONRADIO;
183 result.m_part = TFP_TEXTFIELD;
187 result.m_classicState |= determineClassicState(o);
192 bool RenderThemeWinCE::paintButton(RenderObject* o, const PaintInfo& i, const IntRect& r)
194 // Get the correct theme data for a button
195 ThemeData themeData = getThemeData(o);
197 // Now paint the button.
198 i.context->drawFrameControl(r, DFC_BUTTON, themeData.m_classicState);
200 if (themeData.m_part == BP_BUTTON) {
201 IntRect focusRect(r);
202 focusRect.inflate(-2);
203 i.context->drawFocusRect(focusRect);
205 i.context->drawFocusRect(r);
211 void RenderThemeWinCE::setCheckboxSize(RenderStyle* style) const
213 // If the width and height are both specified, then we have nothing to do.
214 if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
217 // FIXME: A hard-coded size of 13 is used. This is wrong but necessary for now. It matches Firefox.
218 // At different DPI settings on Windows, querying the theme gives you a larger size that accounts for
219 // the higher DPI. Until our entire engine honors a DPI setting other than 96, we can't rely on the theme's
221 if (style->width().isIntrinsicOrAuto())
222 style->setWidth(Length(13, Fixed));
223 if (style->height().isAuto())
224 style->setHeight(Length(13, Fixed));
227 bool RenderThemeWinCE::paintTextField(RenderObject* o, const PaintInfo& i, const IntRect& r)
229 // Get the correct theme data for a textfield
230 ThemeData themeData = getThemeData(o);
232 // Now paint the text field.
233 i.context->paintTextField(r, themeData.m_classicState);
238 void RenderThemeWinCE::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
240 style->resetBorder();
241 adjustMenuListButtonStyle(selector, style, e);
244 bool RenderThemeWinCE::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& r)
246 paintTextField(o, i, r);
247 paintMenuListButton(o, i, r);
251 bool RenderThemeWinCE::paintMenuListButton(RenderObject* o, const PaintInfo& i, const IntRect& r)
253 IntRect buttonRect(r.maxX() - dropDownButtonWidth - 1, r.y(), dropDownButtonWidth, r.height());
254 buttonRect.inflateY(-1);
255 i.context->drawFrameControl(buttonRect, DFC_SCROLL, DFCS_SCROLLCOMBOBOX | determineClassicState(o));
259 void RenderThemeWinCE::systemFont(int propId, FontDescription& fontDescription) const
264 void RenderThemeWinCE::themeChanged()
268 String RenderThemeWinCE::extraDefaultStyleSheet()
274 String RenderThemeWinCE::extraQuirksStyleSheet()
280 bool RenderThemeWinCE::supportsHover(const RenderStyle*) const
285 // Map a CSSValue* system color to an index understood by GetSysColor
286 static int cssValueIdToSysColorIndex(int cssValueId)
288 switch (cssValueId) {
289 case CSSValueActiveborder: return COLOR_ACTIVEBORDER;
290 case CSSValueActivecaption: return COLOR_ACTIVECAPTION;
291 case CSSValueAppworkspace: return COLOR_APPWORKSPACE;
292 case CSSValueBackground: return COLOR_BACKGROUND;
293 case CSSValueButtonface: return COLOR_BTNFACE;
294 case CSSValueButtonhighlight: return COLOR_BTNHIGHLIGHT;
295 case CSSValueButtonshadow: return COLOR_BTNSHADOW;
296 case CSSValueButtontext: return COLOR_BTNTEXT;
297 case CSSValueCaptiontext: return COLOR_CAPTIONTEXT;
298 case CSSValueGraytext: return COLOR_GRAYTEXT;
299 case CSSValueHighlight: return COLOR_HIGHLIGHT;
300 case CSSValueHighlighttext: return COLOR_HIGHLIGHTTEXT;
301 case CSSValueInactiveborder: return COLOR_INACTIVEBORDER;
302 case CSSValueInactivecaption: return COLOR_INACTIVECAPTION;
303 case CSSValueInactivecaptiontext: return COLOR_INACTIVECAPTIONTEXT;
304 case CSSValueInfobackground: return COLOR_INFOBK;
305 case CSSValueInfotext: return COLOR_INFOTEXT;
306 case CSSValueMenu: return COLOR_MENU;
307 case CSSValueMenutext: return COLOR_MENUTEXT;
308 case CSSValueScrollbar: return COLOR_SCROLLBAR;
309 case CSSValueThreeddarkshadow: return COLOR_3DDKSHADOW;
310 case CSSValueThreedface: return COLOR_3DFACE;
311 case CSSValueThreedhighlight: return COLOR_3DHIGHLIGHT;
312 case CSSValueThreedlightshadow: return COLOR_3DLIGHT;
313 case CSSValueThreedshadow: return COLOR_3DSHADOW;
314 case CSSValueWindow: return COLOR_WINDOW;
315 case CSSValueWindowframe: return COLOR_WINDOWFRAME;
316 case CSSValueWindowtext: return COLOR_WINDOWTEXT;
317 default: return -1; // Unsupported CSSValue
321 Color RenderThemeWinCE::systemColor(int cssValueId) const
323 int sysColorIndex = cssValueIdToSysColorIndex(cssValueId);
324 if (sysColorIndex == -1)
325 return RenderTheme::systemColor(cssValueId);
327 COLORREF color = GetSysColor(sysColorIndex);
328 return Color(GetRValue(color), GetGValue(color), GetBValue(color));
331 const int sliderThumbWidth = 7;
332 const int sliderThumbHeight = 15;
334 void RenderThemeWinCE::adjustSliderThumbSize(RenderStyle* style) const
336 if (style->appearance() == SliderThumbVerticalPart) {
337 style->setWidth(Length(sliderThumbHeight, Fixed));
338 style->setHeight(Length(sliderThumbWidth, Fixed));
339 } else if (style->appearance() == SliderThumbHorizontalPart) {
340 style->setWidth(Length(sliderThumbWidth, Fixed));
341 style->setHeight(Length(sliderThumbHeight, Fixed));
346 void RenderThemeWinCE::adjustButtonInnerStyle(RenderStyle* style) const
348 // This inner padding matches Firefox.
349 style->setPaddingTop(Length(1, Fixed));
350 style->setPaddingRight(Length(3, Fixed));
351 style->setPaddingBottom(Length(1, Fixed));
352 style->setPaddingLeft(Length(3, Fixed));
355 void RenderThemeWinCE::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
357 // Override padding size to match AppKit text positioning.
358 const int padding = 1;
359 style->setPaddingLeft(Length(padding, Fixed));
360 style->setPaddingRight(Length(padding, Fixed));
361 style->setPaddingTop(Length(padding, Fixed));
362 style->setPaddingBottom(Length(padding, Fixed));
366 bool RenderThemeWinCE::paintSearchField(RenderObject* o, const PaintInfo& i, const IntRect& r)
368 return paintTextField(o, i, r);
371 bool RenderThemeWinCE::paintSearchFieldCancelButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
373 Color buttonColor = (o->node() && o->node()->active()) ? Color(138, 138, 138) : Color(186, 186, 186);
375 IntSize cancelSize(10, 10);
376 IntSize cancelRadius(cancelSize.width() / 2, cancelSize.height() / 2);
377 int x = r.x() + (r.width() - cancelSize.width()) / 2;
378 int y = r.y() + (r.height() - cancelSize.height()) / 2 + 1;
379 IntRect cancelBounds(IntPoint(x, y), cancelSize);
380 paintInfo.context->save();
381 paintInfo.context->addRoundedRectClip(RoundedRect(cancelBounds, cancelRadius, cancelRadius, cancelRadius, cancelRadius));
382 paintInfo.context->fillRect(cancelBounds, buttonColor, ColorSpaceDeviceRGB);
386 IntRect xBounds(cancelBounds.location() + IntSize(3, 3), xSize);
387 paintInfo.context->setStrokeColor(Color::white, ColorSpaceDeviceRGB);
388 paintInfo.context->drawLine(xBounds.location(), xBounds.location() + xBounds.size());
389 paintInfo.context->drawLine(IntPoint(xBounds.maxX(), xBounds.y()), IntPoint(xBounds.x(), xBounds.maxY()));
391 paintInfo.context->restore();
395 void RenderThemeWinCE::adjustSearchFieldCancelButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
397 IntSize cancelSize(13, 11);
398 style->setWidth(Length(cancelSize.width(), Fixed));
399 style->setHeight(Length(cancelSize.height(), Fixed));
402 void RenderThemeWinCE::adjustSearchFieldDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
404 IntSize emptySize(1, 11);
405 style->setWidth(Length(emptySize.width(), Fixed));
406 style->setHeight(Length(emptySize.height(), Fixed));
409 void RenderThemeWinCE::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
411 IntSize magnifierSize(15, 11);
412 style->setWidth(Length(magnifierSize.width(), Fixed));
413 style->setHeight(Length(magnifierSize.height(), Fixed));
416 bool RenderThemeWinCE::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
422 void RenderThemeWinCE::adjustSearchFieldResultsButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
424 IntSize magnifierSize(15, 11);
425 style->setWidth(Length(magnifierSize.width(), Fixed));
426 style->setHeight(Length(magnifierSize.height(), Fixed));
429 bool RenderThemeWinCE::paintSearchFieldResultsButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
431 paintSearchFieldResultsDecoration(o, paintInfo, r);
435 void RenderThemeWinCE::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
437 // These are the paddings needed to place the text correctly in the <select> box
438 const int dropDownBoxPaddingTop = 2;
439 const int dropDownBoxPaddingRight = style->direction() == LTR ? 4 + dropDownButtonWidth : 4;
440 const int dropDownBoxPaddingBottom = 2;
441 const int dropDownBoxPaddingLeft = style->direction() == LTR ? 4 : 4 + dropDownButtonWidth;
442 // The <select> box must be at least 12px high for the button to render nicely on Windows
443 const int dropDownBoxMinHeight = 12;
445 // Position the text correctly within the select box and make the box wide enough to fit the dropdown button
446 style->setPaddingTop(Length(dropDownBoxPaddingTop, Fixed));
447 style->setPaddingRight(Length(dropDownBoxPaddingRight, Fixed));
448 style->setPaddingBottom(Length(dropDownBoxPaddingBottom, Fixed));
449 style->setPaddingLeft(Length(dropDownBoxPaddingLeft, Fixed));
451 // Height is locked to auto
452 style->setHeight(Length(Auto));
454 // Calculate our min-height
455 int minHeight = style->fontMetrics().height();
456 minHeight = max(minHeight, dropDownBoxMinHeight);
458 style->setMinHeight(Length(minHeight, Fixed));
460 // White-space is locked to pre
461 style->setWhiteSpace(PRE);
463 DWORD colorMenu = GetSysColor(COLOR_MENU);
464 DWORD colorMenuText = GetSysColor(COLOR_MENUTEXT);
465 Color bgColor(GetRValue(colorMenu), GetGValue(colorMenu), GetBValue(colorMenu), 255);
466 Color textColor(GetRValue(colorMenuText), GetGValue(colorMenuText), GetBValue(colorMenuText), 255);
467 if (bgColor == textColor)
468 textColor.setRGB((~bgColor.rgb()) | 0xFF000000);
469 style->clearBackgroundLayers();
470 style->accessBackgroundLayers()->setClip(ContentFillBox);
471 style->setBackgroundColor(bgColor);
472 style->setColor(textColor);
476 // Attempt to retrieve a HTMLMediaElement from a Node. Returns 0 if one cannot be found.
477 static HTMLMediaElement* mediaElementParent(Node* node)
481 Node* mediaNode = node->shadowAncestorNode();
482 if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(mediaNode)->isMediaElement())
485 return static_cast<HTMLMediaElement*>(mediaNode);
489 bool RenderThemeWinCE::paintSliderTrack(RenderObject* o, const PaintInfo& i, const IntRect& r)
491 bool rc = RenderTheme::paintSliderTrack(o, i, r);
492 IntPoint left = IntPoint(r.x() + 2, (r.y() + r.maxY()) / 2);
494 i.context->setStrokeColor(Color::gray, ColorSpaceDeviceRGB);
495 i.context->setFillColor(Color::gray, ColorSpaceDeviceRGB);
496 i.context->fillRect(r);
498 HTMLMediaElement* mediaElement = mediaElementParent(o->node());
500 i.context->setStrokeColor(Color(0, 0xff, 0));
501 IntPoint right = IntPoint(left.x() + mediaElement->percentLoaded() * (r.maxX() - r.x() - 4), (r.y() + r.maxY()) / 2);
502 i.context->drawLine(left, right);
506 i.context->setStrokeColor(Color::black, ColorSpaceDeviceRGB);
507 i.context->drawLine(left, IntPoint(r.maxX() - 2, left.y()));
508 i.context->restore();
512 bool RenderThemeWinCE::paintSliderThumb(RenderObject* o, const PaintInfo& i, const IntRect& r)
514 bool rc = RenderTheme::paintSliderThumb(o, i, r);
516 i.context->setStrokeColor(Color::black, ColorSpaceDeviceRGB);
517 i.context->setFillColor(Color::black, ColorSpaceDeviceRGB);
519 HTMLMediaElement* mediaElement = mediaElementParent(o->node());
521 float pt = (mediaElement->currentTime() - mediaElement->startTime()) / mediaElement->duration();
522 FloatRect intRect = r;
523 intRect.setX(intRect.x() + intRect.width() * pt - 2);
525 i.context->fillRect(intRect);
528 i.context->restore();
532 void RenderThemeWinCE::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
534 const int padding = 1;
535 style->setPaddingLeft(Length(padding, Fixed));
536 style->setPaddingRight(Length(padding, Fixed));
537 style->setPaddingTop(Length(padding, Fixed));
538 style->setPaddingBottom(Length(padding, Fixed));
543 bool RenderThemeWinCE::paintMediaFullscreenButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
545 bool rc = paintButton(o, paintInfo, r);
546 FloatRect imRect = r;
548 paintInfo.context->save();
549 paintInfo.context->setStrokeColor(Color::black);
550 paintInfo.context->setFillColor(Color::gray);
551 paintInfo.context->fillRect(imRect);
552 paintInfo.context->restore();
556 bool RenderThemeWinCE::paintMediaMuteButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
558 bool rc = paintButton(o, paintInfo, r);
559 HTMLMediaElement* mediaElement = mediaElementParent(o->node());
560 bool muted = !mediaElement || mediaElement->muted();
561 FloatRect imRect = r;
563 paintInfo.context->save();
564 paintInfo.context->setStrokeColor(Color::black);
565 paintInfo.context->setFillColor(Color::black);
566 FloatPoint pts[6] = {
567 FloatPoint(imRect.x() + 1, imRect.y() + imRect.height() / 3.0),
568 FloatPoint(imRect.x() + 1 + imRect.width() / 2.0, imRect.y() + imRect.height() / 3.0),
569 FloatPoint(imRect.maxX() - 1, imRect.y()),
570 FloatPoint(imRect.maxX() - 1, imRect.maxY()),
571 FloatPoint(imRect.x() + 1 + imRect.width() / 2.0, imRect.y() + 2.0 * imRect.height() / 3.0),
572 FloatPoint(imRect.x() + 1, imRect.y() + 2.0 * imRect.height() / 3.0)
574 paintInfo.context->drawConvexPolygon(6, pts);
576 paintInfo.context->drawLine(IntPoint(imRect.maxX(), imRect.y()), IntPoint(imRect.x(), imRect.maxY()));
577 paintInfo.context->restore();
581 bool RenderThemeWinCE::paintMediaPlayButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
583 bool rc = paintButton(o, paintInfo, r);
584 FloatRect imRect = r;
586 paintInfo.context->save();
587 paintInfo.context->setStrokeColor(Color::black);
588 paintInfo.context->setFillColor(Color::black);
589 HTMLMediaElement* mediaElement = mediaElementParent(o->node());
590 bool paused = !mediaElement || mediaElement->paused();
592 float width = imRect.width();
593 imRect.setWidth(width / 3.0);
594 paintInfo.context->fillRect(imRect);
595 imRect.move(2.0 * width / 3.0, 0);
596 paintInfo.context->fillRect(imRect);
598 FloatPoint pts[3] = { FloatPoint(imRect.x(), imRect.y()), FloatPoint(imRect.maxX(), (imRect.y() + imRect.maxY()) / 2.0), FloatPoint(imRect.x(), imRect.maxY()) };
599 paintInfo.context->drawConvexPolygon(3, pts);
601 paintInfo.context->restore();
605 bool RenderThemeWinCE::paintMediaSeekBackButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
607 bool rc = paintButton(o, paintInfo, r);
608 FloatRect imRect = r;
610 FloatPoint pts[3] = { FloatPoint((imRect.x() + imRect.maxX()) / 2.0, imRect.y()), FloatPoint(imRect.x(), (imRect.y() + imRect.maxY()) / 2.0), FloatPoint((imRect.x() + imRect.maxX()) / 2.0, imRect.maxY()) };
611 FloatPoint pts2[3] = { FloatPoint(imRect.maxX(), imRect.y()), FloatPoint((imRect.x() + imRect.maxX()) / 2.0, (imRect.y() + imRect.maxY()) / 2.0), FloatPoint(imRect.maxX(), imRect.maxY()) };
612 paintInfo.context->save();
613 paintInfo.context->setStrokeColor(Color::black);
614 paintInfo.context->setFillColor(Color::black);
615 paintInfo.context->drawConvexPolygon(3, pts);
616 paintInfo.context->drawConvexPolygon(3, pts2);
617 paintInfo.context->restore();
621 bool RenderThemeWinCE::paintMediaSeekForwardButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
623 bool rc = paintButton(o, paintInfo, r);
624 FloatRect imRect = r;
626 FloatPoint pts[3] = { FloatPoint(imRect.x(), imRect.y()), FloatPoint((imRect.x() + imRect.maxX()) / 2.0, (imRect.y() + imRect.maxY()) / 2.0), FloatPoint(imRect.x(), imRect.maxY()) };
627 FloatPoint pts2[3] = { FloatPoint((imRect.x() + imRect.maxX()) / 2.0, imRect.y()), FloatPoint(imRect.maxX(), (imRect.y() + imRect.maxY()) / 2.0), FloatPoint((imRect.x() + imRect.maxX()) / 2.0, imRect.maxY()) };
628 paintInfo.context->save();
629 paintInfo.context->setStrokeColor(Color::black);
630 paintInfo.context->setFillColor(Color::black);
631 paintInfo.context->drawConvexPolygon(3, pts);
632 paintInfo.context->drawConvexPolygon(3, pts2);
633 paintInfo.context->restore();
637 bool RenderThemeWinCE::paintMediaSliderTrack(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
639 return paintSliderTrack(o, paintInfo, r);
642 bool RenderThemeWinCE::paintMediaSliderThumb(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
644 return paintSliderThumb(o, paintInfo, r);
648 } // namespace WebCore