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

Unified Diff: webkit/tools/test_shell/test_shell_webthemecontrol.cc

Issue 1596018: Added support for HTML5 progress element. (Closed)
Patch Set: just sync the change of webkit side. Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webkit/tools/test_shell/test_shell_webthemecontrol.cc
diff --git a/webkit/tools/test_shell/test_shell_webthemecontrol.cc b/webkit/tools/test_shell/test_shell_webthemecontrol.cc
index 742a29560acaa2a4f7017c136911c7fc166cda76..bd12febd970d9525d535108a2307e7ff54f7573f 100644
--- a/webkit/tools/test_shell/test_shell_webthemecontrol.cc
+++ b/webkit/tools/test_shell/test_shell_webthemecontrol.cc
@@ -30,7 +30,8 @@ const SkColor kBgColors[] = {
SkColorSetRGB(0x43, 0xf9, 0xff), // Hot
SkColorSetRGB(0x20, 0xf6, 0xcc), // Focused
SkColorSetRGB(0x00, 0xf3, 0xac), // Hover
- SkColorSetRGB(0xa9, 0xff, 0x12) // Pressed
+ SkColorSetRGB(0xa9, 0xff, 0x12), // Pressed
+ SkColorSetRGB(0xcc, 0xcc, 0xcc) // Indetermiante
};
SkIRect Validate(const SkIRect& rect, Control::Type ctype) {
@@ -411,5 +412,27 @@ void Control::drawTextField(bool draw_edges, bool fill_content_area,
canvas_->endPlatformPaint();
}
+void
+Control::drawProgressBar(const SkIRect &fill_rect)
+{
+ SkPaint paint;
+
+ canvas_->beginPlatformPaint();
+
+ paint.setColor(bg_color_);
+ paint.setStyle(SkPaint::kFill_Style);
+ canvas_->drawIRect(irect_, paint);
+
+ // Emulate clipping
+ SkIRect tofill;
+ tofill.intersect(irect_, fill_rect);
+ paint.setColor(fg_color_);
+ paint.setStyle(SkPaint::kFill_Style);
+ canvas_->drawIRect(tofill, paint);
+
+ markState();
+ canvas_->endPlatformPaint();
+}
+
} // namespace TestShellWebTheme
« no previous file with comments | « webkit/tools/test_shell/test_shell_webthemecontrol.h ('k') | webkit/tools/test_shell/test_shell_webthemeengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698