[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

bweinstein at apple.com bweinstein at apple.com
Sun Feb 20 23:55:57 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 1ed9b9f63fdd386b6a9e43639d8432eb19683f22
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 26 22:58:45 2011 +0000

    WebKit2: Need API to get the frame load state of a BundleFrame
    https://bugs.webkit.org/show_bug.cgi?id=53193
    
    Reviewed by John Sullivan.
    
    * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
    (WKBundleFrameGetFrameLoadState): Call through to the FrameLoader to get the frame load state.
    * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76725 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index b14b9e1..647a151 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,14 @@
+2011-01-26  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by John Sullivan.
+
+        WebKit2: Need API to get the frame load state of a BundleFrame
+        https://bugs.webkit.org/show_bug.cgi?id=53193
+
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+        (WKBundleFrameGetFrameLoadState): Call through to the FrameLoader to get the frame load state.
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
+
 2011-01-25  Brian Weinstein  <bweinstein at apple.com>
 
         Reviewed by Antti Koivisto.
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
index f02044c..903515d 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
@@ -55,6 +55,29 @@ WKURLRef WKBundleFrameCopyProvisionalURL(WKBundleFrameRef frameRef)
     return toCopiedURLAPI(toImpl(frameRef)->provisionalURL());
 }
 
+WKFrameLoadState WKBundleFrameGetFrameLoadState(WKBundleFrameRef frameRef)
+{
+    Frame* coreFrame = toImpl(frameRef)->coreFrame();
+    if (!coreFrame)
+        return kWKFrameLoadStateFinished;
+
+    FrameLoader* loader = coreFrame->loader();
+    if (!loader)
+        return kWKFrameLoadStateFinished;
+
+    switch (loader->state()) {
+    case FrameStateProvisional:
+        return kWKFrameLoadStateProvisional;
+    case FrameStateCommittedPage:
+        return kWKFrameLoadStateCommitted;
+    case FrameStateComplete:
+        return kWKFrameLoadStateFinished;
+    }
+
+    ASSERT_NOT_REACHED();
+    return kWKFrameLoadStateFinished;
+}
+
 WKArrayRef WKBundleFrameCopyChildFrames(WKBundleFrameRef frameRef)
 {
     return toAPI(toImpl(frameRef)->childFrames().releaseRef());    
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
index 59c2d75..93a7978 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
@@ -28,6 +28,7 @@
 
 #include <JavaScriptCore/JavaScript.h>
 #include <WebKit2/WKBase.h>
+#include <WebKit2/WKFrame.h>
 #include <WebKit2/WKGeometry.h>
 
 #ifdef __cplusplus
@@ -43,6 +44,8 @@ WK_EXPORT WKStringRef WKBundleFrameCopyName(WKBundleFrameRef frame);
 WK_EXPORT WKURLRef WKBundleFrameCopyURL(WKBundleFrameRef frame);
 WK_EXPORT WKURLRef WKBundleFrameCopyProvisionalURL(WKBundleFrameRef frame);
 
+WK_EXPORT WKFrameLoadState WKBundleFrameGetFrameLoadState(WKBundleFrameRef frame); 
+
 WK_EXPORT JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frame);
 WK_EXPORT JSGlobalContextRef WKBundleFrameGetJavaScriptContextForWorld(WKBundleFrameRef frame, WKBundleScriptWorldRef world);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list