1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/shell/renderer/test_runner/WebTestThemeEngineWin.h"
7 #include "content/shell/renderer/test_runner/TestCommon.h"
8 #include "content/shell/renderer/test_runner/WebTestThemeControlWin.h"
9 #include "third_party/WebKit/public/platform/WebRect.h"
10 #include "third_party/skia/include/core/SkRect.h"
12 // Although all this code is generic, we include these headers
13 // to pull in the Windows #defines for the parts and states of
18 using namespace blink;
20 namespace WebTestRunner {
24 // We define this for clarity, although there really should be a DFCS_NORMAL in winuser.h.
25 const int dfcsNormal = 0x0000;
27 SkIRect webRectToSkIRect(const WebRect& webRect)
30 irect.set(webRect.x, webRect.y, webRect.x + webRect.width - 1, webRect.y + webRect.height - 1);
34 void drawControl(WebCanvas* canvas, const WebRect& rect, WebTestThemeControlWin::Type ctype, WebTestThemeControlWin::State cstate)
36 WebTestThemeControlWin control(canvas, webRectToSkIRect(rect), ctype, cstate);
40 void drawTextField(WebCanvas* canvas, const WebRect& rect, WebTestThemeControlWin::Type ctype, WebTestThemeControlWin::State cstate, bool drawEdges, bool fillContentArea, WebColor color)
42 WebTestThemeControlWin control(canvas, webRectToSkIRect(rect), ctype, cstate);
43 control.drawTextField(drawEdges, fillContentArea, color);
46 void drawProgressBar(WebCanvas* canvas, WebTestThemeControlWin::Type ctype, WebTestThemeControlWin::State cstate, const WebRect& barRect, const WebRect& fillRect)
48 WebTestThemeControlWin control(canvas, webRectToSkIRect(barRect), ctype, cstate);
49 control.drawProgressBar(webRectToSkIRect(fillRect));
54 void WebTestThemeEngineWin::paintButton(WebCanvas* canvas, int part, int state, int classicState, const WebRect& rect)
56 WebTestThemeControlWin::Type ctype = WebTestThemeControlWin::UnknownType;
57 WebTestThemeControlWin::State cstate = WebTestThemeControlWin::UnknownState;
59 if (part == BP_CHECKBOX) {
61 case CBS_UNCHECKEDNORMAL:
62 BLINK_ASSERT(classicState == dfcsNormal);
63 ctype = WebTestThemeControlWin::UncheckedBoxType;
64 cstate = WebTestThemeControlWin::NormalState;
67 case CBS_UNCHECKEDHOT:
68 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_HOT));
69 ctype = WebTestThemeControlWin::UncheckedBoxType;
70 cstate = WebTestThemeControlWin::HotState;
73 case CBS_UNCHECKEDPRESSED:
74 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_PUSHED));
75 ctype = WebTestThemeControlWin::UncheckedBoxType;
76 cstate = WebTestThemeControlWin::PressedState;
79 case CBS_UNCHECKEDDISABLED:
80 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_INACTIVE));
81 ctype = WebTestThemeControlWin::UncheckedBoxType;
82 cstate = WebTestThemeControlWin::DisabledState;
85 case CBS_CHECKEDNORMAL:
86 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_CHECKED));
87 ctype = WebTestThemeControlWin::CheckedBoxType;
88 cstate = WebTestThemeControlWin::NormalState;
92 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_HOT));
93 ctype = WebTestThemeControlWin::CheckedBoxType;
94 cstate = WebTestThemeControlWin::HotState;
97 case CBS_CHECKEDPRESSED:
98 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_PUSHED));
99 ctype = WebTestThemeControlWin::CheckedBoxType;
100 cstate = WebTestThemeControlWin::PressedState;
103 case CBS_CHECKEDDISABLED:
104 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_INACTIVE));
105 ctype = WebTestThemeControlWin::CheckedBoxType;
106 cstate = WebTestThemeControlWin::DisabledState;
109 case CBS_MIXEDNORMAL:
110 // Classic theme can't represent mixed state checkbox. We assume
111 // it's equivalent to unchecked.
112 BLINK_ASSERT(classicState == DFCS_BUTTONCHECK);
113 ctype = WebTestThemeControlWin::IndeterminateCheckboxType;
114 cstate = WebTestThemeControlWin::NormalState;
118 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_HOT));
119 ctype = WebTestThemeControlWin::IndeterminateCheckboxType;
120 cstate = WebTestThemeControlWin::HotState;
123 case CBS_MIXEDPRESSED:
124 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_PUSHED));
125 ctype = WebTestThemeControlWin::IndeterminateCheckboxType;
126 cstate = WebTestThemeControlWin::PressedState;
129 case CBS_MIXEDDISABLED:
130 BLINK_ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_INACTIVE));
131 ctype = WebTestThemeControlWin::IndeterminateCheckboxType;
132 cstate = WebTestThemeControlWin::DisabledState;
136 BLINK_ASSERT_NOT_REACHED();
139 } else if (BP_RADIOBUTTON == part) {
141 case RBS_UNCHECKEDNORMAL:
142 BLINK_ASSERT(classicState == DFCS_BUTTONRADIO);
143 ctype = WebTestThemeControlWin::UncheckedRadioType;
144 cstate = WebTestThemeControlWin::NormalState;
147 case RBS_UNCHECKEDHOT:
148 BLINK_ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_HOT));
149 ctype = WebTestThemeControlWin::UncheckedRadioType;
150 cstate = WebTestThemeControlWin::HotState;
153 case RBS_UNCHECKEDPRESSED:
154 BLINK_ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_PUSHED));
155 ctype = WebTestThemeControlWin::UncheckedRadioType;
156 cstate = WebTestThemeControlWin::PressedState;
159 case RBS_UNCHECKEDDISABLED:
160 BLINK_ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_INACTIVE));
161 ctype = WebTestThemeControlWin::UncheckedRadioType;
162 cstate = WebTestThemeControlWin::DisabledState;
165 case RBS_CHECKEDNORMAL:
166 BLINK_ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_CHECKED));
167 ctype = WebTestThemeControlWin::CheckedRadioType;
168 cstate = WebTestThemeControlWin::NormalState;
172 BLINK_ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_CHECKED | DFCS_HOT));
173 ctype = WebTestThemeControlWin::CheckedRadioType;
174 cstate = WebTestThemeControlWin::HotState;
177 case RBS_CHECKEDPRESSED:
178 BLINK_ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_CHECKED | DFCS_PUSHED));
179 ctype = WebTestThemeControlWin::CheckedRadioType;
180 cstate = WebTestThemeControlWin::PressedState;
183 case RBS_CHECKEDDISABLED:
184 BLINK_ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_CHECKED | DFCS_INACTIVE));
185 ctype = WebTestThemeControlWin::CheckedRadioType;
186 cstate = WebTestThemeControlWin::DisabledState;
190 BLINK_ASSERT_NOT_REACHED();
193 } else if (BP_PUSHBUTTON == part) {
196 BLINK_ASSERT(classicState == DFCS_BUTTONPUSH);
197 ctype = WebTestThemeControlWin::PushButtonType;
198 cstate = WebTestThemeControlWin::NormalState;
202 BLINK_ASSERT(classicState == (DFCS_BUTTONPUSH | DFCS_HOT));
203 ctype = WebTestThemeControlWin::PushButtonType;
204 cstate = WebTestThemeControlWin::HotState;
208 BLINK_ASSERT(classicState == (DFCS_BUTTONPUSH | DFCS_PUSHED));
209 ctype = WebTestThemeControlWin::PushButtonType;
210 cstate = WebTestThemeControlWin::PressedState;
214 BLINK_ASSERT(classicState == (DFCS_BUTTONPUSH | DFCS_INACTIVE));
215 ctype = WebTestThemeControlWin::PushButtonType;
216 cstate = WebTestThemeControlWin::DisabledState;
220 BLINK_ASSERT(classicState == DFCS_BUTTONPUSH);
221 ctype = WebTestThemeControlWin::PushButtonType;
222 cstate = WebTestThemeControlWin::FocusedState;
226 BLINK_ASSERT_NOT_REACHED();
230 BLINK_ASSERT_NOT_REACHED();
232 drawControl(canvas, rect, ctype, cstate);
235 void WebTestThemeEngineWin::paintMenuList(WebCanvas* canvas, int part, int state, int classicState, const WebRect& rect)
237 WebTestThemeControlWin::Type ctype = WebTestThemeControlWin::UnknownType;
238 WebTestThemeControlWin::State cstate = WebTestThemeControlWin::UnknownState;
240 if (CP_DROPDOWNBUTTON == part) {
241 ctype = WebTestThemeControlWin::DropDownButtonType;
244 BLINK_ASSERT(classicState == DFCS_MENUARROW);
245 cstate = WebTestThemeControlWin::NormalState;
249 BLINK_ASSERT(classicState == (DFCS_MENUARROW | DFCS_HOT));
250 cstate = WebTestThemeControlWin::HoverState;
254 BLINK_ASSERT(classicState == (DFCS_MENUARROW | DFCS_PUSHED));
255 cstate = WebTestThemeControlWin::PressedState;
259 BLINK_ASSERT(classicState == (DFCS_MENUARROW | DFCS_INACTIVE));
260 cstate = WebTestThemeControlWin::DisabledState;
264 BLINK_ASSERT_NOT_REACHED();
268 BLINK_ASSERT_NOT_REACHED();
270 drawControl(canvas, rect, ctype, cstate);
273 void WebTestThemeEngineWin::paintScrollbarArrow(WebCanvas* canvas, int state, int classicState, const WebRect& rect)
275 WebTestThemeControlWin::Type ctype = WebTestThemeControlWin::UnknownType;
276 WebTestThemeControlWin::State cstate = WebTestThemeControlWin::UnknownState;
280 BLINK_ASSERT(classicState == DFCS_SCROLLUP);
281 ctype = WebTestThemeControlWin::UpArrowType;
282 cstate = WebTestThemeControlWin::NormalState;
286 BLINK_ASSERT(classicState == DFCS_SCROLLDOWN);
287 ctype = WebTestThemeControlWin::DownArrowType;
288 cstate = WebTestThemeControlWin::NormalState;
292 BLINK_ASSERT(classicState == DFCS_SCROLLLEFT);
293 ctype = WebTestThemeControlWin::LeftArrowType;
294 cstate = WebTestThemeControlWin::NormalState;
297 case ABS_RIGHTNORMAL:
298 BLINK_ASSERT(classicState == DFCS_SCROLLRIGHT);
299 ctype = WebTestThemeControlWin::RightArrowType;
300 cstate = WebTestThemeControlWin::NormalState;
304 BLINK_ASSERT(classicState == (DFCS_SCROLLUP | DFCS_HOT));
305 ctype = WebTestThemeControlWin::UpArrowType;
306 cstate = WebTestThemeControlWin::HotState;
310 BLINK_ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_HOT));
311 ctype = WebTestThemeControlWin::DownArrowType;
312 cstate = WebTestThemeControlWin::HotState;
316 BLINK_ASSERT(classicState == (DFCS_SCROLLLEFT | DFCS_HOT));
317 ctype = WebTestThemeControlWin::LeftArrowType;
318 cstate = WebTestThemeControlWin::HotState;
322 BLINK_ASSERT(classicState == (DFCS_SCROLLRIGHT | DFCS_HOT));
323 ctype = WebTestThemeControlWin::RightArrowType;
324 cstate = WebTestThemeControlWin::HotState;
328 BLINK_ASSERT(classicState == DFCS_SCROLLUP);
329 ctype = WebTestThemeControlWin::UpArrowType;
330 cstate = WebTestThemeControlWin::HoverState;
334 BLINK_ASSERT(classicState == DFCS_SCROLLDOWN);
335 ctype = WebTestThemeControlWin::DownArrowType;
336 cstate = WebTestThemeControlWin::HoverState;
340 BLINK_ASSERT(classicState == DFCS_SCROLLLEFT);
341 ctype = WebTestThemeControlWin::LeftArrowType;
342 cstate = WebTestThemeControlWin::HoverState;
346 BLINK_ASSERT(classicState == DFCS_SCROLLRIGHT);
347 ctype = WebTestThemeControlWin::RightArrowType;
348 cstate = WebTestThemeControlWin::HoverState;
352 BLINK_ASSERT(classicState == (DFCS_SCROLLUP | DFCS_PUSHED | DFCS_FLAT));
353 ctype = WebTestThemeControlWin::UpArrowType;
354 cstate = WebTestThemeControlWin::PressedState;
357 case ABS_DOWNPRESSED:
358 BLINK_ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_PUSHED | DFCS_FLAT));
359 ctype = WebTestThemeControlWin::DownArrowType;
360 cstate = WebTestThemeControlWin::PressedState;
363 case ABS_LEFTPRESSED:
364 BLINK_ASSERT(classicState == (DFCS_SCROLLLEFT | DFCS_PUSHED | DFCS_FLAT));
365 ctype = WebTestThemeControlWin::LeftArrowType;
366 cstate = WebTestThemeControlWin::PressedState;
369 case ABS_RIGHTPRESSED:
370 BLINK_ASSERT(classicState == (DFCS_SCROLLRIGHT | DFCS_PUSHED | DFCS_FLAT));
371 ctype = WebTestThemeControlWin::RightArrowType;
372 cstate = WebTestThemeControlWin::PressedState;
376 BLINK_ASSERT(classicState == (DFCS_SCROLLUP | DFCS_INACTIVE));
377 ctype = WebTestThemeControlWin::UpArrowType;
378 cstate = WebTestThemeControlWin::DisabledState;
381 case ABS_DOWNDISABLED:
382 BLINK_ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_INACTIVE));
383 ctype = WebTestThemeControlWin::DownArrowType;
384 cstate = WebTestThemeControlWin::DisabledState;
387 case ABS_LEFTDISABLED:
388 BLINK_ASSERT(classicState == (DFCS_SCROLLLEFT | DFCS_INACTIVE));
389 ctype = WebTestThemeControlWin::LeftArrowType;
390 cstate = WebTestThemeControlWin::DisabledState;
393 case ABS_RIGHTDISABLED:
394 BLINK_ASSERT(classicState == (DFCS_SCROLLRIGHT | DFCS_INACTIVE));
395 ctype = WebTestThemeControlWin::RightArrowType;
396 cstate = WebTestThemeControlWin::DisabledState;
400 BLINK_ASSERT_NOT_REACHED();
404 drawControl(canvas, rect, ctype, cstate);
407 void WebTestThemeEngineWin::paintScrollbarThumb(WebCanvas* canvas, int part, int state, int classicState, const WebRect& rect)
409 WebTestThemeControlWin::Type ctype = WebTestThemeControlWin::UnknownType;
410 WebTestThemeControlWin::State cstate = WebTestThemeControlWin::UnknownState;
413 case SBP_THUMBBTNHORZ:
414 ctype = WebTestThemeControlWin::HorizontalScrollThumbType;
417 case SBP_THUMBBTNVERT:
418 ctype = WebTestThemeControlWin::VerticalScrollThumbType;
421 case SBP_GRIPPERHORZ:
422 ctype = WebTestThemeControlWin::HorizontalScrollGripType;
425 case SBP_GRIPPERVERT:
426 ctype = WebTestThemeControlWin::VerticalScrollGripType;
430 BLINK_ASSERT_NOT_REACHED();
436 BLINK_ASSERT(classicState == dfcsNormal);
437 cstate = WebTestThemeControlWin::NormalState;
441 BLINK_ASSERT(classicState == DFCS_HOT);
442 cstate = WebTestThemeControlWin::HotState;
446 BLINK_ASSERT(classicState == dfcsNormal);
447 cstate = WebTestThemeControlWin::HoverState;
451 BLINK_ASSERT(classicState == dfcsNormal);
452 cstate = WebTestThemeControlWin::PressedState;
456 BLINK_ASSERT_NOT_REACHED(); // This should never happen in practice.
460 BLINK_ASSERT_NOT_REACHED();
464 drawControl(canvas, rect, ctype, cstate);
467 void WebTestThemeEngineWin::paintScrollbarTrack(WebCanvas* canvas, int part, int state, int classicState, const WebRect& rect, const WebRect& alignRect)
469 WebTestThemeControlWin::Type ctype = WebTestThemeControlWin::UnknownType;
470 WebTestThemeControlWin::State cstate = WebTestThemeControlWin::UnknownState;
473 case SBP_UPPERTRACKHORZ:
474 ctype = WebTestThemeControlWin::HorizontalScrollTrackBackType;
477 case SBP_LOWERTRACKHORZ:
478 ctype = WebTestThemeControlWin::HorizontalScrollTrackForwardType;
481 case SBP_UPPERTRACKVERT:
482 ctype = WebTestThemeControlWin::VerticalScrollTrackBackType;
485 case SBP_LOWERTRACKVERT:
486 ctype = WebTestThemeControlWin::VerticalScrollTrackForwardType;
490 BLINK_ASSERT_NOT_REACHED();
496 BLINK_ASSERT(classicState == dfcsNormal);
497 cstate = WebTestThemeControlWin::NormalState;
501 BLINK_ASSERT_NOT_REACHED(); // This should never happen in practice.
505 BLINK_ASSERT(classicState == dfcsNormal);
506 cstate = WebTestThemeControlWin::HoverState;
510 BLINK_ASSERT_NOT_REACHED(); // This should never happen in practice.
514 BLINK_ASSERT(classicState == DFCS_INACTIVE);
515 cstate = WebTestThemeControlWin::DisabledState;
519 BLINK_ASSERT_NOT_REACHED();
523 drawControl(canvas, rect, ctype, cstate);
526 void WebTestThemeEngineWin::paintSpinButton(WebCanvas* canvas, int part, int state, int classicState, const WebRect& rect)
528 WebTestThemeControlWin::Type ctype = WebTestThemeControlWin::UnknownType;
529 WebTestThemeControlWin::State cstate = WebTestThemeControlWin::UnknownState;
531 if (part == SPNP_UP) {
532 ctype = WebTestThemeControlWin::UpArrowType;
535 BLINK_ASSERT(classicState == DFCS_SCROLLUP);
536 cstate = WebTestThemeControlWin::NormalState;
539 BLINK_ASSERT(classicState == (DFCS_SCROLLUP | DFCS_INACTIVE));
540 cstate = WebTestThemeControlWin::DisabledState;
543 BLINK_ASSERT(classicState == (DFCS_SCROLLUP | DFCS_PUSHED));
544 cstate = WebTestThemeControlWin::PressedState;
547 BLINK_ASSERT(classicState == (DFCS_SCROLLUP | DFCS_HOT));
548 cstate = WebTestThemeControlWin::HoverState;
551 BLINK_ASSERT_NOT_REACHED();
553 } else if (part == SPNP_DOWN) {
554 ctype = WebTestThemeControlWin::DownArrowType;
557 BLINK_ASSERT(classicState == DFCS_SCROLLDOWN);
558 cstate = WebTestThemeControlWin::NormalState;
561 BLINK_ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_INACTIVE));
562 cstate = WebTestThemeControlWin::DisabledState;
565 BLINK_ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_PUSHED));
566 cstate = WebTestThemeControlWin::PressedState;
569 BLINK_ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_HOT));
570 cstate = WebTestThemeControlWin::HoverState;
573 BLINK_ASSERT_NOT_REACHED();
576 BLINK_ASSERT_NOT_REACHED();
577 drawControl(canvas, rect, ctype, cstate);
580 void WebTestThemeEngineWin::paintTextField(WebCanvas* canvas, int part, int state, int classicState, const WebRect& rect, WebColor color, bool fillContentArea, bool drawEdges)
582 WebTestThemeControlWin::Type ctype = WebTestThemeControlWin::UnknownType;
583 WebTestThemeControlWin::State cstate = WebTestThemeControlWin::UnknownState;
585 BLINK_ASSERT(EP_EDITTEXT == part);
586 ctype = WebTestThemeControlWin::TextFieldType;
590 BLINK_ASSERT(classicState == dfcsNormal);
591 cstate = WebTestThemeControlWin::NormalState;
595 BLINK_ASSERT(classicState == DFCS_HOT);
596 cstate = WebTestThemeControlWin::HotState;
600 BLINK_ASSERT(classicState == DFCS_INACTIVE);
601 cstate = WebTestThemeControlWin::DisabledState;
605 BLINK_ASSERT(classicState == DFCS_PUSHED);
606 cstate = WebTestThemeControlWin::PressedState;
610 BLINK_ASSERT(classicState == dfcsNormal);
611 cstate = WebTestThemeControlWin::FocusedState;
615 BLINK_ASSERT(classicState == dfcsNormal);
616 cstate = WebTestThemeControlWin::ReadOnlyState;
620 BLINK_ASSERT_NOT_REACHED();
624 drawTextField(canvas, rect, ctype, cstate, drawEdges, fillContentArea, color);
627 void WebTestThemeEngineWin::paintTrackbar(WebCanvas* canvas, int part, int state, int classicState, const WebRect& rect)
629 WebTestThemeControlWin::Type ctype = WebTestThemeControlWin::UnknownType;
630 WebTestThemeControlWin::State cstate = WebTestThemeControlWin::UnknownState;
632 if (TKP_THUMBBOTTOM == part) {
633 ctype = WebTestThemeControlWin::HorizontalSliderThumbType;
636 BLINK_ASSERT(classicState == dfcsNormal);
637 cstate = WebTestThemeControlWin::NormalState;
641 BLINK_ASSERT(classicState == DFCS_HOT);
642 cstate = WebTestThemeControlWin::HotState;
646 BLINK_ASSERT(classicState == DFCS_INACTIVE);
647 cstate = WebTestThemeControlWin::DisabledState;
651 BLINK_ASSERT(classicState == DFCS_PUSHED);
652 cstate = WebTestThemeControlWin::PressedState;
656 BLINK_ASSERT_NOT_REACHED();
659 } else if (TKP_THUMBVERT == part) {
660 ctype = WebTestThemeControlWin::VerticalSliderThumbType;
663 BLINK_ASSERT(classicState == dfcsNormal);
664 cstate = WebTestThemeControlWin::NormalState;
668 BLINK_ASSERT(classicState == DFCS_HOT);
669 cstate = WebTestThemeControlWin::HotState;
673 BLINK_ASSERT(classicState == DFCS_INACTIVE);
674 cstate = WebTestThemeControlWin::DisabledState;
678 BLINK_ASSERT(classicState == DFCS_PUSHED);
679 cstate = WebTestThemeControlWin::PressedState;
683 BLINK_ASSERT_NOT_REACHED();
686 } else if (TKP_TRACK == part) {
687 ctype = WebTestThemeControlWin::HorizontalSliderTrackType;
688 BLINK_ASSERT(state == TRS_NORMAL);
689 BLINK_ASSERT(classicState == dfcsNormal);
690 cstate = WebTestThemeControlWin::NormalState;
691 } else if (TKP_TRACKVERT == part) {
692 ctype = WebTestThemeControlWin::VerticalSliderTrackType;
693 BLINK_ASSERT(state == TRVS_NORMAL);
694 BLINK_ASSERT(classicState == dfcsNormal);
695 cstate = WebTestThemeControlWin::NormalState;
697 BLINK_ASSERT_NOT_REACHED();
699 drawControl(canvas, rect, ctype, cstate);
703 void WebTestThemeEngineWin::paintProgressBar(blink::WebCanvas* canvas, const blink::WebRect& barRect, const blink::WebRect& valueRect, bool determinate, double)
705 WebTestThemeControlWin::Type ctype = WebTestThemeControlWin::ProgressBarType;
706 WebTestThemeControlWin::State cstate = determinate ? WebTestThemeControlWin::NormalState : WebTestThemeControlWin::IndeterminateState;
707 drawProgressBar(canvas, ctype, cstate, barRect, valueRect);
711 blink::WebSize WebTestThemeEngineWin::getSize(int part)
713 return blink::WebSize();