[Cocoa] Expose WebPage::setDefersLoading
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Apr 2014 19:49:00 +0000 (19:49 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Apr 2014 19:49:00 +0000 (19:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=131943

Reviewed by Anders Carlsson, but he doesn’t like this.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _defersLoading]): Added this accessor.
(-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]): Ditto.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
Declared new property _defersLoading.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::defersLoading): Added this getter.
* WebProcess/WebPage/WebPage.h:

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h

index 4015585..9903a8b 100644 (file)
@@ -1,3 +1,20 @@
+2014-04-21  Dan Bernstein  <mitz@apple.com>
+
+        [Cocoa] Expose WebPage::setDefersLoading
+        https://bugs.webkit.org/show_bug.cgi?id=131943
+
+        Reviewed by Anders Carlsson, but he doesn’t like this.
+
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
+        (-[WKWebProcessPlugInBrowserContextController _defersLoading]): Added this accessor.
+        (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]): Ditto.
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
+        Declared new property _defersLoading.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::defersLoading): Added this getter.
+        * WebProcess/WebPage/WebPage.h:
+
 2014-04-21  Joseph Pecoraro  <pecoraro@apple.com>
 
         Remove unused WebKitSystemInterface functions
index 3be6966..ac91f23 100644 (file)
@@ -480,6 +480,16 @@ static void setUpResourceLoadClient(WKWebProcessPlugInBrowserContextController *
         _page->setInjectedBundleFormClient(nullptr);
 }
 
+- (BOOL)_defersLoading
+{
+    return _page->defersLoading();
+}
+
+- (void)_setDefersLoading:(BOOL)defersLoading
+{
+    _page->setDefersLoading(defersLoading);
+}
+
 @end
 
 #endif // WK_API_ENABLED
index 089e85d..78bfec2 100644 (file)
@@ -43,6 +43,8 @@
 
 @property (weak, setter=_setFormDelegate:) id <WKWebProcessPlugInFormDelegatePrivate> _formDelegate;
 
+@property (nonatomic, setter=_setDefersLoading:) BOOL _defersLoading;
+
 + (instancetype)lookUpBrowsingContextFromHandle:(WKBrowsingContextHandle *)handle;
 
 @end
index 904aa5d..6d36408 100644 (file)
@@ -1040,6 +1040,11 @@ void WebPage::stopLoading()
     corePage()->userInputBridge().stopLoadingFrame(m_mainFrame->coreFrame());
 }
 
+bool WebPage::defersLoading() const
+{
+    return m_page->defersLoading();
+}
+
 void WebPage::setDefersLoading(bool defersLoading)
 {
     m_page->setDefersLoading(defersLoading);
index a774022..2452d2f 100644 (file)
@@ -375,6 +375,7 @@ public:
 
     void stopLoading();
     void stopLoadingFrame(uint64_t frameID);
+    bool defersLoading() const;
     void setDefersLoading(bool deferLoading);
 
     void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);