Title: [164111] trunk/Source/WebKit2
- Revision
- 164111
- Author
- ander...@apple.com
- Date
- 2014-02-14 11:26:32 -0800 (Fri, 14 Feb 2014)
Log Message
Add -[WKWebView estimatedProgress]
https://bugs.webkit.org/show_bug.cgi?id=128830
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView estimatedProgress]):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeEstimatedProgress):
(WebKit::NavigationState::didChangeEstimatedProgress):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (164110 => 164111)
--- trunk/Source/WebKit2/ChangeLog 2014-02-14 19:13:54 UTC (rev 164110)
+++ trunk/Source/WebKit2/ChangeLog 2014-02-14 19:26:32 UTC (rev 164111)
@@ -1,3 +1,17 @@
+2014-02-14 Anders Carlsson <ander...@apple.com>
+
+ Add -[WKWebView estimatedProgress]
+ https://bugs.webkit.org/show_bug.cgi?id=128830
+
+ Reviewed by Dan Bernstein.
+
+ * UIProcess/API/Cocoa/WKWebView.h:
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView estimatedProgress]):
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::willChangeEstimatedProgress):
+ (WebKit::NavigationState::didChangeEstimatedProgress):
+
2014-02-13 Simon Fraser <simon.fra...@apple.com>
Give ScrollingTree(State)Nodes a reference to another layer, which is used for moving overflow:scroll contents around
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h (164110 => 164111)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h 2014-02-14 19:13:54 UTC (rev 164110)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h 2014-02-14 19:26:32 UTC (rev 164111)
@@ -99,6 +99,16 @@
property. */
@property (nonatomic, readonly, getter=isLoading) BOOL loading;
+/*!
+ @abstract An estimate of the fraction complete for a document load. @link WKWebView @/link is
+ KVO-compliant for this property.
+ @discussion This value will range from 0 to 1 and, once a load completes, will remain at 1.0
+ until a new load starts, at which point it will be reset to 0. The value is an estimate based
+ on the total number of bytes expected to be received for a document,
+ including all its possible subresources.
+ */
+@property (nonatomic, readonly) double estimatedProgress;
+
@property (nonatomic, readonly) BOOL hasOnlySecureContent;
@property (readonly) BOOL canGoBack;
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (164110 => 164111)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-02-14 19:13:54 UTC (rev 164110)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-02-14 19:26:32 UTC (rev 164111)
@@ -208,6 +208,11 @@
return _page->pageLoadState().isLoading();
}
+- (double)estimatedProgress
+{
+ return _page->pageLoadState().estimatedProgress();
+}
+
- (BOOL)hasOnlySecureContent
{
return _page->pageLoadState().hasOnlySecureContent();
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (164110 => 164111)
--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2014-02-14 19:13:54 UTC (rev 164110)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2014-02-14 19:26:32 UTC (rev 164111)
@@ -414,10 +414,12 @@
void NavigationState::willChangeEstimatedProgress()
{
+ [m_webView willChangeValueForKey:@"estimatedProgress"];
}
void NavigationState::didChangeEstimatedProgress()
{
+ [m_webView didChangeValueForKey:@"estimatedProgress"];
}
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes