Reviewed by Anders.
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2006 05:13:41 +0000 (05:13 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2006 05:13:41 +0000 (05:13 +0000)
        Renamed WindowArgs to WindowFeatures, and moved it into its own header.
        ("Features" is the term of art in IE documentation. "Args" is pirate
        talk.)

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_window.cpp:
        (KJS::createNewWindow):
        (KJS::showModalDialog):
        (KJS::setWindowFeature):
        (KJS::parseWindowFeatures):
        (KJS::constrainToVisible):
        (KJS::WindowFunc::callAsFunction):
        * bridge/BrowserExtension.h:
        * bridge/WindowFeatures.h: Added.
        * bridge/mac/BrowserExtensionMac.h:
        * bridge/mac/BrowserExtensionMac.mm:
        (WebCore::BrowserExtensionMac::createNewWindow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17102 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/kjs_window.cpp
WebCore/bridge/BrowserExtension.h
WebCore/bridge/WindowFeatures.h [new file with mode: 0644]
WebCore/bridge/mac/BrowserExtensionMac.h
WebCore/bridge/mac/BrowserExtensionMac.mm

index 69d0565260cd62d6311cf749e5d2019543c4f061..e1736fcad025a3c179e987785681d08af9958057 100644 (file)
@@ -1,3 +1,25 @@
+2006-10-17  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Anders.
+        
+        Renamed WindowArgs to WindowFeatures, and moved it into its own header.
+        ("Features" is the term of art in IE documentation. "Args" is pirate
+        talk.)
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/kjs_window.cpp:
+        (KJS::createNewWindow):
+        (KJS::showModalDialog):
+        (KJS::setWindowFeature):
+        (KJS::parseWindowFeatures):
+        (KJS::constrainToVisible):
+        (KJS::WindowFunc::callAsFunction):
+        * bridge/BrowserExtension.h:
+        * bridge/WindowFeatures.h: Added.
+        * bridge/mac/BrowserExtensionMac.h:
+        * bridge/mac/BrowserExtensionMac.mm:
+        (WebCore::BrowserExtensionMac::createNewWindow):
+
 2006-10-17  Sam Weinig  <sam.weinig@gmail.com>
 
         Reviewed by Tim H.
index ff46ca74bb8df71a144ad227dc52a4a9ead4a53a..1ecb8fbba04362a38e9fe41b1cb04bf177c8ca7d 100644 (file)
                                RelativePath="..\..\bridge\JavaAppletWidget.h"
                                >
                        </File>
+                       <File
+                               RelativePath="..\..\bridge\WindowFeatures.h"
+                               >
+                       </File>
                        <Filter
                                Name="win"
                                >
index 7144b607d76d9c84827df5b0920e162ea4cd0bbd..c25e6864d173e606ac45041a5039dfa6809530b2 100644 (file)
@@ -52,6 +52,7 @@
                14E8378E09F85D4F00B85AE4 /* JSEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E8378D09F85D4F00B85AE4 /* JSEvent.h */; };
                14EC267F09CA07E000E1EEEC /* EventTargetNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 14EC267D09CA07E000E1EEEC /* EventTargetNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
                14EC268009CA07E000E1EEEC /* EventTargetNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14EC267E09CA07E000E1EEEC /* EventTargetNode.cpp */; };
+               14FD6DFD0AE5EA1B00AD67AD /* WindowFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 14FD6DFC0AE5EA1B00AD67AD /* WindowFeatures.h */; };
                14FFE31D0AE1963300136BF5 /* HTMLFrameElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */; };
                14FFE31E0AE1963300136BF5 /* HTMLFrameElementBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14FFE31C0AE1963300136BF5 /* HTMLFrameElementBase.cpp */; };
                1A0D57360A5C77FE007EDD4C /* OverflowEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A0D57340A5C77FE007EDD4C /* OverflowEvent.cpp */; };
                14E8378D09F85D4F00B85AE4 /* JSEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEvent.h; sourceTree = "<group>"; };
                14EC267D09CA07E000E1EEEC /* EventTargetNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTargetNode.h; sourceTree = "<group>"; };
                14EC267E09CA07E000E1EEEC /* EventTargetNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventTargetNode.cpp; sourceTree = "<group>"; };
+               14FD6DFC0AE5EA1B00AD67AD /* WindowFeatures.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WindowFeatures.h; sourceTree = "<group>"; };
                14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLFrameElementBase.h; sourceTree = "<group>"; };
                14FFE31C0AE1963300136BF5 /* HTMLFrameElementBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFrameElementBase.cpp; sourceTree = "<group>"; };
                1A0D57340A5C77FE007EDD4C /* OverflowEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OverflowEvent.cpp; sourceTree = "<group>"; };
                                55998A5C052B59CC0017A6C1 /* AXObjectCache.h */,
                                BCEA4943097F0F5C0094C9E4 /* BrowserExtension.h */,
                                935C475C09AC4CA000A6AAB4 /* History.h */,
+                               14FD6DFC0AE5EA1B00AD67AD /* WindowFeatures.h */,
                        );
                        path = bridge;
                        sourceTree = "<group>";
                                6563A9A70ADF4094000ED2CD /* LoaderNSURLRequestExtras.h in Headers */,
                                14FFE31D0AE1963300136BF5 /* HTMLFrameElementBase.h in Headers */,
                                658436860AE01B7400E53753 /* FrameLoadRequest.h in Headers */,
+                               14FD6DFD0AE5EA1B00AD67AD /* WindowFeatures.h in Headers */,
                                8542A7930AE5C93F00DF58DF /* JSSVGRect.h in Headers */,
                                8542A7950AE5C94100DF58DF /* JSSVGPoint.h in Headers */,
                                8542A7970AE5C94300DF58DF /* JSSVGNumber.h in Headers */,
index 5162033006be4f8297f7bf5be43dd986a6f27681..e7da649249e7febcbaa5fbaa262d039adab7be56 100644 (file)
 #include "JSNodeFilter.h"
 #include "JSRange.h"
 #include "JSXMLHttpRequest.h"
-#include "Settings.h"
 #include "Logging.h"
 #include "Page.h"
 #include "PlugInInfoStore.h"
 #include "RenderView.h"
 #include "Screen.h"
 #include "SelectionController.h"
+#include "Settings.h"
+#include "WindowFeatures.h"
 #include "htmlediting.h"
 #include "kjs_css.h"
 #include "kjs_events.h"
@@ -540,7 +541,7 @@ static float floatFeature(const HashMap<String, String> &features, const char *k
 }
 
 static Frame *createNewWindow(ExecState *exec, Window *openerWindow, const DeprecatedString &URL,
-    const DeprecatedString &frameName, const WindowArgs &windowArgs, JSValue *dialogArgs)
+    const DeprecatedString &frameName, const WindowFeatures &windowFeatures, JSValue *dialogArgs)
 {
     Frame* openerPart = openerWindow->frame();
     Frame* activePart = Window::retrieveActive(exec)->frame();
@@ -559,7 +560,7 @@ static Frame *createNewWindow(ExecState *exec, Window *openerWindow, const Depre
     // We'd have to resolve all those issues to pass the URL instead of "".
 
     Frame* newFrame = 0;
-    openerPart->browserExtension()->createNewWindow(frameRequest, windowArgs, newFrame);
+    openerPart->browserExtension()->createNewWindow(frameRequest, windowFeatures, newFrame);
 
     if (!newFrame)
         return 0;
@@ -606,7 +607,7 @@ static JSValue* showModalDialog(ExecState* exec, Window* openerWindow, const Lis
 
     bool trusted = false;
 
-    WindowArgs wargs;
+    WindowFeatures wargs;
 
     // The following features from Microsoft's documentation are not implemented:
     // - default font settings
@@ -1349,7 +1350,7 @@ void Window::setCurrentEvent(Event *evt)
   m_evt = evt;
 }
 
-static void setWindowFeature(const String& keyString, const String& valueString, WindowArgs& windowArgs)
+static void setWindowFeature(const String& keyString, const String& valueString, WindowFeatures& windowFeatures)
 {
     int value;
     
@@ -1360,31 +1361,31 @@ static void setWindowFeature(const String& keyString, const String& valueString,
         value = valueString.toInt();
     
     if (keyString == "left" || keyString == "screenx") {
-        windowArgs.xSet = true;
-        windowArgs.x = value;
+        windowFeatures.xSet = true;
+        windowFeatures.x = value;
     } else if (keyString == "top" || keyString == "screeny") {
-        windowArgs.ySet = true;
-        windowArgs.y = value;
+        windowFeatures.ySet = true;
+        windowFeatures.y = value;
     } else if (keyString == "width" || keyString == "innerwidth") {
-        windowArgs.widthSet = true;
-        windowArgs.width = value;
+        windowFeatures.widthSet = true;
+        windowFeatures.width = value;
     } else if (keyString == "height" || keyString == "innerheight") {
-        windowArgs.heightSet = true;
-        windowArgs.height = value;
+        windowFeatures.heightSet = true;
+        windowFeatures.height = value;
     } else if (keyString == "menubar")
-        windowArgs.menuBarVisible = value;
+        windowFeatures.menuBarVisible = value;
     else if (keyString == "toolbar")
-        windowArgs.toolBarVisible = value;
+        windowFeatures.toolBarVisible = value;
     else if (keyString == "location")
-        windowArgs.locationBarVisible = value;
+        windowFeatures.locationBarVisible = value;
     else if (keyString == "status")
-        windowArgs.statusBarVisible = value;
+        windowFeatures.statusBarVisible = value;
     else if (keyString == "resizable")
-        windowArgs.resizable = value;
+        windowFeatures.resizable = value;
     else if (keyString == "fullscreen")
-        windowArgs.fullscreen = value;
+        windowFeatures.fullscreen = value;
     else if (keyString == "scrollbars")
-        windowArgs.scrollbarsVisible = value;
+        windowFeatures.scrollbarsVisible = value;
 }
 
 // Though isspace() considers \t and \v to be whitespace, Win IE doesn't.
@@ -1393,7 +1394,7 @@ static bool isSeparator(::UChar c)
     return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '=' || c == ',' || c == '\0';
 }
 
-static void parseWindowFeatures(const String& features, WindowArgs& windowArgs)
+static void parseWindowFeatures(const String& features, WindowFeatures& windowFeatures)
 {
     /*
      The IE rule is: all features except for channelmode and fullscreen default to YES, but
@@ -1403,31 +1404,31 @@ static void parseWindowFeatures(const String& features, WindowArgs& windowArgs)
      <http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp>
      */
     
-    windowArgs.dialog = false;
-    windowArgs.fullscreen = false;
+    windowFeatures.dialog = false;
+    windowFeatures.fullscreen = false;
     
-    windowArgs.xSet = false;
-    windowArgs.ySet = false;
-    windowArgs.widthSet = false;
-    windowArgs.heightSet = false;
+    windowFeatures.xSet = false;
+    windowFeatures.ySet = false;
+    windowFeatures.widthSet = false;
+    windowFeatures.heightSet = false;
     
     if (features.length() == 0) {
-        windowArgs.menuBarVisible = true;
-        windowArgs.statusBarVisible = true;
-        windowArgs.toolBarVisible = true;
-        windowArgs.locationBarVisible = true;
-        windowArgs.scrollbarsVisible = true;
-        windowArgs.resizable = true;
+        windowFeatures.menuBarVisible = true;
+        windowFeatures.statusBarVisible = true;
+        windowFeatures.toolBarVisible = true;
+        windowFeatures.locationBarVisible = true;
+        windowFeatures.scrollbarsVisible = true;
+        windowFeatures.resizable = true;
         
         return;
     }
     
-    windowArgs.menuBarVisible = false;
-    windowArgs.statusBarVisible = false;
-    windowArgs.toolBarVisible = false;
-    windowArgs.locationBarVisible = false;
-    windowArgs.scrollbarsVisible = false;
-    windowArgs.resizable = false;
+    windowFeatures.menuBarVisible = false;
+    windowFeatures.statusBarVisible = false;
+    windowFeatures.toolBarVisible = false;
+    windowFeatures.locationBarVisible = false;
+    windowFeatures.scrollbarsVisible = false;
+    windowFeatures.resizable = false;
     
     // Tread lightly in this code -- it was specifically designed to mimic Win IE's parsing behavior.
     int keyBegin, keyEnd;
@@ -1474,29 +1475,29 @@ static void parseWindowFeatures(const String& features, WindowArgs& windowArgs)
 
         String keyString(buffer.substring(keyBegin, keyEnd - keyBegin));
         String valueString(buffer.substring(valueBegin, valueEnd - valueBegin));
-        setWindowFeature(keyString, valueString, windowArgs);
+        setWindowFeature(keyString, valueString, windowFeatures);
     }
 }
 
-static void constrainToVisible(const FloatRect& screen, WindowArgs& windowArgs)
+static void constrainToVisible(const FloatRect& screen, WindowFeatures& windowFeatures)
 {
-    windowArgs.x += screen.x();
-    if (windowArgs.x < screen.x() || windowArgs.x >= screen.right())
-        windowArgs.x = screen.x(); // only safe choice until size is determined
+    windowFeatures.x += screen.x();
+    if (windowFeatures.x < screen.x() || windowFeatures.x >= screen.right())
+        windowFeatures.x = screen.x(); // only safe choice until size is determined
     
-    windowArgs.y += screen.y();
-    if (windowArgs.y < screen.y() || windowArgs.y >= screen.bottom())
-        windowArgs.y = screen.y(); // only safe choice until size is determined
+    windowFeatures.y += screen.y();
+    if (windowFeatures.y < screen.y() || windowFeatures.y >= screen.bottom())
+        windowFeatures.y = screen.y(); // only safe choice until size is determined
     
-    if (windowArgs.height > screen.height()) // should actually check workspace
-        windowArgs.height = screen.height();
-    if (windowArgs.height < 100)
-        windowArgs.height = 100;
+    if (windowFeatures.height > screen.height()) // should actually check workspace
+        windowFeatures.height = screen.height();
+    if (windowFeatures.height < 100)
+        windowFeatures.height = 100;
     
-    if (windowArgs.width > screen.width()) // should actually check workspace
-        windowArgs.width = screen.width();
-    if (windowArgs.width < 100)
-        windowArgs.width = 100;
+    if (windowFeatures.width > screen.width()) // should actually check workspace
+        windowFeatures.width = screen.width();
+    if (windowFeatures.width < 100)
+        windowFeatures.width = 100;
 }
 
 JSValue *WindowFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
@@ -1551,10 +1552,10 @@ JSValue *WindowFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const Li
       if (!allowPopUp(exec, window) && (frameName.isEmpty() || !frame->tree()->find(frameName)))
           return jsUndefined();
       
-      WindowArgs windowArgs;
+      WindowFeatures windowFeatures;
       String features = args[2]->isUndefinedOrNull() ? UString() : args[2]->toString(exec);
-      parseWindowFeatures(features, windowArgs);
-      constrainToVisible(screenRect(page), windowArgs);
+      parseWindowFeatures(features, windowFeatures);
+      constrainToVisible(screenRect(page), windowFeatures);
       
       // prepare arguments
       KURL url;
@@ -1591,7 +1592,7 @@ JSValue *WindowFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const Li
       // request window (new or existing if framename is set)
       Frame* newFrame = 0;
       frameRequest.m_request.setReferrer(activePart->referrer());
-      frame->browserExtension()->createNewWindow(frameRequest, windowArgs, newFrame);
+      frame->browserExtension()->createNewWindow(frameRequest, windowFeatures, newFrame);
       if (!newFrame)
           return jsUndefined();
       newFrame->setOpener(frame);
index 8154d0a7b242d0fd307a658d624235765175958c..c21ab3c15f0e8e0898adb799110e30d31225d79f 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef BROWSEREXTENSION_H_
-#define BROWSEREXTENSION_H_
-
-#include "ResourceRequest.h"
+#ifndef BrowserExtension_h
+#define BrowserExtension_h
 
 namespace WebCore {
 
 class Frame;
 class FrameLoadRequest;
-
-struct WindowArgs {
-    float x;
-    bool xSet;
-    float y;
-    bool ySet;
-    float width;
-    bool widthSet;
-    float height;
-    bool heightSet;
-
-    bool menuBarVisible;
-    bool statusBarVisible;
-    bool toolBarVisible;
-    bool locationBarVisible;
-    bool scrollbarsVisible;
-    bool resizable;
-
-    bool fullscreen;
-    bool dialog;
-};
+class KURL;
+struct WindowFeatures;
 
 class BrowserExtension {
 public:
     virtual ~BrowserExtension() { }
 
-    virtual void createNewWindow(const FrameLoadRequest&, const WindowArgs&, Frame*& newFrame) = 0;
+    virtual void createNewWindow(const FrameLoadRequest&, const WindowFeatures&, Frame*& newFrame) = 0;
 
     virtual int getHistoryLength() = 0;
     virtual void goBackOrForward(int distance) = 0;
@@ -72,6 +51,6 @@ protected:
     BrowserExtension() {}
 };
 
-}
+} // namespace WebCore
 
-#endif
+#endif // BrowserExtension_h
diff --git a/WebCore/bridge/WindowFeatures.h b/WebCore/bridge/WindowFeatures.h
new file mode 100644 (file)
index 0000000..aa30074
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2003 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef WindowFeatures_h
+#define WindowFeatures_h
+
+namespace WebCore {
+
+struct WindowFeatures {
+    float x;
+    bool xSet;
+    float y;
+    bool ySet;
+    float width;
+    bool widthSet;
+    float height;
+    bool heightSet;
+
+    bool menuBarVisible;
+    bool statusBarVisible;
+    bool toolBarVisible;
+    bool locationBarVisible;
+    bool scrollbarsVisible;
+    bool resizable;
+
+    bool fullscreen;
+    bool dialog;
+};
+
+} // namespace WebCore
+
+#endif // WindowFeatures_h
index 0ca07b8fba431a7a9b07687c25936590c8db322c..699253b6988bd23eb0d8a91ba0249fb5f920a1ca 100644 (file)
@@ -34,7 +34,7 @@ class BrowserExtensionMac : public BrowserExtension {
 public:
     BrowserExtensionMac(Frame*);
  
-    virtual void createNewWindow(const FrameLoadRequest&, const WindowArgs&, Frame*& newFrame);
+    virtual void createNewWindow(const FrameLoadRequest&, const WindowFeatures&, Frame*& newFrame);
 
     virtual int getHistoryLength();
     virtual void goBackOrForward(int distance);
index f2071614cf4bb8825d65733835060fba71619f1c..d6e59045f366b26cf8b13299ba61cc6f2021732c 100644 (file)
 #import "FrameMac.h"
 #import "FrameLoadRequest.h"
 #import "FrameTree.h"
+#import "KURL.h"
 #import "Page.h"
 #import "Screen.h"
 #import "WebCoreFrameBridge.h"
 #import "WebCorePageBridge.h"
+#import "WindowFeatures.h"
 
 namespace WebCore {
 
@@ -44,12 +46,12 @@ BrowserExtensionMac::BrowserExtensionMac(Frame *frame)
 }
 
 void BrowserExtensionMac::createNewWindow(const FrameLoadRequest& request, 
-                                          const WindowArgs& winArgs, 
+                                          const WindowFeatures& windowFeatures, 
                                           Frame*& newFrame)
 { 
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
 
-    ASSERT(!winArgs.dialog || request.m_frameName.isEmpty());
+    ASSERT(!windowFeatures.dialog || request.m_frameName.isEmpty());
 
     newFrame = NULL;
     
@@ -86,7 +88,7 @@ void BrowserExtensionMac::createNewWindow(const FrameLoadRequest& request,
     }
     
     WebCorePageBridge *pageBridge;
-    if (winArgs.dialog)
+    if (windowFeatures.dialog)
         pageBridge = [m_frame->bridge() createModalDialogWithURL:url.getNSURL()];
     else
         pageBridge = [m_frame->bridge() createWindowWithURL:url.getNSURL()];
@@ -99,24 +101,24 @@ void BrowserExtensionMac::createNewWindow(const FrameLoadRequest& request,
     
     newFrame = [frameBridge impl];
     
-    [frameBridge setToolbarsVisible:winArgs.toolBarVisible || winArgs.locationBarVisible];
-    [frameBridge setStatusbarVisible:winArgs.statusBarVisible];
-    [frameBridge setScrollbarsVisible:winArgs.scrollbarsVisible];
-    [frameBridge setWindowIsResizable:winArgs.resizable];
+    [frameBridge setToolbarsVisible:windowFeatures.toolBarVisible || windowFeatures.locationBarVisible];
+    [frameBridge setStatusbarVisible:windowFeatures.statusBarVisible];
+    [frameBridge setScrollbarsVisible:windowFeatures.scrollbarsVisible];
+    [frameBridge setWindowIsResizable:windowFeatures.resizable];
     
     NSRect windowRect = [pageBridge impl]->windowRect();
-    if (winArgs.xSet)
-      windowRect.origin.x = winArgs.x;
-    if (winArgs.ySet)
-      windowRect.origin.y = winArgs.y;
+    if (windowFeatures.xSet)
+      windowRect.origin.x = windowFeatures.x;
+    if (windowFeatures.ySet)
+      windowRect.origin.y = windowFeatures.y;
     
     // 'width' and 'height' specify the dimensions of the WebView, but we can only resize the window, 
     // so we compute a WebView delta and apply it to the window.
     NSRect webViewRect = [[pageBridge outerView] frame];
-    if (winArgs.widthSet)
-      windowRect.size.width += winArgs.width - webViewRect.size.width;
-    if (winArgs.heightSet)
-      windowRect.size.height += winArgs.height - webViewRect.size.height;
+    if (windowFeatures.widthSet)
+      windowRect.size.width += windowFeatures.width - webViewRect.size.width;
+    if (windowFeatures.heightSet)
+      windowRect.size.height += windowFeatures.height - webViewRect.size.height;
     
     [pageBridge impl]->setWindowRect(windowRect);