WebCore:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 19:31:41 +0000 (19:31 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 19:31:41 +0000 (19:31 +0000)
        Reviewed by Brady.

        - got "action dictionary" code out of FrameLoader,
          replacing with a class called NavigationAction

        * loader/DocumentLoader.h: Changed m_triggeringAction to a NavigationAction.
        * loader/mac/DocumentLoaderMac.mm:
        (WebCore::DocumentLoader::triggeringAction): Ditto.
        (WebCore::DocumentLoader::setTriggeringAction): Ditto.

        * loader/FrameLoader.h: Changed action parameters to NavigationAction.

        * loader/FrameLoaderClient.h: Changed action parameters to NavigationAction.
        Removed elementForEvent.
        * loader/mac/FrameLoaderMac.mm:
        (WebCore::FrameLoader::load): Ditto.
        (WebCore::FrameLoader::reload): Ditto.
        (WebCore::FrameLoader::checkNewWindowPolicy): Ditto.
        (WebCore::FrameLoader::checkNavigationPolicy): Ditto.
        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Ditto.
        (WebCore::FrameLoader::post): Ditto.

        * loader/NavigationAction.h: Added.
        * loader/NavigationAction.cpp: Added.
        * loader/mac/NavigationActionMac.mm: Added.

        * loader/mac/MainResourceLoaderMac.mm: Fixed copyright.

        * WebCore.xcodeproj/project.pbxproj: Updated for new files.
        * WebCore.exp: Updated.

WebKit:

        Reviewed by Brady.

        - got "action dictionary" code out of FrameLoader,
          replacing with a class called NavigationAction

        * WebCoreSupport/WebFrameLoaderClient.h: Changed parameter types to NavigationAction.
        Made elementForEvent non-virtual. Added actionDictionary function.
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Changed parameter type,
        and used actionDictionary to make the action dictionary.
        (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
        (WebFrameLoaderClient::actionDictionary): Added. Code that was originally in WebCore
        that creates the action dictionary (from a NavigationAction).

        * WebView/WebFrame.mm: (-[WebFrame _loadItem:withLoadType:]): Use NavigationAction
        instead of a dictionary for the action parameters.

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

17 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/loader/DocumentLoader.h
WebCore/loader/FrameLoader.h
WebCore/loader/FrameLoaderClient.h
WebCore/loader/NavigationAction.cpp [new file with mode: 0644]
WebCore/loader/NavigationAction.h [new file with mode: 0644]
WebCore/loader/mac/DocumentLoaderMac.mm
WebCore/loader/mac/FrameLoaderMac.mm
WebCore/loader/mac/MainResourceLoaderMac.mm
WebCore/loader/mac/NavigationActionMac.mm [new file with mode: 0644]
WebKit/ChangeLog
WebKit/WebCoreSupport/WebFrameLoaderClient.h
WebKit/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebFrame.mm

index 06fd3e87f410604b434ebaa166842d66c00dfd18..4eb129e2b64d7e8940895bb58ac157dcc8a8e9b8 100644 (file)
@@ -1,3 +1,36 @@
+2006-10-31  Darin Adler  <darin@apple.com>
+
+        Reviewed by Brady.
+
+        - got "action dictionary" code out of FrameLoader,
+          replacing with a class called NavigationAction
+
+        * loader/DocumentLoader.h: Changed m_triggeringAction to a NavigationAction.
+        * loader/mac/DocumentLoaderMac.mm:
+        (WebCore::DocumentLoader::triggeringAction): Ditto.
+        (WebCore::DocumentLoader::setTriggeringAction): Ditto.
+
+        * loader/FrameLoader.h: Changed action parameters to NavigationAction.
+
+        * loader/FrameLoaderClient.h: Changed action parameters to NavigationAction.
+        Removed elementForEvent.
+        * loader/mac/FrameLoaderMac.mm:
+        (WebCore::FrameLoader::load): Ditto.
+        (WebCore::FrameLoader::reload): Ditto.
+        (WebCore::FrameLoader::checkNewWindowPolicy): Ditto.
+        (WebCore::FrameLoader::checkNavigationPolicy): Ditto.
+        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Ditto.
+        (WebCore::FrameLoader::post): Ditto.
+
+        * loader/NavigationAction.h: Added.
+        * loader/NavigationAction.cpp: Added.
+        * loader/mac/NavigationActionMac.mm: Added.
+
+        * loader/mac/MainResourceLoaderMac.mm: Fixed copyright.
+
+        * WebCore.xcodeproj/project.pbxproj: Updated for new files.
+        * WebCore.exp: Updated.
+
 2006-10-31  Steve Falkenburg  <sfalken@apple.com>
 
         Reviewed by Adam.
index bc6e4e244b0dc8edb7e1a1ce0e557567a68f75ed..69a72d8a6ecb96931519198f612cdb1e28a1e982 100644 (file)
@@ -136,8 +136,6 @@ __ZN7WebCore11FrameLoader11stopLoadingEv
 __ZN7WebCore11FrameLoader12shouldReloadEP5NSURLS2_
 __ZN7WebCore11FrameLoader14detachChildrenEv
 __ZN7WebCore11FrameLoader16detachFromParentEv
-__ZN7WebCore11FrameLoader17actionInformationENS_13FrameLoadTypeEbP7NSEventP5NSURL
-__ZN7WebCore11FrameLoader17actionInformationENS_14NavigationTypeEP7NSEventP5NSURL
 __ZN7WebCore11FrameLoader19requestFromDelegateEP12NSURLRequestRP11objc_objectRP7NSError
 __ZN7WebCore11FrameLoader21addPlugInStreamLoaderEPNS_14ResourceLoaderE
 __ZN7WebCore11FrameLoader21commitProvisionalLoadEP12NSDictionary
@@ -148,7 +146,7 @@ __ZN7WebCore11FrameLoader24removePlugInStreamLoaderEPNS_14ResourceLoaderE
 __ZN7WebCore11FrameLoader25provisionalDocumentLoaderEv
 __ZN7WebCore11FrameLoader29sendRemainingDelegateMessagesEP11objc_objectP13NSURLResponsejP7NSError
 __ZN7WebCore11FrameLoader4loadEP12NSURLRequest
-__ZN7WebCore11FrameLoader4loadEP12NSURLRequestP12NSDictionaryNS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE
+__ZN7WebCore11FrameLoader4loadEP12NSURLRequestRKNS_16NavigationActionENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE
 __ZN7WebCore11FrameLoader4loadEP12NSURLRequestRKNS_6StringE
 __ZN7WebCore11FrameLoader4loadEP5NSURLRKNS_6StringENS_13FrameLoadTypeES5_P7NSEventPNS_7ElementERKN3WTF7HashMapIS3_S3_NSB_7StrHashIS3_EENSB_10HashTraitsIS3_EESG_EE
 __ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE
@@ -176,6 +174,7 @@ __ZN7WebCore14DocumentLoaderD2Ev
 __ZN7WebCore14RenderListItem17markerStringValueEv
 __ZN7WebCore14ResourceLoader14cancelledErrorEv
 __ZN7WebCore14ResourceLoader20inConnectionCallbackEv
+__ZN7WebCore16DeprecatedStringC1ERKS0_
 __ZN7WebCore16DeprecatedString6appendENS_14DeprecatedCharE
 __ZN7WebCore16DeprecatedString6appendERKS0_
 __ZN7WebCore16DeprecatedString6appendEc
@@ -183,6 +182,10 @@ __ZN7WebCore16DeprecatedString7replaceENS_14DeprecatedCharES1_
 __ZN7WebCore16DeprecatedStringC1EPKc
 __ZN7WebCore16DeprecatedStringC1Ev
 __ZN7WebCore16DeprecatedStringD1Ev
+__ZN7WebCore16DeprecatedStringaSERKS0_
+__ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_13FrameLoadTypeEb
+__ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_14NavigationTypeE
+__ZN7WebCore16NavigationActionC1Ev
 __ZN7WebCore17FrameLoaderClientD2Ev
 __ZN7WebCore19SelectionController5clearEv
 __ZN7WebCore19SelectionController9selectAllEv
index 5ddeebfc341e99e88bd7959464f82f2351064c19..77234b52a262d760e3027bdd7cb4723bf4df96a9 100644 (file)
                93B780CA09B3B7FE00690162 /* WidgetClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B780C909B3B7FE00690162 /* WidgetClient.h */; };
                93C841F809CE855C00DFF5E5 /* DOMImplementationFront.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */; };
                93C841FF09CE858300DFF5E5 /* DOMImplementationFront.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */; };
+               93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CCF0260AF6C52900018E89 /* NavigationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               93CCF0580AF6C9FE00018E89 /* NavigationActionMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93CCF0570AF6C9FE00018E89 /* NavigationActionMac.mm */; };
+               93CCF0600AF6CA7600018E89 /* NavigationAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */; };
                93CD4FDE0995F9EA007ECC97 /* AtomicString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93CD4FD70995F9EA007ECC97 /* AtomicString.cpp */; };
                93CD4FDF0995F9EA007ECC97 /* AtomicString.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CD4FD80995F9EA007ECC97 /* AtomicString.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93CD4FE00995F9EA007ECC97 /* AtomicStringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CD4FD90995F9EA007ECC97 /* AtomicStringImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93CA4C9F09DF93FA00DF8677 /* quirks.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = quirks.css; sourceTree = "<group>"; };
                93CA4CA209DF93FA00DF8677 /* svg.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = svg.css; sourceTree = "<group>"; };
                93CA4CA309DF93FA00DF8677 /* tokenizer.flex */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tokenizer.flex; sourceTree = "<group>"; };
+               93CCF0260AF6C52900018E89 /* NavigationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationAction.h; sourceTree = "<group>"; };
+               93CCF0570AF6C9FE00018E89 /* NavigationActionMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NavigationActionMac.mm; sourceTree = "<group>"; };
+               93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigationAction.cpp; sourceTree = "<group>"; };
                93CD4FD70995F9EA007ECC97 /* AtomicString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicString.cpp; sourceTree = "<group>"; };
                93CD4FD80995F9EA007ECC97 /* AtomicString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtomicString.h; sourceTree = "<group>"; };
                93CD4FD90995F9EA007ECC97 /* AtomicStringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtomicStringImpl.h; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                654F68870AF1B7C50065BDD6 /* CachedResourceMac.mm */,
+                               656D371F0ADBA5DE00A4554D /* DocumentLoaderMac.mm */,
+                               656D37200ADBA5DE00A4554D /* FormDataStream.h */,
+                               656D37210ADBA5DE00A4554D /* FormDataStream.m */,
                                656D37250ADBA5DE00A4554D /* FrameLoaderMac.mm */,
                                51A1D2C50AB69120000D732C /* IconLoaderMac.mm */,
                                93A1EAA70A563508006960A0 /* ImageDocumentMac.h */,
                                656D371B0ADBA5DE00A4554D /* LoaderNSURLExtras.m */,
                                6563A9A50ADF4094000ED2CD /* LoaderNSURLRequestExtras.h */,
                                6563A9A60ADF4094000ED2CD /* LoaderNSURLRequestExtras.m */,
-                               656D371C0ADBA5DE00A4554D /* WebDataProtocol.h */,
-                               656D371D0ADBA5DE00A4554D /* WebDataProtocol.mm */,
-                               656D371F0ADBA5DE00A4554D /* DocumentLoaderMac.mm */,
-                               656D37200ADBA5DE00A4554D /* FormDataStream.h */,
-                               656D37210ADBA5DE00A4554D /* FormDataStream.m */,
-                               656D37280ADBA5DE00A4554D /* ResourceLoaderMac.mm */,
                                656D372A0ADBA5DE00A4554D /* MainResourceLoaderMac.mm */,
+                               93CCF0570AF6C9FE00018E89 /* NavigationActionMac.mm */,
                                656D372C0ADBA5DE00A4554D /* NetscapePlugInStreamLoaderMac.mm */,
-                               656D372D0ADBA5DE00A4554D /* WebPlugInStreamLoaderDelegate.h */,
+                               656D37280ADBA5DE00A4554D /* ResourceLoaderMac.mm */,
                                656D37310ADBA5DE00A4554D /* SubresourceLoaderMac.mm */,
+                               656D371C0ADBA5DE00A4554D /* WebDataProtocol.h */,
+                               656D371D0ADBA5DE00A4554D /* WebDataProtocol.mm */,
+                               656D372D0ADBA5DE00A4554D /* WebPlugInStreamLoaderDelegate.h */,
                        );
                        path = mac;
                        sourceTree = "<group>";
                                F587851702DE375901EA4122 /* LoaderFunctions.h */,
                                93E227DC0AF589AD00D48324 /* MainResourceLoader.cpp */,
                                656D37290ADBA5DE00A4554D /* MainResourceLoader.h */,
+                               93CCF0260AF6C52900018E89 /* NavigationAction.h */,
+                               93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */,
                                93E227DD0AF589AD00D48324 /* NetscapePlugInStreamLoader.cpp */,
                                656D372B0ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h */,
                                1AC694C50A3B1676003F5049 /* PluginDocument.cpp */,
                                93E22A730AF5E94C00D48324 /* PageState.h in Headers */,
                                658821660AF4CDF700F01D1F /* ResourceResponse.h in Headers */,
                                6588216B0AF4CE1200F01D1F /* ResourceResponseMac.h in Headers */,
+                               93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */,
                                B2A015A90AF6CD53006BCE0E /* GraphicsContext.h in Headers */,
                                B2A015AB0AF6CD53006BCE0E /* GraphicsTypes.h in Headers */,
                                B2A015B30AF6CD53006BCE0E /* SVGResource.h in Headers */,
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                                93E227E30AF589AD00D48324 /* ResourceLoader.cpp in Sources */,
                                93E227E40AF589AD00D48324 /* SubresourceLoader.cpp in Sources */,
                                93E22A6F0AF5E94100D48324 /* PageState.cpp in Sources */,
+                               93CCF0580AF6C9FE00018E89 /* NavigationActionMac.mm in Sources */,
+                               93CCF0600AF6CA7600018E89 /* NavigationAction.cpp in Sources */,
                                B2A015A80AF6CD53006BCE0E /* GraphicsContext.cpp in Sources */,
                                B2A015AA0AF6CD53006BCE0E /* GraphicsTypes.cpp in Sources */,
                                B2A015AC0AF6CD53006BCE0E /* SVGResourceClipperCg.mm in Sources */,
index 9a934994420c96cbb20699dcc5807c7e4d888adc..a3da2b0a72fc894aa4402351688abd73e889661e 100644 (file)
@@ -26,6 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "NavigationAction.h"
 #include "Shared.h"
 #include "PlatformString.h"
 #include <wtf/Vector.h>
@@ -101,8 +102,8 @@ namespace WebCore {
         String overrideEncoding() const;
         void addResponse(NSURLResponse *);
         const ResponseVector& responses() const;
-        NSDictionary *triggeringAction() const;
-        void setTriggeringAction(NSDictionary *);
+        const NavigationAction& triggeringAction() const;
+        void setTriggeringAction(const NavigationAction&);
         void setOverrideEncoding(const String&);
         void setLastCheckedRequest(NSURLRequest *request);
         NSURLRequest *lastCheckedRequest() const;
@@ -159,7 +160,7 @@ namespace WebCore {
 
         // The action that triggered loading - we keep this around for the
         // benefit of the various policy handlers.
-        RetainPtr<NSDictionary> m_triggeringAction;
+        NavigationAction m_triggeringAction;
 
         // The last request that we checked click policy for - kept around
         // so we can avoid asking again needlessly.
index 8ce7dd7dc6b3ee140b6c6b6291e1ccd98c1f010a..e838fbde05391155ddf2aa0ab9be3e70129cdc2a 100644 (file)
@@ -80,6 +80,7 @@ namespace WebCore {
     class FrameLoaderClient;
     class KURL;
     class MainResourceLoader;
+    class NavigationAction;
     class PageState;
     class ResourceLoader;
     class ResourceRequest;
@@ -151,7 +152,7 @@ namespace WebCore {
             NSEvent *, Element* form, const HashMap<String, String>&);
         void load(NSURLRequest *);
         void load(NSURLRequest *, const String& frameName);
-        void load(NSURLRequest *, NSDictionary *triggeringAaction, FrameLoadType, PassRefPtr<FormState>);
+        void load(NSURLRequest *, const NavigationAction&, FrameLoadType, PassRefPtr<FormState>);
 #endif
         void load(DocumentLoader*);
         void load(DocumentLoader*, FrameLoadType, PassRefPtr<FormState>);
@@ -295,8 +296,6 @@ namespace WebCore {
 
 #if PLATFORM(MAC)
         void addExtraFieldsToRequest(NSMutableURLRequest *, bool isMainResource, bool alwaysFromRequest);
-        NSDictionary *actionInformation(NavigationType, NSEvent *, NSURL *);
-        NSDictionary *actionInformation(FrameLoadType loadType, bool isFormSubmission, NSEvent *, NSURL *);
 #endif
 
         void setClient(FrameLoaderClient*);
@@ -327,7 +326,8 @@ namespace WebCore {
 #if PLATFORM(MAC)
         void checkNavigationPolicy(NSURLRequest *, DocumentLoader*, PassRefPtr<FormState>,
             NavigationPolicyDecisionFunction, void* argument);
-        void checkNewWindowPolicy(NSDictionary *, NSURLRequest *, PassRefPtr<FormState>, const String& frameName);
+        void checkNewWindowPolicy(const NavigationAction&,
+            NSURLRequest *, PassRefPtr<FormState>, const String& frameName);
 #endif
 
         void continueAfterNavigationPolicy(PolicyAction);
index 233fa5c96687fc53a78eefa85417bc7a08ee34ed..5b0d28d81899c8bd0da3c1769848101eb97b5981 100644 (file)
@@ -43,6 +43,7 @@ namespace WebCore {
     class FormState;
     class Frame;
     class FrameLoader;
+    class NavigationAction;
     class String;
     class ResourceLoader;
 
@@ -128,8 +129,8 @@ namespace WebCore {
         virtual void dispatchShow() = 0;
 
         virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String& MIMEType, NSURLRequest *) = 0;
-        virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, NSDictionary *action, NSURLRequest *, const String& frameName) = 0;
-        virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction, NSDictionary *action, NSURLRequest *) = 0;
+        virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, const NavigationAction&, NSURLRequest *, const String& frameName) = 0;
+        virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction, const NavigationAction&, NSURLRequest *) = 0;
         virtual void cancelPolicyCheck() = 0;
 
         virtual void dispatchUnableToImplementPolicy(NSError *) = 0;
@@ -184,8 +185,6 @@ namespace WebCore {
         virtual bool representationExistsForURLScheme(const String& URLScheme) const = 0;
         virtual String generatedMIMETypeForURLScheme(const String& URLScheme) const = 0;
 
-        virtual NSDictionary *elementForEvent(NSEvent *) const = 0;
-
         virtual void frameLoadCompleted() = 0;
         virtual void restoreScrollPositionAndViewState() = 0;
         virtual void provisionalLoadStarted() = 0;
diff --git a/WebCore/loader/NavigationAction.cpp b/WebCore/loader/NavigationAction.cpp
new file mode 100644 (file)
index 0000000..b711425
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2006 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. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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.
+ */
+
+#include "config.h"
+#include "NavigationAction.h"
+
+namespace WebCore {
+
+}
diff --git a/WebCore/loader/NavigationAction.h b/WebCore/loader/NavigationAction.h
new file mode 100644 (file)
index 0000000..9134f10
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2006 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. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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 NavigationAction_h
+#define NavigationAction_h
+
+#include "FrameLoaderTypes.h"
+#include "KURL.h"
+
+#if PLATFORM(MAC)
+#include "RetainPtr.h"
+#ifdef __OBJC__
+@class NSEvent;
+#else
+class NSEvent;
+#endif
+#endif
+
+namespace WebCore {
+
+    class NavigationAction {
+    public:
+        NavigationAction();
+        NavigationAction(const KURL&, NavigationType);
+        NavigationAction(const KURL&, FrameLoadType, bool isFormSubmission);
+#if PLATFORM(MAC)
+        // FIXME: Change from NSEvent to DOM event.
+        NavigationAction(const KURL&, NavigationType, NSEvent *);
+        NavigationAction(const KURL&, FrameLoadType, bool isFormSubmission, NSEvent *);
+#endif
+
+        bool isEmpty() const { return m_URL.isEmpty(); }
+
+#if PLATFORM(MAC)
+        KURL URL() const { return m_URL; }
+        NavigationType type() const { return m_type; }
+        NSEvent *event() const { return m_event.get(); }
+#endif
+
+    private:
+        KURL m_URL;
+        NavigationType m_type;
+#if PLATFORM(MAC)
+        RetainPtr<NSEvent> m_event;
+#endif
+    };
+
+}
+
+#endif
index a32f1c9e68b32ce92aacdaf83191eb3fc38e25df..236dbba68b48b626b45ca0be9ce673b2697f08a4 100644 (file)
@@ -515,12 +515,12 @@ NSURLRequest *DocumentLoader::lastCheckedRequest() const
     return [[m_lastCheckedRequest.get() retain] autorelease];
 }
 
-NSDictionary *DocumentLoader::triggeringAction() const
+const NavigationAction& DocumentLoader::triggeringAction() const
 {
-    return [[m_triggeringAction.get() retain] autorelease];
+    return m_triggeringAction;
 }
 
-void DocumentLoader::setTriggeringAction(NSDictionary *action)
+void DocumentLoader::setTriggeringAction(const NavigationAction& action)
 {
     m_triggeringAction = action;
 }
index b31648d4e6251fbfb40c8bd4177f947d1d958a3e..ebe3232e6559c95725114d258ea2799a521a0c9a 100644 (file)
@@ -47,6 +47,7 @@
 #import "LoaderNSURLExtras.h"
 #import "LoaderNSURLRequestExtras.h"
 #import "MainResourceLoader.h"
+#import "NavigationAction.h"
 #import "Page.h"
 #import "Plugin.h"
 #import "ResourceResponse.h"
 #import <kjs/JSLock.h>
 #import <wtf/Assertions.h>
 
-using KJS::JSLock;
-using KJS::PausedTimeouts;
-using KJS::SavedBuiltins;
-using KJS::SavedProperties;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -197,7 +193,8 @@ void FrameLoader::load(NSURL *URL, const String& referrer, FrameLoadType newLoad
 
     ASSERT(newLoadType != FrameLoadTypeSame);
 
-    NSDictionary *action = actionInformation(newLoadType, isFormSubmission, event, URL);
+    NavigationAction action(URL, newLoadType, isFormSubmission, event);
+
     RefPtr<FormState> formState;
     if (form && !values.isEmpty())
         formState = FormState::create(form, values, m_frame);
@@ -276,11 +273,11 @@ void FrameLoader::load(NSURLRequest *request, const String& frameName)
         return;
     }
 
-    checkNewWindowPolicy(actionInformation(NavigationTypeOther, nil, [request URL]),
+    checkNewWindowPolicy(NavigationAction([request URL], NavigationTypeOther),
         request, 0, frameName);
 }
 
-void FrameLoader::load(NSURLRequest *request, NSDictionary *action, FrameLoadType type, PassRefPtr<FormState> formState)
+void FrameLoader::load(NSURLRequest *request, const NavigationAction& action, FrameLoadType type, PassRefPtr<FormState> formState)
 {
     RefPtr<DocumentLoader> loader = m_client->createDocumentLoader(request);
     setPolicyDocumentLoader(loader.get());
@@ -1229,9 +1226,9 @@ void FrameLoader::reload()
 
     [request setCachePolicy:NSURLRequestReloadIgnoringCacheData];
 
-    // If we're about to rePOST, set up action so the app can warn the user
+    // If we're about to re-post, set up action so the application can warn the user.
     if (isCaseInsensitiveEqual([request HTTPMethod], @"POST"))
-        loader->setTriggeringAction(actionInformation(NavigationTypeFormResubmitted, nil, [request URL]));
+        loader->setTriggeringAction(NavigationAction([request URL], NavigationTypeFormResubmitted));
 
     loader->setOverrideEncoding(m_documentLoader->overrideEncoding());
     
@@ -1329,7 +1326,7 @@ void FrameLoader::stopPolicyCheck()
     check.call();
 }
 
-void FrameLoader::checkNewWindowPolicy(NSDictionary *action, NSURLRequest *request,
+void FrameLoader::checkNewWindowPolicy(const NavigationAction& action, NSURLRequest *request,
     PassRefPtr<FormState> formState, const String& frameName)
 {
     m_policyCheck.set(request, formState, frameName,
@@ -1361,9 +1358,9 @@ void FrameLoader::continueAfterNewWindowPolicy(PolicyAction policy)
 void FrameLoader::checkNavigationPolicy(NSURLRequest *request, DocumentLoader* loader,
     PassRefPtr<FormState> formState, NavigationPolicyDecisionFunction function, void* argument)
 {
-    NSDictionary *action = loader->triggeringAction();
-    if (!action) {
-        action = actionInformation(NavigationTypeOther, nil, [request URL]);
+    NavigationAction action = loader->triggeringAction();
+    if (action.isEmpty()) {
+        action = NavigationAction([request URL], NavigationTypeOther);
         loader->setTriggeringAction(action);
     }
         
@@ -1705,7 +1702,7 @@ void FrameLoader::continueLoadAfterNewWindowPolicy(NSURLRequest *request,
     mainFrame->tree()->setName(frameName);
     mainFrame->loader()->client()->dispatchShow();
     mainFrame->setOpener(frame.get());
-    mainFrame->loader()->load(request, nil, FrameLoadTypeStandard, formState);
+    mainFrame->loader()->load(request, NavigationAction(), FrameLoadTypeStandard, formState);
 }
 
 void FrameLoader::sendRemainingDelegateMessages(id identifier, NSURLResponse *response, unsigned length, NSError *error)
@@ -1765,7 +1762,7 @@ void FrameLoader::post(NSURL *URL, const String& referrer, const String& frameNa
     setHTTPBody(request, formData);
     [request setValue:contentType forHTTPHeaderField:@"Content-Type"];
 
-    NSDictionary *action = actionInformation(FrameLoadTypeStandard, true, event, URL);
+    NavigationAction action(URL, FrameLoadTypeStandard, true, event);
     RefPtr<FormState> formState;
     if (form && !formValues.isEmpty())
         formState = FormState::create(form, formValues, m_frame);
@@ -1827,45 +1824,6 @@ void FrameLoader::addExtraFieldsToRequest(NSMutableURLRequest *request, bool mai
         [request setValue:@"text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" forHTTPHeaderField:@"Accept"];
 }
 
-NSDictionary *FrameLoader::actionInformation(FrameLoadType type, bool isFormSubmission, NSEvent *event, NSURL *originalURL)
-{
-    NavigationType navType;
-    if (isFormSubmission)
-        navType = NavigationTypeFormSubmitted;
-    else if (event)
-        navType = NavigationTypeLinkClicked;
-    else if (type == FrameLoadTypeReload)
-        navType = NavigationTypeReload;
-    else if (isBackForwardLoadType(type))
-        navType = NavigationTypeBackForward;
-    else
-        navType = NavigationTypeOther;
-    return actionInformation(navType, event, originalURL);
-}
-NSDictionary *FrameLoader::actionInformation(NavigationType navigationType, NSEvent *event, NSURL *originalURL)
-{
-    NSString *ActionNavigationTypeKey = @"WebActionNavigationTypeKey";
-    NSString *ActionElementKey = @"WebActionElementKey";
-    NSString *ActionButtonKey = @"WebActionButtonKey"; 
-    NSString *ActionModifierFlagsKey = @"WebActionModifierFlagsKey";
-    NSString *ActionOriginalURLKey = @"WebActionOriginalURLKey";
-    NSDictionary *elementInfo = m_client->elementForEvent(event);
-    if (elementInfo)
-        return [NSDictionary dictionaryWithObjectsAndKeys:
-            [NSNumber numberWithInt:navigationType], ActionNavigationTypeKey,
-            elementInfo, ActionElementKey,
-            [NSNumber numberWithInt:[event buttonNumber]], ActionButtonKey,
-            [NSNumber numberWithInt:[event modifierFlags]], ActionModifierFlagsKey,
-            originalURL, ActionOriginalURLKey,
-            nil];
-    return [NSDictionary dictionaryWithObjectsAndKeys:
-        [NSNumber numberWithInt:navigationType], ActionNavigationTypeKey,
-        [NSNumber numberWithInt:[event modifierFlags]], ActionModifierFlagsKey,
-        originalURL, ActionOriginalURLKey,
-        nil];
-}
-
 // Called every time a resource is completely loaded, or an error is received.
 void FrameLoader::checkLoadComplete()
 {
index 3cb4f9a7adafcfd53138552ebbdae537c5fbbf63..028f6d4c9bed896033fcaa904e2b9c6b232c6cc9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2006 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
diff --git a/WebCore/loader/mac/NavigationActionMac.mm b/WebCore/loader/mac/NavigationActionMac.mm
new file mode 100644 (file)
index 0000000..a4545dc
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2006 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. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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.
+ */
+
+#include "config.h"
+#include "NavigationAction.h"
+
+#include "FrameLoader.h"
+
+namespace WebCore {
+
+static NavigationType navigationType(FrameLoadType frameLoadType, bool isFormSubmission,
+    NSEvent *event)
+{
+    if (isFormSubmission)
+        return NavigationTypeFormSubmitted;
+    if (event)
+        return NavigationTypeLinkClicked;
+    if (frameLoadType == FrameLoadTypeReload)
+        return NavigationTypeReload;
+    if (isBackForwardLoadType(frameLoadType))
+        return NavigationTypeBackForward;
+    return NavigationTypeOther;
+}
+
+NavigationAction::NavigationAction()
+    : m_type(NavigationTypeOther)
+{
+}
+
+NavigationAction::NavigationAction(const KURL& URL, NavigationType type)
+    : m_URL(URL)
+    , m_type(type)
+{
+}
+
+NavigationAction::NavigationAction(const KURL& URL, FrameLoadType frameLoadType,
+        bool isFormSubmission)
+    : m_URL(URL)
+    , m_type(navigationType(frameLoadType, isFormSubmission, 0))
+{
+}
+
+NavigationAction::NavigationAction(const KURL& URL, NavigationType type, NSEvent *event)
+    : m_URL(URL)
+    , m_type(type)
+    , m_event(event)
+{
+}
+
+NavigationAction::NavigationAction(const KURL& URL, FrameLoadType frameLoadType,
+        bool isFormSubmission, NSEvent *event)
+    : m_URL(URL)
+    , m_type(navigationType(frameLoadType, isFormSubmission, event))
+    , m_event(event)
+{
+}
+
+}
index d66372e6d0896fff98b6da38ae07a507a65dd7e3..cf7181f03d7db3ad7b8df84fa9bd60e5d66740b2 100644 (file)
@@ -1,3 +1,22 @@
+2006-10-31  Darin Adler  <darin@apple.com>
+
+        Reviewed by Brady.
+
+        - got "action dictionary" code out of FrameLoader,
+          replacing with a class called NavigationAction
+
+        * WebCoreSupport/WebFrameLoaderClient.h: Changed parameter types to NavigationAction.
+        Made elementForEvent non-virtual. Added actionDictionary function.
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Changed parameter type,
+        and used actionDictionary to make the action dictionary.
+        (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
+        (WebFrameLoaderClient::actionDictionary): Added. Code that was originally in WebCore
+        that creates the action dictionary (from a NavigationAction).
+
+        * WebView/WebFrame.mm: (-[WebFrame _loadItem:withLoadType:]): Use NavigationAction
+        instead of a dictionary for the action parameters.
+
 2006-10-31  Marvin Decker  <marv.decker@gmail.com>
 
         Reviewed by Maciej.
index d0a1bd98d684fd3f9745db14ccb4ff7a9c32052b..fcc4895f61c430ea956328c62be02a9696d14275 100644 (file)
@@ -127,9 +127,9 @@ private:
     virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction,
         const WebCore::String& MIMEType, NSURLRequest *);
     virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction,
-        NSDictionary *action, NSURLRequest *, const WebCore::String& frameName);
+        const WebCore::NavigationAction&, NSURLRequest *, const WebCore::String& frameName);
     virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction,
-        NSDictionary *action, NSURLRequest *);
+        const WebCore::NavigationAction&, NSURLRequest *);
     virtual void cancelPolicyCheck();
 
     virtual void dispatchUnableToImplementPolicy(NSError *);
@@ -185,8 +185,6 @@ private:
     virtual bool representationExistsForURLScheme(const WebCore::String& URLScheme) const;
     virtual WebCore::String generatedMIMETypeForURLScheme(const WebCore::String& URLScheme) const;
 
-    virtual NSDictionary *elementForEvent(NSEvent *) const;
-
     virtual void frameLoadCompleted();
     virtual void restoreScrollPositionAndViewState();
     virtual void provisionalLoadStarted();
@@ -204,6 +202,9 @@ private:
 
     WebFramePolicyListener *setUpPolicyListener(WebCore::FramePolicyFunction);
 
+    NSDictionary *actionDictionary(const WebCore::NavigationAction&) const;
+    NSDictionary *elementForEvent(NSEvent *) const;
+
     bool createPageCache(WebHistoryItem *);
 
     WebCore::RetainPtr<WebFrame> m_webFrame;
index 37adc42b53fb788556ab6623028d6e4217a2828b..37814a1716b53e98d105205e4e7bed38bf8abbfa 100644 (file)
@@ -652,22 +652,22 @@ void WebFrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction f
 }
 
 void WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function,
-    NSDictionary *action, NSURLRequest *request, const String& frameName)
+    const NavigationAction& action, NSURLRequest *request, const String& frameName)
 {
     WebView *webView = getWebView(m_webFrame.get());
     [[webView _policyDelegateForwarder] webView:webView
-            decidePolicyForNewWindowAction:action
+            decidePolicyForNewWindowAction:actionDictionary(action)
                                    request:request
                               newFrameName:frameName
                           decisionListener:setUpPolicyListener(function)];
 }
 
 void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function,
-    NSDictionary *action, NSURLRequest *request)
+    const NavigationAction& action, NSURLRequest *request)
 {
     WebView *webView = getWebView(m_webFrame.get());
     [[webView _policyDelegateForwarder] webView:webView
-                decidePolicyForNavigationAction:action
+                decidePolicyForNavigationAction:actionDictionary(action)
                                         request:request
                                           frame:m_webFrame.get()
                                decisionListener:setUpPolicyListener(function)];
@@ -1184,6 +1184,23 @@ String WebFrameLoaderClient::userAgent(NSURL *URL)
     return [getWebView(m_webFrame.get()) userAgentForURL:URL];
 }
 
+NSDictionary *WebFrameLoaderClient::actionDictionary(const NavigationAction& action) const
+{
+    if (NSDictionary *elementInfo = elementForEvent(action.event()))
+        return [NSDictionary dictionaryWithObjectsAndKeys:
+            [NSNumber numberWithInt:action.type()], WebActionNavigationTypeKey,
+            elementInfo, WebActionElementKey,
+            [NSNumber numberWithInt:[action.event() buttonNumber]], WebActionButtonKey,
+            [NSNumber numberWithInt:[action.event() modifierFlags]], WebActionModifierFlagsKey,
+            action.URL().getNSURL(), WebActionOriginalURLKey,
+            nil];
+    return [NSDictionary dictionaryWithObjectsAndKeys:
+        [NSNumber numberWithInt:action.type()], WebActionNavigationTypeKey,
+        [NSNumber numberWithInt:[action.event() modifierFlags]], WebActionModifierFlagsKey,
+        action.URL().getNSURL(), WebActionOriginalURLKey,
+        nil];
+}
+
 @implementation WebFramePolicyListener
 
 - (id)initWithWebCoreFrame:(Frame*)frame
index b0022b686c15413f8a92059f44e9bdb60bd539d6..89019b386e996050bafb8a273277fbe23ed70099 100644 (file)
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                        mainGroup = 0867D691FE84028FC02AAC07 /* WebKit */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
+                       projectRoot = "";
+                       shouldCheckCompatibility = 1;
                        targets = (
                                9398100A0824BF01008DF038 /* WebKit */,
                        );
index 0c24b50f6ccfb5a5dc9e6e5886196f067edaebf9..33693e4327ed11fa946f0628229c3770562b455f 100644 (file)
@@ -482,7 +482,7 @@ static inline WebView *getWebView(WebFrame *webFrame)
             [self _frameLoader]->addExtraFieldsToRequest(request, true, (formData != nil));
 
             // If this was a repost that failed the page cache, we might try to repost the form.
-            NSDictionary *action;
+            NavigationAction action;
             if (formData) {
                 [request setHTTPMethod:@"POST"];
                 [request _web_setHTTPReferrer:[item formReferrer]];
@@ -502,10 +502,10 @@ static inline WebView *getWebView(WebFrame *webFrame)
                 if (synchResponse == nil) { 
                     // Not in the NSURL cache
                     [request setCachePolicy:NSURLRequestReloadIgnoringCacheData];
-                    action = [self _frameLoader]->actionInformation(NavigationTypeFormResubmitted, nil, itemURL);
+                    action = NavigationAction(itemURL, NavigationTypeFormResubmitted);
                 } else
                     // We can use the cache, don't use navType=resubmit
-                    action = [self _frameLoader]->actionInformation(loadType, false, nil, itemURL);
+                    action = NavigationAction(itemURL, loadType, false);
             } else {
                 switch (loadType) {
                     case FrameLoadTypeReload:
@@ -528,7 +528,7 @@ static inline WebView *getWebView(WebFrame *webFrame)
                         ASSERT_NOT_REACHED();
                 }
 
-                action = [self _frameLoader]->actionInformation(loadType, false, nil, itemOriginalURL);
+                action = NavigationAction(itemOriginalURL, loadType, false);
             }
 
             [self _frameLoader]->load(request, action, loadType, 0);