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

Unified Diff: Source/core/page/WindowFeatures.cpp

Issue 16358008: Allow parsing of custom window features, such as 'moo=foo'. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Style change. Created 7 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/WindowFeatures.cpp
diff --git a/Source/core/page/WindowFeatures.cpp b/Source/core/page/WindowFeatures.cpp
index 2ac15dc5787f2a2d6b7d95bde027372891fe7903..6a26e050141ec1a22f24d713453442182eab4afc 100644
--- a/Source/core/page/WindowFeatures.cpp
+++ b/Source/core/page/WindowFeatures.cpp
@@ -156,8 +156,15 @@ void WindowFeatures::setWindowFeature(const String& keyString, const String& val
fullscreen = value;
else if (keyString == "scrollbars")
scrollbarsVisible = value;
- else if (value == 1)
- additionalFeatures.append(keyString);
+ else {
+ // We're dealing with an unknown key, so just pass it on for processing
+ // at a later time.
+ String keyValueStr = keyString;
+ if (!valueString.isEmpty())
+ keyValueStr.append("=" + valueString);
+
+ additionalFeatures.append(keyValueStr);
+ }
}
WindowFeatures::WindowFeatures(const String& dialogFeaturesString, const FloatRect& screenAvailableRect)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698