Changeset 177362 in webkit
- Timestamp:
- Dec 16, 2014 9:45:13 AM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r177358 r177362 1 2014-12-16 Dan Bernstein <mitz@apple.com> 2 3 [Cocoa] WKWebProcessPlugInLoadDelegate can’t tell what type of same-document navigation has happened 4 https://bugs.webkit.org/show_bug.cgi?id=139669 5 6 Reviewed by Anders Carlsson. 7 8 * Shared/API/Cocoa/_WKSameDocumentNavigationType.h: Added. Moved the 9 _WKSameDocumentNavigationType type definition here from WKNavigationDelegatePrivate.h. 10 * Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h: Added. 11 (WebKit::toWKSameDocumentNavigationType): Moved from NavigationState.mm. 12 13 * Shared/API/c/WKSharedAPICast.h: 14 (WebKit::toSameDocumentNavigationType): Added this conversion helper. 15 16 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added #import. 17 18 * UIProcess/Cocoa/NavigationState.mm: 19 (WebKit::toWKSameDocumentNavigationType): Deleted. 20 21 * WebKit2.xcodeproj/project.pbxproj: Updated for added headers. 22 23 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new 24 delegate method that take a navigation type parameter. 25 26 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: 27 (didSameDocumentNavigationForFrame): Changed to call the new delegate method, passing the 28 navigation type. 29 1 30 2014-12-16 Carlos Garcia Campos <cgarcia@igalia.com> 2 31 -
trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
r172755 r177362 805 805 } 806 806 807 inline SameDocumentNavigationType toSameDocumentNavigationType(WKSameDocumentNavigationType wkType) 808 { 809 SameDocumentNavigationType type = SameDocumentNavigationAnchorNavigation; 810 811 switch (wkType) { 812 case kWKSameDocumentNavigationAnchorNavigation: 813 type = SameDocumentNavigationAnchorNavigation; 814 break; 815 case kWKSameDocumentNavigationSessionStatePush: 816 type = SameDocumentNavigationSessionStatePush; 817 break; 818 case kWKSameDocumentNavigationSessionStateReplace: 819 type = SameDocumentNavigationSessionStateReplace; 820 break; 821 case kWKSameDocumentNavigationSessionStatePop: 822 type = SameDocumentNavigationSessionStatePop; 823 break; 824 } 825 826 return type; 827 } 828 807 829 inline WKLayoutMilestones toWKLayoutMilestones(WebCore::LayoutMilestones milestones) 808 830 { -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h
r171045 r177362 28 28 #import <WebKit/WKFrameInfo.h> 29 29 #import <WebKit/WKWebViewPrivate.h> 30 #import <WebKit/_WKSameDocumentNavigationType.h> 30 31 31 32 #if WK_API_ENABLED … … 34 35 35 36 static const WKNavigationResponsePolicy _WKNavigationResponsePolicyBecomeDownload = (WKNavigationResponsePolicy)(WKNavigationResponsePolicyAllow + 1); 36 37 typedef NS_ENUM(NSInteger, _WKSameDocumentNavigationType) {38 _WKSameDocumentNavigationTypeAnchorNavigation,39 _WKSameDocumentNavigationTypeSessionStatePush,40 _WKSameDocumentNavigationTypeSessionStateReplace,41 _WKSameDocumentNavigationTypeSessionStatePop,42 } WK_AVAILABLE(10_10, 8_0);43 37 44 38 @protocol WKNavigationDelegatePrivate <WKNavigationDelegate> -
trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
r177163 r177362 57 57 #import "_WKErrorRecoveryAttempting.h" 58 58 #import "_WKFrameHandleInternal.h" 59 #import "_WKSameDocumentNavigationTypeInternal.h" 59 60 #import <WebCore/Credential.h> 60 61 #import <wtf/NeverDestroyed.h> … … 622 623 } 623 624 624 static _WKSameDocumentNavigationType toWKSameDocumentNavigationType(SameDocumentNavigationType navigationType)625 {626 switch (navigationType) {627 case SameDocumentNavigationAnchorNavigation:628 return _WKSameDocumentNavigationTypeAnchorNavigation;629 case SameDocumentNavigationSessionStatePush:630 return _WKSameDocumentNavigationTypeSessionStatePush;631 case SameDocumentNavigationSessionStateReplace:632 return _WKSameDocumentNavigationTypeSessionStateReplace;633 case SameDocumentNavigationSessionStatePop:634 return _WKSameDocumentNavigationTypeSessionStatePop;635 }636 637 ASSERT_NOT_REACHED();638 return _WKSameDocumentNavigationTypeAnchorNavigation;639 }640 641 625 void NavigationState::LoaderClient::didSameDocumentNavigationForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, SameDocumentNavigationType navigationType, API::Object*) 642 626 { -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r177296 r177362 736 736 37608822150414F700FC82C7 /* WKRenderObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37608820150414F700FC82C7 /* WKRenderObject.cpp */; }; 737 737 37608823150414F700FC82C7 /* WKRenderObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 37608821150414F700FC82C7 /* WKRenderObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; 738 376311FD1A3FB5F7005A2E51 /* _WKSameDocumentNavigationType.h in Headers */ = {isa = PBXBuildFile; fileRef = 376311F81A3FB30B005A2E51 /* _WKSameDocumentNavigationType.h */; settings = {ATTRIBUTES = (Private, ); }; }; 739 376311FE1A3FB600005A2E51 /* _WKSameDocumentNavigationTypeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 376311FA1A3FB38B005A2E51 /* _WKSameDocumentNavigationTypeInternal.h */; }; 738 740 3766F9EE189A1241003CF19B /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */; }; 739 741 3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */; }; … … 2792 2794 37608820150414F700FC82C7 /* WKRenderObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKRenderObject.cpp; sourceTree = "<group>"; }; 2793 2795 37608821150414F700FC82C7 /* WKRenderObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRenderObject.h; sourceTree = "<group>"; }; 2796 376311F81A3FB30B005A2E51 /* _WKSameDocumentNavigationType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKSameDocumentNavigationType.h; sourceTree = "<group>"; }; 2797 376311FA1A3FB38B005A2E51 /* _WKSameDocumentNavigationTypeInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKSameDocumentNavigationTypeInternal.h; sourceTree = "<group>"; }; 2794 2798 3769079818F31CB2001DFF04 /* APIInjectedBundlePageUIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = APIInjectedBundlePageUIClient.h; path = API/APIInjectedBundlePageUIClient.h; sourceTree = "<group>"; }; 2795 2799 3769079C18F340A2001DFF04 /* APIInjectedBundleFormClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInjectedBundleFormClient.h; sourceTree = "<group>"; }; … … 5257 5261 1F604BA61889FA7400EE0395 /* WKRenderingProgressEvents.h */, 5258 5262 1F604BA71889FA7400EE0395 /* WKRenderingProgressEventsInternal.h */, 5263 376311F81A3FB30B005A2E51 /* _WKSameDocumentNavigationType.h */, 5264 376311FA1A3FB38B005A2E51 /* _WKSameDocumentNavigationTypeInternal.h */, 5259 5265 ); 5260 5266 path = Cocoa; … … 7840 7846 BC14DF9F120B635F00826C0C /* WKBundleScriptWorld.h in Headers */, 7841 7847 1AF4CEF018BC481800BC2D34 /* VisitedLinkTableController.h in Headers */, 7848 376311FD1A3FB5F7005A2E51 /* _WKSameDocumentNavigationType.h in Headers */, 7842 7849 E4436ECC1A0D040B00EAD204 /* NetworkCache.h in Headers */, 7843 7850 BC4075F6124FF0270068F20A /* WKCertificateInfo.h in Headers */, … … 7947 7954 51D0D437183B353D0097041D /* DatabaseProcessIDBConnectionMessages.h in Headers */, 7948 7955 BCBAACED145225E30053F82F /* WKProcessGroupPrivate.h in Headers */, 7956 376311FE1A3FB600005A2E51 /* _WKSameDocumentNavigationTypeInternal.h in Headers */, 7949 7957 512F58FC12A88A5400629530 /* WKProtectionSpace.h in Headers */, 7950 7958 518ACAEA12AEE6BB00B04B83 /* WKProtectionSpaceTypes.h in Headers */, -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h
r176901 r177362 25 25 #import <Foundation/Foundation.h> 26 26 #import <WebKit/WKRenderingProgressEvents.h> 27 #import <WebKit/_WKSameDocumentNavigationType.h> 27 28 28 29 @class WKWebProcessPlugInBrowsingContextController; … … 41 42 - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didFailLoadWithErrorForFrame:(WKWebProcessPlugInFrame *)frame error:(NSError *)error; 42 43 - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didFinishLoadForFrame:(WKWebProcessPlugInFrame *)frame; 43 - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didSameDocumentNavigation ForFrame:(WKWebProcessPlugInFrame *)frame;44 - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didSameDocumentNavigation:(_WKSameDocumentNavigationType)navigationType forFrame:(WKWebProcessPlugInFrame *)frame; 44 45 - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller globalObjectIsAvailableForFrame:(WKWebProcessPlugInFrame *)frame inScriptWorld:(WKWebProcessPlugInScriptWorld *)scriptWorld; 45 46 - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller didRemoveFrameFromHierarchy:(WKWebProcessPlugInFrame *)frame; -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
r176901 r177362 57 57 #import "WebProcess.h" 58 58 #import "_WKRemoteObjectRegistryInternal.h" 59 #import "_WKSameDocumentNavigationTypeInternal.h" 59 60 #import <WebCore/Document.h> 60 61 #import <WebCore/Frame.h> … … 65 66 using namespace WebCore; 66 67 using namespace WebKit; 68 69 @interface NSObject (WKDeprecatedDelegateMethods) 70 - (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller didSameDocumentNavigationForFrame:(WKWebProcessPlugInFrame *)frame; 71 @end 67 72 68 73 @implementation WKWebProcessPlugInBrowserContextController { … … 151 156 auto loadDelegate = pluginContextController->_loadDelegate.get(); 152 157 153 if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didSameDocumentNavigationForFrame:)]) 154 [loadDelegate webProcessPlugInBrowserContextController:pluginContextController didSameDocumentNavigationForFrame:wrapper(*toImpl(frame))]; 158 if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didSameDocumentNavigation:forFrame:)]) 159 [loadDelegate webProcessPlugInBrowserContextController:pluginContextController didSameDocumentNavigation:toWKSameDocumentNavigationType(toSameDocumentNavigationType(type)) forFrame:wrapper(*toImpl(frame))]; 160 else { 161 // FIXME: Remove this once clients switch to implementing the above delegate method. 162 if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didSameDocumentNavigationForFrame:)]) 163 [(NSObject *)loadDelegate webProcessPlugInBrowserContextController:pluginContextController didSameDocumentNavigationForFrame:wrapper(*toImpl(frame))]; 164 } 155 165 } 156 166
Note: See TracChangeset
for help on using the changeset viewer.