Title: [163449] trunk/Source/WebKit2
- Revision
- 163449
- Author
- m...@apple.com
- Date
- 2014-02-05 09:13:57 -0800 (Wed, 05 Feb 2014)
Log Message
[Cocoa] Expose more WKWebProcessPlugInFrame properties
https://bugs.webkit.org/show_bug.cgi?id=128240
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h: Declared new properties.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame URL]): Added.
(-[WKWebProcessPlugInFrame childFrames]): Added.
(-[WKWebProcessPlugInFrame containsAnyFormElements]): Added.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (163448 => 163449)
--- trunk/Source/WebKit2/ChangeLog 2014-02-05 17:13:07 UTC (rev 163448)
+++ trunk/Source/WebKit2/ChangeLog 2014-02-05 17:13:57 UTC (rev 163449)
@@ -1,5 +1,18 @@
2014-02-05 Dan Bernstein <m...@apple.com>
+ [Cocoa] Expose more WKWebProcessPlugInFrame properties
+ https://bugs.webkit.org/show_bug.cgi?id=128240
+
+ Reviewed by Anders Carlsson.
+
+ * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h: Declared new properties.
+ * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
+ (-[WKWebProcessPlugInFrame URL]): Added.
+ (-[WKWebProcessPlugInFrame childFrames]): Added.
+ (-[WKWebProcessPlugInFrame containsAnyFormElements]): Added.
+
+2014-02-05 Dan Bernstein <m...@apple.com>
+
[Cocoa] Notify WKWebProcessPlugInLoadDelegate when a frame is removed from the frame hierarchy
https://bugs.webkit.org/show_bug.cgi?id=128239
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h (163448 => 163449)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h 2014-02-05 17:13:07 UTC (rev 163448)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h 2014-02-05 17:13:57 UTC (rev 163449)
@@ -38,6 +38,10 @@
WK_API_CLASS
@interface WKWebProcessPlugInFrame : NSObject
+@property (nonatomic, readonly) NSURL *URL;
+@property (nonatomic, readonly) NSArray *childFrames;
+@property (nonatomic, readonly) BOOL containsAnyFormElements;
+
- (JSContext *)jsContextForWorld:(WKWebProcessPlugInScriptWorld *)world;
- (WKWebProcessPlugInHitTestResult *)hitTest:(CGPoint)point;
- (JSValue *)jsNodeForNodeHandle:(WKWebProcessPlugInNodeHandle *)nodeHandle inWorld:(WKWebProcessPlugInScriptWorld *)world;
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm (163448 => 163449)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm 2014-02-05 17:13:07 UTC (rev 163448)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm 2014-02-05 17:13:57 UTC (rev 163449)
@@ -28,6 +28,8 @@
#if WK_API_ENABLED
+#import "WKNSArray.h"
+#import "WKNSURLExtras.h"
#import "WKWebProcessPlugInHitTestResultInternal.h"
#import "WKWebProcessPlugInNodeHandleInternal.h"
#import "WKWebProcessPlugInScriptWorldInternal.h"
@@ -63,6 +65,21 @@
return [JSValue valueWithJSValueRef:valueRef inContext:[self jsContextForWorld:world]];
}
+- (NSURL *)URL
+{
+ return [NSURL _web_URLWithWTFString:_frame->url()];
+}
+
+- (NSArray *)childFrames
+{
+ return [wrapper(*_frame->childFrames().leakRef()) autorelease];
+}
+
+- (BOOL)containsAnyFormElements
+{
+ return !!_frame->containsAnyFormElements();
+}
+
#pragma mark WKObject protocol implementation
- (API::Object&)_apiObject
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes