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

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

Issue 243583002: Always initialize WindowFeatures.{x|y|width|height} (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « 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 3796f0bb496ec6daa0e7d237dde7db250be3e58a..e23c623a23a6d4ea795a9eecf7c7cbc49b55b6b4 100644
--- a/Source/core/page/WindowFeatures.cpp
+++ b/Source/core/page/WindowFeatures.cpp
@@ -37,10 +37,15 @@ static bool isWindowFeaturesSeparator(UChar c)
}
WindowFeatures::WindowFeatures(const String& features)
- : xSet(false)
+ : x(0)
+ , xSet(false)
+ , y(0)
, ySet(false)
+ , width(0)
, widthSet(false)
+ , height(0)
, heightSet(false)
+ , resizable(true)
, fullscreen(false)
, dialog(false)
{
@@ -53,13 +58,12 @@ WindowFeatures::WindowFeatures(const String& features)
We always allow a window to be resized, which is consistent with Firefox.
*/
- if (features.length() == 0) {
+ if (features.isEmpty()) {
menuBarVisible = true;
statusBarVisible = true;
toolBarVisible = true;
locationBarVisible = true;
scrollbarsVisible = true;
- resizable = true;
return;
}
@@ -68,7 +72,6 @@ WindowFeatures::WindowFeatures(const String& features)
toolBarVisible = false;
locationBarVisible = false;
scrollbarsVisible = false;
- resizable = true;
// Tread lightly in this code -- it was specifically designed to mimic Win IE's parsing behavior.
int keyBegin, keyEnd;
« 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