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

Unified Diff: webkit/tools/test_shell/test_shell_webthemeengine.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
« no previous file with comments | « webkit/tools/test_shell/test_shell_webthemeengine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_webthemeengine.cc
diff --git a/webkit/tools/test_shell/test_shell_webthemeengine.cc b/webkit/tools/test_shell/test_shell_webthemeengine.cc
index b9e0308c3eb0b812277cc689bbf8db654d7fb488..4a5caa5e55848489be1d557d42dc23100402caf1 100644
--- a/webkit/tools/test_shell/test_shell_webthemeengine.cc
+++ b/webkit/tools/test_shell/test_shell_webthemeengine.cc
@@ -60,6 +60,13 @@ void drawTextField(WebCanvas *canvas, const WebRect &rect,
control.drawTextField(draw_edges, fill_content_area, color);
}
+void drawProgressBar(WebCanvas *canvas,
+ Control::Type ctype, Control::State cstate,
+ const WebRect &bar_rect, const WebRect &fill_rect) {
+ Control control(canvas, webRectToSkIRect(bar_rect), ctype, cstate);
+ control.drawProgressBar(webRectToSkIRect(fill_rect));
+}
+
void Engine::paintButton(WebCanvas* canvas, int part, int state,
int classic_state, const WebRect& rect) {
Control::Type ctype = Control::kUnknown_Type;
@@ -533,4 +540,13 @@ void Engine::paintTrackbar(WebCanvas* canvas, int part, int state,
drawControl(canvas, rect, ctype, cstate);
}
+
+void Engine::paintProgressBar(WebKit::WebCanvas* canvas,
+ const WebKit::WebRect& barRect,
+ int valuePart, const WebKit::WebRect& valueRect) {
+ Control::Type ctype = Control::kProgressBar_Type;
+ Control::State cstate = valuePart == PP_FILL ? Control::kNormal_State : Control::kIndeterminate_State;
+ drawProgressBar(canvas, ctype, cstate, barRect, valueRect);
+}
+
} // namespace TestShellWebTheme
« no previous file with comments | « webkit/tools/test_shell/test_shell_webthemeengine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698