Need a way to get a WKPageRef from a WKWebView
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 May 2014 00:38:39 +0000 (00:38 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 May 2014 00:38:39 +0000 (00:38 +0000)
<http://webkit.org/b/133015>

Reviewed by Benjamin Poulain.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _pageRef]): Added.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(-[WKWebView _pageRef]): Added declaration.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169001 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h

index b18d4764cc4ff672f3568429fd6b1264ffcdd540..31b31f06013b69da92e69eeb48e2955b5459e945 100644 (file)
@@ -1,3 +1,15 @@
+2014-05-17  David Kilzer  <ddkilzer@apple.com>
+
+        Need a way to get a WKPageRef from a WKWebView
+        <http://webkit.org/b/133015>
+
+        Reviewed by Benjamin Poulain.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _pageRef]): Added.
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        (-[WKWebView _pageRef]): Added declaration.
+
 2014-05-17  Anders Carlsson  <andersca@apple.com>
 
         Give user scripts custom URLs
index 1c9dc2416aec88bcbb3da7d1bc795e249eb82034..21fb2fdb7f71ab5ab1f33aa0a8bfbdbed413e2f8 100644 (file)
@@ -1444,6 +1444,11 @@ static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
         _page->setFormClient(nullptr);
 }
 
+- (WKPageRef)_pageRef
+{
+    return toAPI(_page.get());
+}
+
 #pragma mark iOS-specific methods
 
 #if PLATFORM(IOS)
index af946fee075f32aedaa7765e124dde098450a84d..9ae9d968c376b45210bb9de9e0dda2d3d0927e44 100644 (file)
@@ -25,6 +25,8 @@
 
 #import <WebKit/WKWebView.h>
 
+#import <WebKit/WKBase.h>
+
 #if WK_API_ENABLED
 
 typedef NS_OPTIONS(NSUInteger, _WKRenderingProgressEvents) {
@@ -156,6 +158,8 @@ typedef NS_OPTIONS(NSUInteger, _WKFindOptions) {
 
 @property (nonatomic, weak, setter=_setFormDelegate:) id <_WKFormDelegate> _formDelegate;
 
+@property (nonatomic, readonly) WKPageRef _pageRef;
+
 @end
 
 #endif