Title: [166244] trunk/Source/WebKit2
Revision
166244
Author
ander...@apple.com
Date
2014-03-25 13:10:02 -0700 (Tue, 25 Mar 2014)

Log Message

Begin stubbing out a WKWindowFeatures class
https://bugs.webkit.org/show_bug.cgi?id=130733

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWindowFeatures.h: Added.
* UIProcess/API/Cocoa/WKWindowFeatures.mm: Added.
(-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
(-[WKWindowFeatures x]):
(-[WKWindowFeatures y]):
(-[WKWindowFeatures width]):
(-[WKWindowFeatures height]):
* UIProcess/API/Cocoa/WKWindowFeaturesInternal.h: Added.
* WebKit2.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (166243 => 166244)


--- trunk/Source/WebKit2/ChangeLog	2014-03-25 20:06:07 UTC (rev 166243)
+++ trunk/Source/WebKit2/ChangeLog	2014-03-25 20:10:02 UTC (rev 166244)
@@ -1,5 +1,22 @@
 2014-03-25  Anders Carlsson  <ander...@apple.com>
 
+        Begin stubbing out a WKWindowFeatures class
+        https://bugs.webkit.org/show_bug.cgi?id=130733
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/API/Cocoa/WKWindowFeatures.h: Added.
+        * UIProcess/API/Cocoa/WKWindowFeatures.mm: Added.
+        (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
+        (-[WKWindowFeatures x]):
+        (-[WKWindowFeatures y]):
+        (-[WKWindowFeatures width]):
+        (-[WKWindowFeatures height]):
+        * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h: Added.
+        * WebKit2.xcodeproj/project.pbxproj:
+
+2014-03-25  Anders Carlsson  <ander...@apple.com>
+
         Add goBack: and goForward: IBActions and move stopLoading: to a new WKIBActions category on WKWebView
         https://bugs.webkit.org/show_bug.cgi?id=130732
 

Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.h (0 => 166244)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.h	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.h	2014-03-25 20:10:02 UTC (rev 166244)
@@ -0,0 +1,41 @@
+/*
+ * 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 <Foundation/Foundation.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
+
+WK_API_CLASS
+@interface WKWindowFeatures : NSObject
+
+@property (nonatomic, readonly) NSNumber *x;
+@property (nonatomic, readonly) NSNumber *y;
+@property (nonatomic, readonly) NSNumber *width;
+@property (nonatomic, readonly) NSNumber *height;
+
+@end
+
+#endif

Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.mm (0 => 166244)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.mm	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.mm	2014-03-25 20:10:02 UTC (rev 166244)
@@ -0,0 +1,80 @@
+/*
+ * 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 "config.h"
+#import "WKWindowFeaturesInternal.h"
+
+#if WK_API_ENABLED
+
+#import <WebCore/WindowFeatures.h>
+#import <wtf/RetainPtr.h>
+
+@implementation WKWindowFeatures {
+    RetainPtr<NSNumber> _x;
+    RetainPtr<NSNumber> _y;
+    RetainPtr<NSNumber> _width;
+    RetainPtr<NSNumber> _height;
+}
+
+- (instancetype)_initWithWindowFeatures:(const WebCore::WindowFeatures&)windowFeatures
+{
+    if (!(self = [super init]))
+        return nil;
+
+    if (windowFeatures.xSet)
+        _x = @(windowFeatures.x);
+    if (windowFeatures.ySet)
+        _y = @(windowFeatures.y);
+    if (windowFeatures.widthSet)
+        _width = @(windowFeatures.width);
+    if (windowFeatures.heightSet)
+        _height = @(windowFeatures.height);
+
+    return self;
+}
+
+- (NSNumber *)x
+{
+    return _x.get();
+}
+
+- (NSNumber *)y
+{
+    return _y.get();
+}
+
+- (NSNumber *)width
+{
+    return _width.get();
+}
+
+- (NSNumber *)height
+{
+    return _height.get();
+}
+
+@end
+
+#endif

Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h (0 => 166244)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h	2014-03-25 20:10:02 UTC (rev 166244)
@@ -0,0 +1,40 @@
+/*
+ * 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 "WKWindowFeatures.h"
+
+#if WK_API_ENABLED
+
+namespace WebCore {
+struct WindowFeatures;
+}
+
+@interface WKWindowFeatures ()
+
+- (instancetype)_initWithWindowFeatures:(const WebCore::WindowFeatures&)windowFeatures;
+
+@end
+
+#endif

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (166243 => 166244)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2014-03-25 20:06:07 UTC (rev 166243)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2014-03-25 20:10:02 UTC (rev 166244)
@@ -374,6 +374,9 @@
 		1AD25E96167AB08100EA9BCD /* DownloadProxyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD25E94167AB08100EA9BCD /* DownloadProxyMap.h */; };
 		1AD3306E16B1D991004F60E7 /* StorageAreaImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD3306C16B1D991004F60E7 /* StorageAreaImpl.cpp */; };
 		1AD3306F16B1D991004F60E7 /* StorageAreaImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD3306D16B1D991004F60E7 /* StorageAreaImpl.h */; };
+		1AD60F5D18E20F4C0020C034 /* WKWindowFeatures.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AD60F5B18E20F4C0020C034 /* WKWindowFeatures.mm */; };
+		1AD60F5E18E20F4C0020C034 /* WKWindowFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD60F5C18E20F4C0020C034 /* WKWindowFeatures.h */; };
+		1AD60F6018E20F740020C034 /* WKWindowFeaturesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD60F5F18E20F740020C034 /* WKWindowFeaturesInternal.h */; };
 		1AD8790A18B6C38A006CAFD7 /* WKUIDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD8790918B6C38A006CAFD7 /* WKUIDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		1ADCB86A189831B30022EE5A /* NavigationActionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADCB868189831B30022EE5A /* NavigationActionData.cpp */; };
 		1ADCB86B189831B30022EE5A /* NavigationActionData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ADCB869189831B30022EE5A /* NavigationActionData.h */; };
@@ -2132,6 +2135,9 @@
 		1AD25E94167AB08100EA9BCD /* DownloadProxyMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadProxyMap.h; sourceTree = "<group>"; };
 		1AD3306C16B1D991004F60E7 /* StorageAreaImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageAreaImpl.cpp; sourceTree = "<group>"; };
 		1AD3306D16B1D991004F60E7 /* StorageAreaImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageAreaImpl.h; sourceTree = "<group>"; };
+		1AD60F5B18E20F4C0020C034 /* WKWindowFeatures.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWindowFeatures.mm; sourceTree = "<group>"; };
+		1AD60F5C18E20F4C0020C034 /* WKWindowFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWindowFeatures.h; sourceTree = "<group>"; };
+		1AD60F5F18E20F740020C034 /* WKWindowFeaturesInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWindowFeaturesInternal.h; sourceTree = "<group>"; };
 		1AD8790918B6C38A006CAFD7 /* WKUIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKUIDelegate.h; sourceTree = "<group>"; };
 		1ADCB868189831B30022EE5A /* NavigationActionData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigationActionData.cpp; sourceTree = "<group>"; };
 		1ADCB869189831B30022EE5A /* NavigationActionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationActionData.h; sourceTree = "<group>"; };
@@ -4606,6 +4612,9 @@
 				2D7AAFD518C956AF00A7ACD4 /* WKWebViewConfigurationInternal.h */,
 				1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */,
 				26F9A83A18A3463F00AEB88A /* WKWebViewPrivate.h */,
+				1AD60F5C18E20F4C0020C034 /* WKWindowFeatures.h */,
+				1AD60F5B18E20F4C0020C034 /* WKWindowFeatures.mm */,
+				1AD60F5F18E20F740020C034 /* WKWindowFeaturesInternal.h */,
 			);
 			path = Cocoa;
 			sourceTree = "<group>";
@@ -6690,6 +6699,7 @@
 				1AE4976811FF658E0048B464 /* NPJSObject.h in Headers */,
 				516311871858446600534647 /* WebCrossThreadCopier.h in Headers */,
 				1AB474E2184D44800051B622 /* WKBundlePageFormClient.h in Headers */,
+				1AD60F6018E20F740020C034 /* WKWindowFeaturesInternal.h in Headers */,
 				1A2D82A5127F4EAB001EB962 /* NPObjectMessageReceiver.h in Headers */,
 				1A2D843A127F65D5001EB962 /* NPObjectMessageReceiverMessages.h in Headers */,
 				1A2D82A7127F4EAB001EB962 /* NPObjectProxy.h in Headers */,
@@ -6770,6 +6780,7 @@
 				51D130561382EAC000351EDD /* SecItemResponseData.h in Headers */,
 				E179088F169BAA6A006904C7 /* SecItemShim.h in Headers */,
 				511F8A7B138B460900A95F44 /* SecItemShimLibrary.h in Headers */,
+				1AD60F5E18E20F4C0020C034 /* WKWindowFeatures.h in Headers */,
 				E1790891169BAA82006904C7 /* SecItemShimMessages.h in Headers */,
 				E18E690C169B563F009B6670 /* SecItemShimProxy.h in Headers */,
 				E18E6918169B667B009B6670 /* SecItemShimProxyMessages.h in Headers */,
@@ -8333,6 +8344,7 @@
 				1A422F8E18B29C6400D8CD96 /* HistoryClient.mm in Sources */,
 				1FB00AC8185F76460019142E /* WKWebProcessPlugInPageGroup.mm in Sources */,
 				CD6F75F4131B66D000D6B21E /* WebFullScreenManagerProxy.cpp in Sources */,
+				1AD60F5D18E20F4C0020C034 /* WKWindowFeatures.mm in Sources */,
 				CD73BA47131ACC9A00EEDED2 /* WebFullScreenManagerProxyMessageReceiver.cpp in Sources */,
 				BC1BE1E112D54A410004A228 /* WebGeolocationClient.cpp in Sources */,
 				BC0E5FE612D697160012A72A /* WebGeolocationManager.cpp in Sources */,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to