Title: [163350] trunk/Source/WebKit2
- Revision
- 163350
- Author
- [email protected]
- Date
- 2014-02-03 18:02:53 -0800 (Mon, 03 Feb 2014)
Log Message
Add loading property to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=128144
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView isLoading]):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeIsLoading):
(WebKit::NavigationState::didChangeIsLoading):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (163349 => 163350)
--- trunk/Source/WebKit2/ChangeLog 2014-02-04 01:13:45 UTC (rev 163349)
+++ trunk/Source/WebKit2/ChangeLog 2014-02-04 02:02:53 UTC (rev 163350)
@@ -1,3 +1,17 @@
+2014-02-03 Anders Carlsson <[email protected]>
+
+ Add loading property to WKWebView
+ https://bugs.webkit.org/show_bug.cgi?id=128144
+
+ Reviewed by Dan Bernstein.
+
+ * UIProcess/API/Cocoa/WKWebView.h:
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView isLoading]):
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::willChangeIsLoading):
+ (WebKit::NavigationState::didChangeIsLoading):
+
2014-02-03 Simon Fraser <[email protected]>
Allow WK2 to read from NSUserDefaults when it has no prefs identifier
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h (163349 => 163350)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h 2014-02-04 01:13:45 UTC (rev 163349)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h 2014-02-04 02:02:53 UTC (rev 163350)
@@ -73,6 +73,10 @@
- (WKNavigation *)loadRequest:(NSURLRequest *)request;
+/*! @abstract Whether the view is loading content. @link WKWebView @/link is KVO-compliant for this
+ property. */
+@property (nonatomic, readonly, getter=isLoading) BOOL loading;
+
@end
#endif
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (163349 => 163350)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-02-04 01:13:45 UTC (rev 163349)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-02-04 02:02:53 UTC (rev 163350)
@@ -140,6 +140,11 @@
return [navigation.leakRef() autorelease];
}
+- (BOOL)isLoading
+{
+ return _page->pageLoadState().isLoading();
+}
+
#pragma mark iOS-specific methods
#if PLATFORM(IOS)
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (163349 => 163350)
--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2014-02-04 01:13:45 UTC (rev 163349)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2014-02-04 02:02:53 UTC (rev 163350)
@@ -28,10 +28,10 @@
#if WK_API_ENABLED
+#import "PageLoadState.h"
#import "WKNavigationDelegate.h"
#import "WKNavigationInternal.h"
#import "WKWebViewInternal.h"
-#import "PageLoadState.h"
#import "WebFrameProxy.h"
#import "WebPageProxy.h"
@@ -305,10 +305,12 @@
void NavigationState::willChangeIsLoading()
{
+ [m_webView willChangeValueForKey:@"loading"];
}
void NavigationState::didChangeIsLoading()
{
+ [m_webView willChangeValueForKey:@"loading"];
}
void NavigationState::willChangeTitle()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes