Changeset 65337 in webkit
- Timestamp:
- Aug 13, 2010 1:11:17 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 6 added
- 18 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r65305 r65337 1 2010-08-13 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Jon Honeycutt. 4 5 Add form submission listener to WebKit2 6 Part of <rdar://problem/8255932> 7 https://bugs.webkit.org/show_bug.cgi?id=43947 8 9 * Shared/APIObject.h: 10 Add TypeFormSubmissionListener APIType. 11 12 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: 13 Add WillSubmitForm message kind. 14 15 * UIProcess/API/C/WKAPICast.h: 16 Add new mappings for WKFormSubmissionListenerRef -> WebFormSubmissionListener 17 18 * UIProcess/API/C/WKBase.h: 19 Add OpaqueWKFormSubmissionListener and rename the other opaque types to match. 20 21 * UIProcess/API/C/WKFormSubmissionListener.cpp: Added. 22 (WKFormSubmissionListenerGetTypeID): 23 (WKFormSubmissionListenerContinue): 24 (WKFormSubmissionListenerRetain): 25 (WKFormSubmissionListenerRelease): 26 * UIProcess/API/C/WKFormSubmissionListener.h: Added. 27 Add C wrapper for WebFormSubmissionListener. 28 29 * UIProcess/API/C/WKPage.cpp: 30 (WKPageSetPageFormClient): 31 * UIProcess/API/C/WKPage.h: 32 Add WKPageFormClient with willSubmitForm callback. Additional callbacks will be added as 33 needed. 34 35 * UIProcess/API/C/WebKit2.h: 36 Add include for WKFormSubmissionListener.h 37 38 * UIProcess/WebFormClient.cpp: Added. 39 (WebKit::WebFormClient::WebFormClient): 40 (WebKit::WebFormClient::initialize): 41 (WebKit::WebFormClient::willSubmitForm): 42 * UIProcess/WebFormClient.h: Added. 43 Add client for form related delagations. 44 45 * UIProcess/WebFormSubmissionListenerProxy.cpp: Added. 46 (WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy): 47 (WebKit::WebFormSubmissionListenerProxy::continueSubmission): 48 * UIProcess/WebFormSubmissionListenerProxy.h: Added. 49 (WebKit::WebFormSubmissionListenerProxy::create): 50 (WebKit::WebFormSubmissionListenerProxy::type): 51 * UIProcess/WebFrameListenerProxy.cpp: Copied from UIProcess/WebFramePolicyListenerProxy.cpp. 52 Add new type of listener for form submissions. It inherits from the new base class 53 for listeners, WebFrameListenerProxy. 54 55 (WebKit::WebFrameListenerProxy::WebFrameListenerProxy): 56 (WebKit::WebFrameListenerProxy::~WebFrameListenerProxy): 57 (WebKit::WebFrameListenerProxy::invalidate): 58 (WebKit::WebFrameListenerProxy::receivedPolicyDecision): 59 * UIProcess/WebFrameListenerProxy.h: Copied from UIProcess/WebFramePolicyListenerProxy.h. 60 Move logic that would have to be shared between WebFramePolicyListenerProxy and 61 WebFormSubmissionListenerProxy into shared base class. 62 63 * UIProcess/WebFramePolicyListenerProxy.cpp: 64 (WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy): 65 * UIProcess/WebFramePolicyListenerProxy.h: 66 (WebKit::WebFramePolicyListenerProxy::create): 67 (WebKit::WebFramePolicyListenerProxy::type): 68 Move to inheriting from WebFrameListenerProxy. 69 70 * UIProcess/WebFrameProxy.cpp: 71 (WebKit::WebFrameProxy::disconnect): 72 (WebKit::WebFrameProxy::receivedPolicyDecision): 73 (WebKit::WebFrameProxy::setUpPolicyListenerProxy): 74 (WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy): 75 * UIProcess/WebFrameProxy.h: 76 Change listener functions to act on WebFrameListenerProxys and add setUpFormSubmissionListenerProxy. 77 78 * UIProcess/WebPageProxy.cpp: 79 (WebKit::WebPageProxy::initializeFormClient): 80 (WebKit::WebPageProxy::didReceiveMessage): 81 (WebKit::WebPageProxy::willSubmitForm): 82 * UIProcess/WebPageProxy.h: 83 Plumb through willSubmitForm call as we do with the other listeners. 84 85 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 86 (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): 87 Ditto. 88 89 * WebKit2.xcodeproj/project.pbxproj: Add new files. 90 * win/WebKit2.vcproj: Add new files. 91 * win/WebKit2Generated.make: Ditto. 92 1 93 2010-08-13 Gavin Barraclough <barraclough@apple.com> 2 94 -
trunk/WebKit2/Shared/APIObject.h
r64788 r65337 45 45 TypeBackForwardListItem, 46 46 TypeContext, 47 TypeFormSubmissionListener, 47 48 TypeFrame, 48 49 TypeFramePolicyListener, -
trunk/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
r64918 r65337 65 65 SetToolTip, 66 66 TakeFocus, 67 WillSubmitForm, 67 68 68 69 BackForwardAddItem, -
trunk/WebKit2/UIProcess/API/C/WKAPICast.h
r65021 r65337 45 45 class WebData; 46 46 class WebError; 47 class WebFormSubmissionListenerProxy; 47 48 class WebFramePolicyListenerProxy; 48 49 class WebFrameProxy; … … 60 61 template<> struct APITypeInfo<WKContextRef> { typedef WebContext* ImplType; }; 61 62 template<> struct APITypeInfo<WKDataRef> { typedef WebData* ImplType; }; 63 template<> struct APITypeInfo<WKFormSubmissionListenerRef> { typedef WebFormSubmissionListenerProxy* ImplType; }; 62 64 template<> struct APITypeInfo<WKFramePolicyListenerRef> { typedef WebFramePolicyListenerProxy* ImplType; }; 63 65 template<> struct APITypeInfo<WKFrameRef> { typedef WebFrameProxy* ImplType; }; … … 78 80 template<> struct ImplTypeInfo<WebData*> { typedef WKDataRef APIType; }; 79 81 template<> struct ImplTypeInfo<WebError*> { typedef WKErrorRef APIType; }; 82 template<> struct ImplTypeInfo<WebFormSubmissionListenerProxy*> { typedef WKFormSubmissionListenerRef APIType; }; 80 83 template<> struct ImplTypeInfo<WebFramePolicyListenerProxy*> { typedef WKFramePolicyListenerRef APIType; }; 81 84 template<> struct ImplTypeInfo<WebFrameProxy*> { typedef WKFrameRef APIType; }; -
trunk/WebKit2/UIProcess/API/C/WKBase.h
r64688 r65337 36 36 typedef void* WKTypeRef; 37 37 38 typedef struct OpaqueWKArray Ref* WKArrayRef;39 typedef struct OpaqueWKBackForwardList ItemRef* WKBackForwardListItemRef;40 typedef struct OpaqueWKBackForwardList Ref* WKBackForwardListRef;38 typedef struct OpaqueWKArray* WKArrayRef; 39 typedef struct OpaqueWKBackForwardList* WKBackForwardListRef; 40 typedef struct OpaqueWKBackForwardListItem* WKBackForwardListItemRef; 41 41 typedef struct OpaqueWKContext* WKContextRef; 42 42 typedef struct OpaqueWKData* WKDataRef; 43 43 typedef struct OpaqueWKError* WKErrorRef; 44 typedef struct OpaqueWKFormSubmissionListener* WKFormSubmissionListenerRef; 44 45 typedef struct OpaqueWKFrame* WKFrameRef; 45 46 typedef struct OpaqueWKFramePolicyListener* WKFramePolicyListenerRef; 46 typedef struct OpaqueWKNavigationData Ref* WKNavigationDataRef;47 typedef struct OpaqueWKNavigationData* WKNavigationDataRef; 47 48 typedef struct OpaqueWKPage* WKPageRef; 48 49 typedef struct OpaqueWKPageNamespace* WKPageNamespaceRef; 49 typedef struct OpaqueWKPreferences Ref* WKPreferencesRef;50 typedef struct OpaqueWKString Ref* WKStringRef;51 typedef struct OpaqueWKURL Ref* WKURLRef;50 typedef struct OpaqueWKPreferences* WKPreferencesRef; 51 typedef struct OpaqueWKString* WKStringRef; 52 typedef struct OpaqueWKURL* WKURLRef; 52 53 53 54 #undef WK_EXPORT -
trunk/WebKit2/UIProcess/API/C/WKPage.cpp
r64688 r65337 156 156 } 157 157 158 void WKPageSetPageFormClient(WKPageRef pageRef, const WKPageFormClient* wkClient) 159 { 160 if (wkClient && !wkClient->version) 161 toWK(pageRef)->initializeFormClient(wkClient); 162 } 163 158 164 void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClient * wkClient) 159 165 { -
trunk/WebKit2/UIProcess/API/C/WKPage.h
r64688 r65337 114 114 typedef struct WKPagePolicyClient WKPagePolicyClient; 115 115 116 // Form Client. 117 typedef void (*WKPageWillSubmitFormCallback)(WKPageRef page, WKFrameRef frame, WKFrameRef sourceFrame, WKFormSubmissionListenerRef listener, const void* clientInfo); 118 119 struct WKPageFormClient { 120 int version; 121 const void * clientInfo; 122 WKPageWillSubmitFormCallback willSubmitForm; 123 }; 124 typedef struct WKPageFormClient WKPageFormClient; 125 116 126 // UI Client 117 127 typedef WKPageRef (*WKPageCreateNewPageCallback)(WKPageRef page, const void *clientInfo); … … 166 176 WK_EXPORT void WKPageSetPageLoaderClient(WKPageRef page, const WKPageLoaderClient* client); 167 177 WK_EXPORT void WKPageSetPagePolicyClient(WKPageRef page, const WKPagePolicyClient* client); 178 WK_EXPORT void WKPageSetPageFormClient(WKPageRef page, const WKPageFormClient* client); 168 179 WK_EXPORT void WKPageSetPageUIClient(WKPageRef page, const WKPageUIClient* client); 169 180 -
trunk/WebKit2/UIProcess/API/C/WebKit2.h
r64380 r65337 29 29 #include <WebKit2/WKBase.h> 30 30 #include <WebKit2/WKType.h> 31 31 32 #include <WebKit2/WKBackForwardList.h> 32 33 #include <WebKit2/WKBackForwardListItem.h> 33 34 #include <WebKit2/WKContext.h> 35 #include <WebKit2/WKFormSubmissionListener.h> 34 36 #include <WebKit2/WKFrame.h> 35 37 #include <WebKit2/WKFramePolicyListener.h> -
trunk/WebKit2/UIProcess/WebFrameListenerProxy.cpp
r65287 r65337 24 24 */ 25 25 26 #include "WebFrame PolicyListenerProxy.h"26 #include "WebFrameListenerProxy.h" 27 27 28 28 #include "WebFrameProxy.h" … … 30 30 namespace WebKit { 31 31 32 WebFrame PolicyListenerProxy::WebFramePolicyListenerProxy(WebFrameProxy* frame, uint64_t listenerID)32 WebFrameListenerProxy::WebFrameListenerProxy(WebFrameProxy* frame, uint64_t listenerID) 33 33 : m_frame(frame) 34 34 , m_listenerID(listenerID) … … 36 36 } 37 37 38 WebFrame PolicyListenerProxy::~WebFramePolicyListenerProxy()38 WebFrameListenerProxy::~WebFrameListenerProxy() 39 39 { 40 40 } 41 41 42 void WebFrame PolicyListenerProxy::invalidate()42 void WebFrameListenerProxy::invalidate() 43 43 { 44 44 m_frame = 0; 45 45 } 46 46 47 void WebFrame PolicyListenerProxy::receivedPolicyDecision(WebCore::PolicyAction action)47 void WebFrameListenerProxy::receivedPolicyDecision(WebCore::PolicyAction action) 48 48 { 49 49 if (!m_frame) … … 54 54 } 55 55 56 void WebFramePolicyListenerProxy::use()57 {58 receivedPolicyDecision(WebCore::PolicyUse);59 }60 61 void WebFramePolicyListenerProxy::download()62 {63 receivedPolicyDecision(WebCore::PolicyDownload);64 }65 66 void WebFramePolicyListenerProxy::ignore()67 {68 receivedPolicyDecision(WebCore::PolicyIgnore);69 }70 71 56 } // namespace WebKit -
trunk/WebKit2/UIProcess/WebFrameListenerProxy.h
r65287 r65337 24 24 */ 25 25 26 #ifndef WebFrame PolicyListenerProxy_h27 #define WebFrame PolicyListenerProxy_h26 #ifndef WebFrameListenerProxy_h 27 #define WebFrameListenerProxy_h 28 28 29 29 #include "APIObject.h" … … 36 36 class WebFrameProxy; 37 37 38 class WebFrame PolicyListenerProxy : public APIObject {38 class WebFrameListenerProxy : public APIObject { 39 39 public: 40 static const Type APIType = TypeFramePolicyListener; 41 42 static PassRefPtr<WebFramePolicyListenerProxy> create(WebFrameProxy* frame, uint64_t listenerID) 43 { 44 return adoptRef(new WebFramePolicyListenerProxy(frame, listenerID)); 45 } 46 ~WebFramePolicyListenerProxy(); 47 48 void use(); 49 void download(); 50 void ignore(); 40 virtual ~WebFrameListenerProxy(); 51 41 52 42 void invalidate(); 53 54 43 uint64_t listenerID() const { return m_listenerID; } 55 44 56 private: 57 WebFramePolicyListenerProxy(WebFrameProxy*, uint64_t listenerID); 58 59 virtual Type type() const { return APIType; } 45 protected: 46 WebFrameListenerProxy(WebFrameProxy*, uint64_t listenerID); 60 47 61 48 void receivedPolicyDecision(WebCore::PolicyAction); 62 49 50 private: 63 51 RefPtr<WebFrameProxy> m_frame; 64 52 uint64_t m_listenerID; … … 67 55 } // namespace WebKit 68 56 69 #endif // WebFrame PolicyListenerProxy_h57 #endif // WebFrameListenerProxy_h -
trunk/WebKit2/UIProcess/WebFramePolicyListenerProxy.cpp
r57310 r65337 31 31 32 32 WebFramePolicyListenerProxy::WebFramePolicyListenerProxy(WebFrameProxy* frame, uint64_t listenerID) 33 : m_frame(frame) 34 , m_listenerID(listenerID) 33 : WebFrameListenerProxy(frame, listenerID) 35 34 { 36 }37 38 WebFramePolicyListenerProxy::~WebFramePolicyListenerProxy()39 {40 }41 42 void WebFramePolicyListenerProxy::invalidate()43 {44 m_frame = 0;45 }46 47 void WebFramePolicyListenerProxy::receivedPolicyDecision(WebCore::PolicyAction action)48 {49 if (!m_frame)50 return;51 52 m_frame->receivedPolicyDecision(action, m_listenerID);53 m_frame = 0;54 35 } 55 36 -
trunk/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
r64386 r65337 27 27 #define WebFramePolicyListenerProxy_h 28 28 29 #include "APIObject.h" 30 #include <WebCore/FrameLoaderTypes.h> 31 #include <wtf/PassRefPtr.h> 32 #include <wtf/RefPtr.h> 29 #include "WebFrameListenerProxy.h" 33 30 34 31 namespace WebKit { 35 32 36 class WebFrameProxy; 37 38 class WebFramePolicyListenerProxy : public APIObject { 33 class WebFramePolicyListenerProxy : public WebFrameListenerProxy { 39 34 public: 40 35 static const Type APIType = TypeFramePolicyListener; … … 44 39 return adoptRef(new WebFramePolicyListenerProxy(frame, listenerID)); 45 40 } 46 ~WebFramePolicyListenerProxy();47 41 48 42 void use(); … … 50 44 void ignore(); 51 45 52 void invalidate();53 54 uint64_t listenerID() const { return m_listenerID; }55 56 46 private: 57 47 WebFramePolicyListenerProxy(WebFrameProxy*, uint64_t listenerID); 58 48 59 49 virtual Type type() const { return APIType; } 60 61 void receivedPolicyDecision(WebCore::PolicyAction);62 63 RefPtr<WebFrameProxy> m_frame;64 uint64_t m_listenerID;65 50 }; 66 51 -
trunk/WebKit2/UIProcess/WebFrameProxy.cpp
r65021 r65337 27 27 28 28 #include "WebPageProxy.h" 29 #include "WebFormSubmissionListenerProxy.h" 30 #include "WebFramePolicyListenerProxy.h" 29 31 #include <WebCore/PlatformString.h> 30 32 … … 47 49 { 48 50 m_page = 0; 49 if (m_ policyListener) {50 m_ policyListener->invalidate();51 m_ policyListener = 0;51 if (m_activeListener) { 52 m_activeListener->invalidate(); 53 m_activeListener = 0; 52 54 } 53 55 } … … 91 93 return; 92 94 93 ASSERT(m_ policyListener);94 ASSERT(m_ policyListener->listenerID() == listenerID);95 ASSERT(m_activeListener); 96 ASSERT(m_activeListener->listenerID() == listenerID); 95 97 m_page->receivedPolicyDecision(action, this, listenerID); 96 98 } … … 98 100 WebFramePolicyListenerProxy* WebFrameProxy::setUpPolicyListenerProxy(uint64_t listenerID) 99 101 { 100 if (m_policyListener) 101 m_policyListener->invalidate(); 102 m_policyListener = WebFramePolicyListenerProxy::create(this, listenerID); 103 return m_policyListener.get(); 102 if (m_activeListener) 103 m_activeListener->invalidate(); 104 m_activeListener = WebFramePolicyListenerProxy::create(this, listenerID); 105 return static_cast<WebFramePolicyListenerProxy*>(m_activeListener.get()); 106 } 107 108 WebFormSubmissionListenerProxy* WebFrameProxy::setUpFormSubmissionListenerProxy(uint64_t listenerID) 109 { 110 if (m_activeListener) 111 m_activeListener->invalidate(); 112 m_activeListener = WebFormSubmissionListenerProxy::create(this, listenerID); 113 return static_cast<WebFormSubmissionListenerProxy*>(m_activeListener.get()); 104 114 } 105 115 -
trunk/WebKit2/UIProcess/WebFrameProxy.h
r65021 r65337 28 28 29 29 #include "APIObject.h" 30 #include "WebFrame PolicyListenerProxy.h"30 #include "WebFrameListenerProxy.h" 31 31 #include <WebCore/FrameLoaderTypes.h> 32 32 #include <WebCore/PlatformString.h> … … 43 43 44 44 class WebPageProxy; 45 class WebFramePolicyListenerProxy; 46 class WebFormSubmissionListenerProxy; 45 47 46 48 class WebFrameProxy : public APIObject { … … 78 80 void receivedPolicyDecision(WebCore::PolicyAction, uint64_t listenerID); 79 81 WebFramePolicyListenerProxy* setUpPolicyListenerProxy(uint64_t listenerID); 82 WebFormSubmissionListenerProxy* setUpFormSubmissionListenerProxy(uint64_t listenerID); 80 83 81 84 private: … … 88 91 WTF::String m_url; 89 92 WTF::String m_provisionalURL; 90 RefPtr<WebFrame PolicyListenerProxy> m_policyListener;93 RefPtr<WebFrameListenerProxy> m_activeListener; 91 94 uint64_t m_frameID; 92 95 }; -
trunk/WebKit2/UIProcess/WebPageProxy.cpp
r64918 r65337 35 35 #include "WebData.h" 36 36 #include "WebEvent.h" 37 #include "WebFormSubmissionListenerProxy.h" 38 #include "WebFramePolicyListenerProxy.h" 37 39 #include "WebPageMessageKinds.h" 38 40 #include "WebPageNamespace.h" … … 119 121 } 120 122 123 void WebPageProxy::initializeFormClient(const WKPageFormClient* formClient) 124 { 125 m_formClient.initialize(formClient); 126 } 127 121 128 void WebPageProxy::initializeUIClient(const WKPageUIClient* client) 122 129 { … … 534 541 break; 535 542 } 543 case WebPageProxyMessage::WillSubmitForm: { 544 uint64_t frameID; 545 uint64_t sourceFrameID; 546 uint64_t listenerID; 547 if (!arguments->decode(CoreIPC::Out(frameID, sourceFrameID, listenerID))) 548 return; 549 willSubmitForm(webFrame(frameID), webFrame(sourceFrameID), listenerID); 550 break; 551 } 552 536 553 case WebPageProxyMessage::DidRunJavaScriptInMainFrame: { 537 554 String resultString; … … 818 835 } 819 836 837 // FormClient 838 839 void WebPageProxy::willSubmitForm(WebFrameProxy* frame, WebFrameProxy* sourceFrame, uint64_t listenerID) 840 { 841 RefPtr<WebFormSubmissionListenerProxy> listener = frame->setUpFormSubmissionListenerProxy(listenerID); 842 if (!m_formClient.willSubmitForm(this, frame, sourceFrame, listener.get())) 843 listener->continueSubmission(); 844 } 845 820 846 // UIClient 847 821 848 PassRefPtr<WebPageProxy> WebPageProxy::createNewPage() 822 849 { -
trunk/WebKit2/UIProcess/WebPageProxy.h
r65021 r65337 32 32 #include "WKBase.h" 33 33 #include "WebEvent.h" 34 #include "WebFormClient.h" 34 35 #include "WebFrameProxy.h" 35 36 #include "WebHistoryClient.h" … … 95 96 void initializeLoaderClient(const WKPageLoaderClient*); 96 97 void initializePolicyClient(const WKPagePolicyClient*); 98 void initializeFormClient(const WKPageFormClient*); 97 99 void initializeUIClient(const WKPageUIClient*); 98 100 … … 191 193 void decidePolicyForMIMEType(WebFrameProxy*, const WTF::String& MIMEType, const WTF::String& url, uint64_t listenerID); 192 194 195 void willSubmitForm(WebFrameProxy* frame, WebFrameProxy* frameSource, uint64_t listenerID); 196 193 197 PassRefPtr<WebPageProxy> createNewPage(); 194 198 void showPage(); … … 216 220 WebLoaderClient m_loaderClient; 217 221 WebPolicyClient m_policyClient; 222 WebFormClient m_formClient; 218 223 WebUIClient m_uiClient; 219 224 -
trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj
r64888 r65337 277 277 BCDE059B11CDA8AE00E41AF1 /* WebContextInjectedBundleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDE059911CDA8AE00E41AF1 /* WebContextInjectedBundleClient.h */; }; 278 278 BCDE059C11CDA8AE00E41AF1 /* WebContextInjectedBundleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCDE059A11CDA8AE00E41AF1 /* WebContextInjectedBundleClient.cpp */; }; 279 BCE469531214E6CB000B98EB /* WebFormClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE4694F1214E6CB000B98EB /* WebFormClient.cpp */; }; 280 BCE469541214E6CB000B98EB /* WebFormClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE469501214E6CB000B98EB /* WebFormClient.h */; }; 281 BCE469551214E6CB000B98EB /* WebFormSubmissionListenerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE469511214E6CB000B98EB /* WebFormSubmissionListenerProxy.cpp */; }; 282 BCE469561214E6CB000B98EB /* WebFormSubmissionListenerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE469521214E6CB000B98EB /* WebFormSubmissionListenerProxy.h */; }; 283 BCE469591214EDF4000B98EB /* WKFormSubmissionListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE469571214EDF4000B98EB /* WKFormSubmissionListener.cpp */; }; 284 BCE4695A1214EDF4000B98EB /* WKFormSubmissionListener.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE469581214EDF4000B98EB /* WKFormSubmissionListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; 285 BCE469771214F27B000B98EB /* WebFrameListenerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE469761214F27B000B98EB /* WebFrameListenerProxy.h */; }; 286 BCE469791214F2B4000B98EB /* WebFrameListenerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE469781214F2B4000B98EB /* WebFrameListenerProxy.cpp */; }; 279 287 BCEE966C112FAF57006BCC24 /* Attachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEE966A112FAF57006BCC24 /* Attachment.cpp */; }; 280 288 BCEE966D112FAF57006BCC24 /* Attachment.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEE966B112FAF57006BCC24 /* Attachment.h */; }; … … 608 616 BCDE059911CDA8AE00E41AF1 /* WebContextInjectedBundleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextInjectedBundleClient.h; sourceTree = "<group>"; }; 609 617 BCDE059A11CDA8AE00E41AF1 /* WebContextInjectedBundleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebContextInjectedBundleClient.cpp; sourceTree = "<group>"; }; 618 BCE4694F1214E6CB000B98EB /* WebFormClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebFormClient.cpp; sourceTree = "<group>"; }; 619 BCE469501214E6CB000B98EB /* WebFormClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFormClient.h; sourceTree = "<group>"; }; 620 BCE469511214E6CB000B98EB /* WebFormSubmissionListenerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebFormSubmissionListenerProxy.cpp; sourceTree = "<group>"; }; 621 BCE469521214E6CB000B98EB /* WebFormSubmissionListenerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFormSubmissionListenerProxy.h; sourceTree = "<group>"; }; 622 BCE469571214EDF4000B98EB /* WKFormSubmissionListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKFormSubmissionListener.cpp; sourceTree = "<group>"; }; 623 BCE469581214EDF4000B98EB /* WKFormSubmissionListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFormSubmissionListener.h; sourceTree = "<group>"; }; 624 BCE469761214F27B000B98EB /* WebFrameListenerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameListenerProxy.h; sourceTree = "<group>"; }; 625 BCE469781214F2B4000B98EB /* WebFrameListenerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebFrameListenerProxy.cpp; sourceTree = "<group>"; }; 610 626 BCEE966A112FAF57006BCC24 /* Attachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Attachment.cpp; sourceTree = "<group>"; }; 611 627 BCEE966B112FAF57006BCC24 /* Attachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attachment.h; sourceTree = "<group>"; }; … … 990 1006 BCDE059A11CDA8AE00E41AF1 /* WebContextInjectedBundleClient.cpp */, 991 1007 BCDE059911CDA8AE00E41AF1 /* WebContextInjectedBundleClient.h */, 1008 BCE4694F1214E6CB000B98EB /* WebFormClient.cpp */, 1009 BCE469501214E6CB000B98EB /* WebFormClient.h */, 1010 BCE469511214E6CB000B98EB /* WebFormSubmissionListenerProxy.cpp */, 1011 BCE469521214E6CB000B98EB /* WebFormSubmissionListenerProxy.h */, 992 1012 BCB9F69F1123A84B00A137E0 /* WebFramePolicyListenerProxy.cpp */, 993 1013 BCB9F69E1123A84B00A137E0 /* WebFramePolicyListenerProxy.h */, 1014 BCE469781214F2B4000B98EB /* WebFrameListenerProxy.cpp */, 1015 BCE469761214F27B000B98EB /* WebFrameListenerProxy.h */, 994 1016 BC111B0A112F5E4F00337BAB /* WebFrameProxy.cpp */, 995 1017 BC9B389F10F538BE00443A15 /* WebFrameProxy.h */, … … 1048 1070 516A4A58120A1AB500C05B7F /* WKError.cpp */, 1049 1071 516A4A57120A1AB500C05B7F /* WKError.h */, 1072 BCE469571214EDF4000B98EB /* WKFormSubmissionListener.cpp */, 1073 BCE469581214EDF4000B98EB /* WKFormSubmissionListener.h */, 1050 1074 BCD01398110FA420003B8A67 /* WKFrame.cpp */, 1051 1075 BCD01397110FA420003B8A67 /* WKFrame.h */, … … 1449 1473 BC14DF9F120B635F00826C0C /* WKBundleScriptWorld.h in Headers */, 1450 1474 BC14E10A120B905E00826C0C /* InjectedBundlePageFormClient.h in Headers */, 1475 BCE469541214E6CB000B98EB /* WebFormClient.h in Headers */, 1476 BCE469561214E6CB000B98EB /* WebFormSubmissionListenerProxy.h in Headers */, 1477 BCE4695A1214EDF4000B98EB /* WKFormSubmissionListener.h in Headers */, 1478 BCE469771214F27B000B98EB /* WebFrameListenerProxy.h in Headers */, 1451 1479 ); 1452 1480 runOnlyForDeploymentPostprocessing = 0; … … 1665 1693 BC14DF9E120B635F00826C0C /* WKBundleScriptWorld.cpp in Sources */, 1666 1694 BC14E109120B905E00826C0C /* InjectedBundlePageFormClient.cpp in Sources */, 1695 BCE469531214E6CB000B98EB /* WebFormClient.cpp in Sources */, 1696 BCE469551214E6CB000B98EB /* WebFormSubmissionListenerProxy.cpp in Sources */, 1697 BCE469591214EDF4000B98EB /* WKFormSubmissionListener.cpp in Sources */, 1698 BCE469791214F2B4000B98EB /* WebFrameListenerProxy.cpp in Sources */, 1667 1699 ); 1668 1700 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r64927 r65337 466 466 } 467 467 468 void WebFrameLoaderClient::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<FormState>) 469 { 470 notImplemented(); 471 472 Frame* coreFrame = m_frame->coreFrame(); 473 (coreFrame->loader()->policyChecker()->*function)(PolicyUse); 468 void WebFrameLoaderClient::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<FormState> formState) 469 { 470 WebPage* webPage = m_frame->page(); 471 if (!webPage) 472 return; 473 474 // FIXME: Pass more of the form state. 475 476 uint64_t listenerID = m_frame->setUpPolicyListener(function); 477 478 WebFrame* sourceFrame = static_cast<WebFrameLoaderClient*>(formState->sourceFrame()->loader()->client())->webFrame(); 479 480 WebProcess::shared().connection()->send(WebPageProxyMessage::WillSubmitForm, webPage->pageID(), 481 CoreIPC::In(m_frame->frameID(), sourceFrame->frameID(), listenerID)); 474 482 } 475 483 -
trunk/WebKit2/win/WebKit2.vcproj
r65270 r65337 1050 1050 </File> 1051 1051 <File 1052 RelativePath="..\UIProcess\WebFormClient.cpp" 1053 > 1054 </File> 1055 <File 1056 RelativePath="..\UIProcess\WebFormClient.h" 1057 > 1058 </File> 1059 <File 1060 RelativePath="..\UIProcess\WebFormSubmissionListenerProxy.cpp" 1061 > 1062 </File> 1063 <File 1064 RelativePath="..\UIProcess\WebFormSubmissionListenerProxy.h" 1065 > 1066 </File> 1067 <File 1052 1068 RelativePath="..\UIProcess\WebFramePolicyListenerProxy.cpp" 1053 1069 > … … 1055 1071 <File 1056 1072 RelativePath="..\UIProcess\WebFramePolicyListenerProxy.h" 1073 > 1074 </File> 1075 <File 1076 RelativePath="..\UIProcess\WebFrameListenerProxy.cpp" 1077 > 1078 </File> 1079 <File 1080 RelativePath="..\UIProcess\WebFrameListenerProxy.h" 1057 1081 > 1058 1082 </File> … … 1221 1245 <File 1222 1246 RelativePath="..\UIProcess\API\C\WKError.h" 1247 > 1248 </File> 1249 <File 1250 RelativePath="..\UIProcess\API\C\WKFormSubmissionListener.cpp" 1251 > 1252 </File> 1253 <File 1254 RelativePath="..\UIProcess\API\C\WKFormSubmissionListener.h" 1223 1255 > 1224 1256 </File> -
trunk/WebKit2/win/WebKit2Generated.make
r65270 r65337 11 11 xcopy /y /d "..\UIProcess\API\C\WKData.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 12 12 xcopy /y /d "..\UIProcess\API\C\WKError.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 13 xcopy /y /d "..\UIProcess\API\C\WKFormSubmissionListener.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 13 14 xcopy /y /d "..\UIProcess\API\C\WKFrame.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 14 15 xcopy /y /d "..\UIProcess\API\C\WKFramePolicyListener.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
Note: See TracChangeset
for help on using the changeset viewer.