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

Unified Diff: headless/app/headless_shell.cc

Issue 2622773003: headless: Allow both WW,HH and WWxHH forms for specifying window size (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | headless/app/headless_shell_switches.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/app/headless_shell.cc
diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc
index 530a7c5dc3498e2d3b19d99b12c8ce6da043d47a..42a331fb9fbe326ce760a71229ee363ad895ebde 100644
--- a/headless/app/headless_shell.cc
+++ b/headless/app/headless_shell.cc
@@ -45,7 +45,7 @@ const char kDefaultScreenshotFileName[] = "screenshot.png";
bool ParseWindowSize(std::string window_size, gfx::Size* parsed_window_size) {
int width, height = 0;
- if (sscanf(window_size.c_str(), "%dx%d", &width, &height) >= 2 &&
+ if (sscanf(window_size.c_str(), "%d%*[x,]%d", &width, &height) >= 2 &&
width >= 0 && height >= 0) {
parsed_window_size->set_width(width);
parsed_window_size->set_height(height);
« no previous file with comments | « no previous file | headless/app/headless_shell_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698