Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: webkit/tools/test_shell/test_shell_webthemecontrol.cc

Issue 2876036: Implement indeterminate checkbox for the generic theme.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file implements a simple generic version of the WebKitThemeEngine, 5 // This file implements a simple generic version of the WebKitThemeEngine,
6 // which is used to draw all the native controls on a web page. We use this 6 // which is used to draw all the native controls on a web page. We use this
7 // file when running in layout test mode in order to remove any 7 // file when running in layout test mode in order to remove any
8 // platform-specific rendering differences due to themes, colors, etc. 8 // platform-specific rendering differences due to themes, colors, etc.
9 // 9 //
10 10
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 roundRect(bg_color_); 260 roundRect(bg_color_);
261 break; 261 break;
262 case kUncheckedBox_Type: 262 case kUncheckedBox_Type:
263 // Unchecked boxes are simply plain boxes. 263 // Unchecked boxes are simply plain boxes.
264 box(irect_, bg_color_); 264 box(irect_, bg_color_);
265 break; 265 break;
266 case kCheckedBox_Type: 266 case kCheckedBox_Type:
267 nested_boxes(kCheckIndent, kCheckIndent, kCheckIndent, kCheckIndent, 267 nested_boxes(kCheckIndent, kCheckIndent, kCheckIndent, kCheckIndent,
268 bg_color_, fg_color_); 268 bg_color_, fg_color_);
269 break; 269 break;
270 case kIndeterminateCheckBox_Type:
271 // Indeterminate checkbox is a box containing '-'.
272 nested_boxes(kCheckIndent, height_ / 2, kCheckIndent, height_ / 2,
273 bg_color_, fg_color_);
274 break;
270 case kUncheckedRadio_Type: 275 case kUncheckedRadio_Type:
271 circle(SkIntToScalar(half_height), bg_color_); 276 circle(SkIntToScalar(half_height), bg_color_);
272 break; 277 break;
273 case kCheckedRadio_Type: 278 case kCheckedRadio_Type:
274 circle(SkIntToScalar(half_height), bg_color_); 279 circle(SkIntToScalar(half_height), bg_color_);
275 circle(SkIntToScalar(half_height - kCheckIndent), fg_color_); 280 circle(SkIntToScalar(half_height - kCheckIndent), fg_color_);
276 break; 281 break;
277 case kHorizontalScrollTrackBack_Type: 282 case kHorizontalScrollTrackBack_Type:
278 // Draw a box with a notch at the left. 283 // Draw a box with a notch at the left.
279 long_offset = half_height - kNotchLongOffset; 284 long_offset = half_height - kNotchLongOffset;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 paint.setColor(fg_color_); 432 paint.setColor(fg_color_);
428 paint.setStyle(SkPaint::kFill_Style); 433 paint.setStyle(SkPaint::kFill_Style);
429 canvas_->drawIRect(tofill, paint); 434 canvas_->drawIRect(tofill, paint);
430 435
431 markState(); 436 markState();
432 canvas_->endPlatformPaint(); 437 canvas_->endPlatformPaint();
433 } 438 }
434 439
435 } // namespace TestShellWebTheme 440 } // namespace TestShellWebTheme
436 441
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell_webthemecontrol.h ('k') | webkit/tools/test_shell/test_shell_webthemeengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698