Changeset 234009 in webkit
- Timestamp:
- Jul 19, 2018, 4:11:11 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/CMakeLists.txt
r233310 r234009 336 336 UIProcess/WebFormClient.cpp 337 337 UIProcess/WebFormSubmissionListenerProxy.cpp 338 UIProcess/WebFrameListenerProxy.cpp339 338 UIProcess/WebFramePolicyListenerProxy.cpp 340 339 UIProcess/WebFrameProxy.cpp -
trunk/Source/WebKit/ChangeLog
r233992 r234009 1 2018-07-19 Alex Christensen <achristensen@webkit.org> 2 3 Move WebFrameListenerProxy to WebFramePolicyListenerProxy, its only subclass 4 https://bugs.webkit.org/show_bug.cgi?id=187825 5 6 Reviewed by Brady Eidson. 7 8 * CMakeLists.txt: 9 * UIProcess/API/C/WKPage.cpp: 10 * UIProcess/API/Cocoa/WKBrowsingContextController.mm: 11 * UIProcess/Automation/WebAutomationSession.cpp: 12 * UIProcess/Cocoa/WebViewImpl.mm: 13 * UIProcess/RemoteWebInspectorProxy.cpp: 14 * UIProcess/WebFormSubmissionListenerProxy.h: 15 (WebKit::WebFormSubmissionListenerProxy::create): 16 (WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy): 17 * UIProcess/WebFrameListenerProxy.cpp: Removed. 18 * UIProcess/WebFrameListenerProxy.h: Removed. 19 * UIProcess/WebFramePolicyListenerProxy.cpp: 20 (WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy): 21 (WebKit::WebFramePolicyListenerProxy::receivedPolicyDecision): 22 (WebKit::WebFramePolicyListenerProxy::changeWebsiteDataStore): 23 (WebKit::WebFramePolicyListenerProxy::invalidate): 24 (WebKit::WebFramePolicyListenerProxy::isMainFrame const): 25 (WebKit::WebFramePolicyListenerProxy::setNavigation): 26 * UIProcess/WebFramePolicyListenerProxy.h: 27 (WebKit::WebFramePolicyListenerProxy::listenerID const): 28 (WebKit::WebFramePolicyListenerProxy::operator new): Deleted. 29 * UIProcess/WebFrameProxy.cpp: 30 (WebKit::WebFrameProxy::activePolicyListenerProxy): 31 * UIProcess/WebFrameProxy.h: 32 * UIProcess/WebInspectorProxy.cpp: 33 * UIProcess/WebProcessPool.cpp: 34 * UIProcess/ios/ViewGestureControllerIOS.mm: 35 * UIProcess/mac/ViewGestureControllerMac.mm: 36 * UIProcess/mac/WKInspectorViewController.mm: 37 * WebKit.xcodeproj/project.pbxproj: 38 1 39 2018-07-19 Jon Lee <jonlee@apple.com> 2 40 -
trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp
r232808 r234009 39 39 #include "APIHitTestResult.h" 40 40 #include "APILoaderClient.h" 41 #include "APINavigation.h" 41 42 #include "APINavigationAction.h" 42 43 #include "APINavigationClient.h" -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm
r232520 r234009 30 30 31 31 #import "APIData.h" 32 #import "APINavigation.h" 32 33 #import "ObjCObjectGraph.h" 33 34 #import "PageLoadStateObserver.h" -
trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
r232671 r234009 25 25 26 26 #include "APIData.h" 27 #include "APINavigation.h" 27 28 #include "APISerializedScriptValue.h" 28 29 #include "ImageOptions.h" -
trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
r233131 r234009 30 30 #include "APIArray.h" 31 31 #include "APIAutomationSessionClient.h" 32 #include "APINavigation.h" 32 33 #include "APIOpenPanelParameters.h" 33 34 #include "AutomationProtocolObjects.h" -
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
r233926 r234009 30 30 31 31 #import "APILegacyContextHistoryClient.h" 32 #import "APINavigation.h" 32 33 #import "AttributedString.h" 33 34 #import "ColorSpaceData.h" -
trunk/Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp
r224249 r234009 27 27 #include "RemoteWebInspectorProxy.h" 28 28 29 #include "APINavigation.h" 29 30 #include "RemoteWebInspectorProxyMessages.h" 30 31 #include "RemoteWebInspectorUIMessages.h" -
trunk/Source/WebKit/UIProcess/WebFormSubmissionListenerProxy.h
r222583 r234009 26 26 #pragma once 27 27 28 #include "WebFrameListenerProxy.h" 28 #include "APIObject.h" 29 #include <wtf/CompletionHandler.h> 29 30 30 31 namespace WebKit { … … 32 33 class WebFormSubmissionListenerProxy : public API::ObjectImpl<API::Object::Type::FormSubmissionListener> { 33 34 public: 34 static Ref<WebFormSubmissionListenerProxy> create( WTF::Function<void(void)>&& completionHandler)35 static Ref<WebFormSubmissionListenerProxy> create(CompletionHandler<void(void)>&& completionHandler) 35 36 { 36 37 return adoptRef(*new WebFormSubmissionListenerProxy(WTFMove(completionHandler))); … … 40 41 41 42 private: 42 WebFormSubmissionListenerProxy( WTF::Function<void(void)>&& completionHandler)43 WebFormSubmissionListenerProxy(CompletionHandler<void(void)>&& completionHandler) 43 44 : m_completionHandler(WTFMove(completionHandler)) 44 45 { } 45 WTF::Function<void(void)> m_completionHandler;46 CompletionHandler<void(void)> m_completionHandler; 46 47 }; 47 48 -
trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp
r229778 r234009 27 27 #include "WebFramePolicyListenerProxy.h" 28 28 29 #include "APINavigation.h" 29 30 #include "WebFrameProxy.h" 30 31 #include "WebsiteDataStore.h" … … 34 35 35 36 WebFramePolicyListenerProxy::WebFramePolicyListenerProxy(WebFrameProxy* frame, uint64_t listenerID, PolicyListenerType policyType) 36 : WebFrameListenerProxy(frame, listenerID) 37 , m_policyType(policyType) 37 : m_policyType(policyType) 38 , m_frame(frame) 39 , m_listenerID(listenerID) 38 40 { 39 41 } 40 42 43 void WebFramePolicyListenerProxy::receivedPolicyDecision(WebCore::PolicyAction action, std::optional<WebsitePoliciesData>&& data) 44 { 45 if (!m_frame) 46 return; 47 48 m_frame->receivedPolicyDecision(action, m_listenerID, m_navigation.get(), WTFMove(data)); 49 m_frame = nullptr; 50 } 51 52 void WebFramePolicyListenerProxy::changeWebsiteDataStore(WebsiteDataStore& websiteDataStore) 53 { 54 if (!m_frame) 55 return; 56 57 m_frame->changeWebsiteDataStore(websiteDataStore); 58 } 59 60 void WebFramePolicyListenerProxy::invalidate() 61 { 62 m_frame = nullptr; 63 } 64 65 bool WebFramePolicyListenerProxy::isMainFrame() const 66 { 67 if (!m_frame) 68 return false; 69 70 return m_frame->isMainFrame(); 71 } 72 73 void WebFramePolicyListenerProxy::setNavigation(Ref<API::Navigation>&& navigation) 74 { 75 m_navigation = WTFMove(navigation); 76 } 77 41 78 void WebFramePolicyListenerProxy::use(std::optional<WebsitePoliciesData>&& data) 42 79 { -
trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h
r229778 r234009 26 26 #pragma once 27 27 28 #include " WebFrameListenerProxy.h"28 #include "APIObject.h" 29 29 30 30 #if PLATFORM(COCOA) … … 32 32 #endif 33 33 34 #define DELEGATE_REF_COUNTING_TO_COCOA (PLATFORM(COCOA) && WK_API_ENABLED) 34 namespace API { 35 class Navigation; 36 } 37 38 namespace WebCore { 39 enum class PolicyAction; 40 } 35 41 36 42 namespace WebKit { 43 44 class WebsiteDataStore; 45 class WebFrameProxy; 46 struct WebsitePoliciesData; 37 47 38 48 enum class PolicyListenerType { … … 42 52 }; 43 53 44 class WebFramePolicyListenerProxy : public WebFrameListenerProxy{54 class WebFramePolicyListenerProxy : public API::ObjectImpl<API::Object::Type::FramePolicyListener> { 45 55 public: 46 static const Type APIType = Type::FramePolicyListener;47 56 48 57 static Ref<WebFramePolicyListenerProxy> create(WebFrameProxy* frame, uint64_t listenerID, PolicyListenerType policyType) … … 57 66 PolicyListenerType policyListenerType() const { return m_policyType; } 58 67 68 uint64_t listenerID() const { return m_listenerID; } 69 70 void setNavigation(Ref<API::Navigation>&&); 71 void invalidate(); 72 73 void changeWebsiteDataStore(WebsiteDataStore&); 74 bool isMainFrame() const; 75 76 void setApplyPolicyInNewProcessIfPossible(bool applyPolicyInNewProcessIfPossible) { m_applyPolicyInNewProcessIfPossible = applyPolicyInNewProcessIfPossible; } 77 bool applyPolicyInNewProcessIfPossible() const { return m_applyPolicyInNewProcessIfPossible; } 78 59 79 private: 60 80 WebFramePolicyListenerProxy(WebFrameProxy*, uint64_t listenerID, PolicyListenerType); 61 81 62 Type type() const override { return APIType; } 63 64 #if DELEGATE_REF_COUNTING_TO_COCOA 65 void* operator new(size_t size) { return newObject(size, APIType); } 66 #endif 82 void receivedPolicyDecision(WebCore::PolicyAction, std::optional<WebsitePoliciesData>&&); 67 83 68 84 PolicyListenerType m_policyType; 85 RefPtr<WebFrameProxy> m_frame; 86 uint64_t m_listenerID { 0 }; 87 RefPtr<API::Navigation> m_navigation; 88 bool m_applyPolicyInNewProcessIfPossible { false }; 69 89 }; 70 90 71 91 } // namespace WebKit 72 73 #undef DELEGATE_REF_COUNTING_TO_COCOA -
trunk/Source/WebKit/UIProcess/WebFrameProxy.cpp
r229778 r234009 27 27 #include "WebFrameProxy.h" 28 28 29 #include "APINavigation.h" 29 30 #include "WebCertificateInfo.h" 30 31 #include "WebFramePolicyListenerProxy.h" … … 198 199 WebFramePolicyListenerProxy* WebFrameProxy::activePolicyListenerProxy() 199 200 { 200 if (!m_activeListener || m_activeListener->type() != WebFramePolicyListenerProxy::APIType) 201 return nullptr; 202 203 return static_cast<WebFramePolicyListenerProxy*>(m_activeListener.get()); 201 return m_activeListener.get(); 204 202 } 205 203 -
trunk/Source/WebKit/UIProcess/WebFrameProxy.h
r229778 r234009 29 29 #include "FrameLoadState.h" 30 30 #include "GenericCallback.h" 31 #include "WebFrame ListenerProxy.h"31 #include "WebFramePolicyListenerProxy.h" 32 32 #include <WebCore/FrameLoaderTypes.h> 33 33 #include <wtf/Forward.h> … … 145 145 bool m_containsPluginDocument { false }; 146 146 RefPtr<WebCertificateInfo> m_certificateInfo; 147 RefPtr<WebFrame ListenerProxy> m_activeListener;147 RefPtr<WebFramePolicyListenerProxy> m_activeListener; 148 148 uint64_t m_frameID; 149 149 #if ENABLE(CONTENT_FILTERING) -
trunk/Source/WebKit/UIProcess/WebInspectorProxy.cpp
r224575 r234009 28 28 #include "WebInspectorProxy.h" 29 29 30 #include "APINavigation.h" 30 31 #include "APIProcessPoolConfiguration.h" 31 32 #include "WebAutomationSession.h" -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r233986 r234009 34 34 #include "APIInjectedBundleClient.h" 35 35 #include "APILegacyContextHistoryClient.h" 36 #include "APINavigation.h" 36 37 #include "APIPageConfiguration.h" 37 38 #include "APIProcessPoolConfiguration.h" -
trunk/Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp
r232832 r234009 30 30 #include "WebInspectorProxy.h" 31 31 32 #include "APINavigation.h" 32 33 #include "APINavigationAction.h" 33 34 #include "WKArray.h" -
trunk/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm
r233678 r234009 29 29 #if PLATFORM(IOS) 30 30 31 #import "APINavigation.h" 31 32 #import "DrawingAreaProxy.h" 32 33 #import "UIKitSPI.h" -
trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm
r233678 r234009 29 29 #if PLATFORM(MAC) 30 30 31 #import "APINavigation.h" 31 32 #import "DrawingAreaProxy.h" 32 33 #import "FrameLoadState.h" -
trunk/Source/WebKit/UIProcess/mac/WKInspectorViewController.mm
r233316 r234009 29 29 #if PLATFORM(MAC) && WK_API_ENABLED 30 30 31 #import "APINavigation.h" 31 32 #import "VersionChecks.h" 32 33 #import "WKFrameInfo.h" -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r233866 r234009 1981 1981 BCE469591214EDF4000B98EB /* WKFormSubmissionListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE469571214EDF4000B98EB /* WKFormSubmissionListener.cpp */; }; 1982 1982 BCE4695A1214EDF4000B98EB /* WKFormSubmissionListener.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE469581214EDF4000B98EB /* WKFormSubmissionListener.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1983 BCE469771214F27B000B98EB /* WebFrameListenerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE469761214F27B000B98EB /* WebFrameListenerProxy.h */; };1984 BCE469791214F2B4000B98EB /* WebFrameListenerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE469781214F2B4000B98EB /* WebFrameListenerProxy.cpp */; };1985 1983 BCE81D8C1319F7EF00241910 /* FontInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE81D8A1319F7EF00241910 /* FontInfo.cpp */; }; 1986 1984 BCE81D8D1319F7EF00241910 /* FontInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE81D8B1319F7EF00241910 /* FontInfo.h */; }; … … 4599 4597 BCE469571214EDF4000B98EB /* WKFormSubmissionListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKFormSubmissionListener.cpp; sourceTree = "<group>"; }; 4600 4598 BCE469581214EDF4000B98EB /* WKFormSubmissionListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFormSubmissionListener.h; sourceTree = "<group>"; }; 4601 BCE469761214F27B000B98EB /* WebFrameListenerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameListenerProxy.h; sourceTree = "<group>"; };4602 BCE469781214F2B4000B98EB /* WebFrameListenerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebFrameListenerProxy.cpp; sourceTree = "<group>"; };4603 4599 BCE81D8A1319F7EF00241910 /* FontInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontInfo.cpp; sourceTree = "<group>"; }; 4604 4600 BCE81D8B1319F7EF00241910 /* FontInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontInfo.h; sourceTree = "<group>"; }; … … 7496 7492 BCE469511214E6CB000B98EB /* WebFormSubmissionListenerProxy.cpp */, 7497 7493 BCE469521214E6CB000B98EB /* WebFormSubmissionListenerProxy.h */, 7498 BCE469781214F2B4000B98EB /* WebFrameListenerProxy.cpp */,7499 BCE469761214F27B000B98EB /* WebFrameListenerProxy.h */,7500 7494 BCB9F69F1123A84B00A137E0 /* WebFramePolicyListenerProxy.cpp */, 7501 7495 BCB9F69E1123A84B00A137E0 /* WebFramePolicyListenerProxy.h */, … … 9473 9467 BCE469561214E6CB000B98EB /* WebFormSubmissionListenerProxy.h in Headers */, 9474 9468 BC032D8D10F437A00058C15A /* WebFrame.h in Headers */, 9475 BCE469771214F27B000B98EB /* WebFrameListenerProxy.h in Headers */,9476 9469 BC032D7F10F4378D0058C15A /* WebFrameLoaderClient.h in Headers */, 9477 9470 9391F2CB121B67AD00EBF7E8 /* WebFrameNetworkingContext.h in Headers */, … … 11286 11279 BCE469551214E6CB000B98EB /* WebFormSubmissionListenerProxy.cpp in Sources */, 11287 11280 BC111ADD112F5B9300337BAB /* WebFrame.cpp in Sources */, 11288 BCE469791214F2B4000B98EB /* WebFrameListenerProxy.cpp in Sources */,11289 11281 BC111A5F112F4FBB00337BAB /* WebFrameLoaderClient.cpp in Sources */, 11290 11282 2D28F3E71885CCC1004B9EAE /* WebFrameLoaderClientIOS.mm in Sources */,
Note:
See TracChangeset
for help on using the changeset viewer.