Title: [168632] branches/safari-538.34-branch/Source/WebKit2

Diff

Modified: branches/safari-538.34-branch/Source/WebKit2/ChangeLog (168631 => 168632)


--- branches/safari-538.34-branch/Source/WebKit2/ChangeLog	2014-05-12 18:26:17 UTC (rev 168631)
+++ branches/safari-538.34-branch/Source/WebKit2/ChangeLog	2014-05-12 18:33:21 UTC (rev 168632)
@@ -1,3 +1,28 @@
+2014-04-17  Lucas Forschler  <lforsch...@apple.com>
+
+        Merge r168581
+
+    2014-05-10  Anders Carlsson  <ander...@apple.com>
+
+            Make -[WKNavigationResponse frame] SPI and only expose -[WKNavigationResponse isMainFrame]
+            https://bugs.webkit.org/show_bug.cgi?id=132781
+            <rdar://problem/16868319>
+
+            Reviewed by Darin Adler.
+
+            * UIProcess/API/Cocoa/WKNavigationResponse.h:
+            * UIProcess/API/Cocoa/WKNavigationResponse.mm:
+            (-[WKNavigationResponse description]):
+            (-[WKNavigationResponse isMainFrameNavigation]):
+            (-[WKNavigationResponse _frame]):
+            (-[WKNavigationResponse frame]): Deleted.
+            (-[WKNavigationResponse setFrame:]): Deleted.
+            * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
+            * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h: Added.
+            * UIProcess/Cocoa/NavigationState.mm:
+            (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
+            * WebKit2.xcodeproj/project.pbxproj:
+
 2014-05-09  Lucas Forschler  <lforsch...@apple.com>
 
         Merge r168499

Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h (168631 => 168632)


--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h	2014-05-12 18:26:17 UTC (rev 168631)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h	2014-05-12 18:33:21 UTC (rev 168632)
@@ -35,9 +35,9 @@
 WK_API_CLASS
 @interface WKNavigationResponse : NSObject
 
-/*! @abstract Represents the frame that is being navigated.
+/*! @abstract Whether the frame that is being navigated is the main frame or not.
  */
-@property (nonatomic, readonly) WKFrameInfo *frame;
+@property (nonatomic, readonly, getter=isMainFrameNavigation) BOOL mainFrameNavigation;
 
 /*! @abstract The NSURLResponse of the frame.
  */

Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm (168631 => 168632)


--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm	2014-05-12 18:26:17 UTC (rev 168631)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm	2014-05-12 18:33:21 UTC (rev 168632)
@@ -29,27 +29,22 @@
 #if WK_API_ENABLED
 
 #import <wtf/RetainPtr.h>
+#import "WKFrameInfo.h"
 
 @implementation WKNavigationResponse {
-    RetainPtr<WKFrameInfo> _frame;
     RetainPtr<NSURLResponse> _response;
 }
 
 - (NSString *)description
 {
-    return [NSString stringWithFormat:@"<%@: %p; frame = %@; response = %@>", NSStringFromClass(self.class), self, _frame.get(), _response.get()];
+    return [NSString stringWithFormat:@"<%@: %p; response = %@>", NSStringFromClass(self.class), self, _response.get()];
 }
 
-- (WKFrameInfo *)frame
+- (BOOL)isMainFrameNavigation
 {
-    return _frame.get();
+    return [_frame isMainFrame];
 }
 
-- (void)setFrame:(WKFrameInfo *)frame
-{
-    _frame = frame;
-}
-
 - (NSURLResponse *)response
 {
     return _response.get();
@@ -62,4 +57,14 @@
 
 @end
 
+@implementation WKNavigationResponse (WKPrivate)
+
+- (WKFrameInfo *)_frame
+{
+    return _frame.get();
+}
+
+@end
+
+
 #endif

Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h (168631 => 168632)


--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h	2014-05-12 18:26:17 UTC (rev 168631)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h	2014-05-12 18:33:21 UTC (rev 168632)
@@ -23,13 +23,17 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import "WKNavigationResponse.h"
+#import "WKNavigationResponsePrivate.h"
 
 #if WK_API_ENABLED
 
-@interface WKNavigationResponse ()
+#import <wtf/RetainPtr.h>
 
-@property (nonatomic, readwrite, strong) WKFrameInfo *frame;
+@interface WKNavigationResponse () {
+@package
+    RetainPtr<WKFrameInfo> _frame;
+}
+
 @property (nonatomic, readwrite, copy) NSURLResponse *response;
 @property (nonatomic, readwrite) BOOL canShowMIMEType;
 

Copied: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponsePrivate.h (from rev 168581, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponsePrivate.h) (0 => 168632)


--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponsePrivate.h	                        (rev 0)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponsePrivate.h	2014-05-12 18:33:21 UTC (rev 168632)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#import <WebKit/WKNavigationResponse.h>
+
+#if WK_API_ENABLED
+
+@interface WKNavigationResponse (WKPrivate)
+
+@property (nonatomic, readonly) WKFrameInfo *_frame;
+
+@end
+
+#endif

Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (168631 => 168632)


--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-05-12 18:26:17 UTC (rev 168631)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-05-12 18:33:21 UTC (rev 168632)
@@ -319,7 +319,7 @@
 
     auto navigationResponse = adoptNS([[WKNavigationResponse alloc] init]);
 
-    [navigationResponse setFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*frame]).get()];
+    navigationResponse->_frame = adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*frame]);
     [navigationResponse setResponse:resourceResponse.nsURLResponse()];
     [navigationResponse setCanShowMIMEType:canShowMIMEType];
 

Modified: branches/safari-538.34-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (168631 => 168632)


--- branches/safari-538.34-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2014-05-12 18:26:17 UTC (rev 168631)
+++ branches/safari-538.34-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2014-05-12 18:33:21 UTC (rev 168632)
@@ -289,6 +289,7 @@
 		1A9E329F1822FEDD00F5D04C /* WKRemoteObjectCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E329D1822FEDD00F5D04C /* WKRemoteObjectCoder.h */; };
 		1A9E32A11823018900F5D04C /* _WKRemoteObjectRegistryInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E32A01823018900F5D04C /* _WKRemoteObjectRegistryInternal.h */; };
 		1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */; };
+		1AA13212191D5924009C1489 /* WKNavigationResponsePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA13211191D5924009C1489 /* WKNavigationResponsePrivate.h */; };
 		1AA20D5118AD50E0005D1ED4 /* WKNavigationDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA20D5018AD50E0005D1ED4 /* WKNavigationDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1AA2E51D12E4C05E00BC4966 /* CGUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA2E51B12E4C05E00BC4966 /* CGUtilities.h */; };
 		1AA2E51E12E4C05E00BC4966 /* CGUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA2E51C12E4C05E00BC4966 /* CGUtilities.cpp */; };
@@ -2087,6 +2088,7 @@
 		1A9E329D1822FEDD00F5D04C /* WKRemoteObjectCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRemoteObjectCoder.h; sourceTree = "<group>"; };
 		1A9E32A01823018900F5D04C /* _WKRemoteObjectRegistryInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKRemoteObjectRegistryInternal.h; sourceTree = "<group>"; };
 		1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginComplexTextInputState.h; sourceTree = "<group>"; };
+		1AA13211191D5924009C1489 /* WKNavigationResponsePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationResponsePrivate.h; sourceTree = "<group>"; };
 		1AA1C79A100E7FC50078DEBC /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		1AA1C7DE100E846E0078DEBC /* _javascript_Core.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = _javascript_Core.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
@@ -4713,6 +4715,7 @@
 				1A1B0EB418A424950038481A /* WKNavigationResponse.h */,
 				1A1B0EB318A424950038481A /* WKNavigationResponse.mm */,
 				1A1B0EB718A424CD0038481A /* WKNavigationResponseInternal.h */,
+				1AA13211191D5924009C1489 /* WKNavigationResponsePrivate.h */,
 				1AFDD3161891C94700153970 /* WKPreferences.h */,
 				1AFDD3181891CA1200153970 /* WKPreferences.mm */,
 				1A3C887F18A5ABAE00C4C962 /* WKPreferencesInternal.h */,
@@ -6720,6 +6723,7 @@
 				37C4E9F6131C6E7E0029BD5A /* config.h in Headers */,
 				BC032DAB10F437D10058C15A /* Connection.h in Headers */,
 				5136183E163126DA00A99DDE /* ConnectionStack.h in Headers */,
+				1AA13212191D5924009C1489 /* WKNavigationResponsePrivate.h in Headers */,
 				1AC1415118AC47EE006C602C /* WKWebViewConfigurationPrivate.h in Headers */,
 				514D9F5719119D35000063A7 /* ServicesController.h in Headers */,
 				CDC3830C17212282008A2FC3 /* CookieStorageShimLibrary.h in Headers */,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to