Always initialize WindowFeatures.{x|y|width|height} (issue 243583002)

0 views
Skip to first unread message

dch...@chromium.org

unread,
Apr 18, 2014, 3:09:49 PM4/18/14
to to...@chromium.org, blink-...@chromium.org
Reviewers: tony,

Description:
Always initialize WindowFeatures.{x|y|width|height}

Based on WebKit r166072, which also updates a constructor that Blink
r171963 missed.

BUG=342591

Please review this at https://codereview.chromium.org/243583002/

SVN Base: svn://svn.chromium.org/blink/trunk

Affected files (+7, -4 lines):
M Source/core/page/WindowFeatures.cpp


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;


to...@chromium.org

unread,
Apr 18, 2014, 3:16:08 PM4/18/14
to dch...@chromium.org, blink-...@chromium.org, eart...@chromium.org

commi...@chromium.org

unread,
Apr 18, 2014, 6:18:14 PM4/18/14
to dch...@chromium.org, to...@chromium.org, blink-...@chromium.org, eart...@chromium.org

commi...@chromium.org

unread,
Apr 18, 2014, 7:22:52 PM4/18/14
to dch...@chromium.org, to...@chromium.org, blink-...@chromium.org, eart...@chromium.org
Change committed as 171984

https://codereview.chromium.org/243583002/
Reply all
Reply to author
Forward
0 new messages