[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:35:51 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit c964334968d5d0cb6245562e629b07439837189a
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 21 23:42:00 2011 +0000

    WebKit2: Need API to stop loading a WKFrame
    https://bugs.webkit.org/show_bug.cgi?id=52925
    
    Reviewed by Adam Roben.
    
    * UIProcess/API/C/WKFrame.cpp:
    (WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
    * UIProcess/API/C/WKFrame.h:
    * UIProcess/WebFrameProxy.cpp:
    (WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
        with the passed in ID.
    * UIProcess/WebFrameProxy.h:
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
    * WebProcess/WebPage/WebPage.h:
    * WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76403 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 5a350c4..e83c4ed 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,22 @@
+2011-01-21  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Adam Roben.
+
+        WebKit2: Need API to stop loading a WKFrame
+        https://bugs.webkit.org/show_bug.cgi?id=52925
+
+        * UIProcess/API/C/WKFrame.cpp:
+        (WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
+        * UIProcess/API/C/WKFrame.h:
+        * UIProcess/WebFrameProxy.cpp:
+        (WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
+            with the passed in ID.
+        * UIProcess/WebFrameProxy.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.
+
 2011-01-21  Brady Eidson  <beidson at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/Source/WebKit2/UIProcess/API/C/WKFrame.cpp b/Source/WebKit2/UIProcess/API/C/WKFrame.cpp
index 282e124..cce572a 100644
--- a/Source/WebKit2/UIProcess/API/C/WKFrame.cpp
+++ b/Source/WebKit2/UIProcess/API/C/WKFrame.cpp
@@ -75,6 +75,11 @@ WKURLRef WKFrameCopyUnreachableURL(WKFrameRef frameRef)
     return toCopiedURLAPI(toImpl(frameRef)->unreachableURL());
 }
 
+void WKFrameStopLoading(WKFrameRef frameRef)
+{
+    toImpl(frameRef)->stopLoading();
+}
+
 WKStringRef WKFrameCopyMIMEType(WKFrameRef frameRef)
 {
     return toCopiedAPI(toImpl(frameRef)->mimeType());
diff --git a/Source/WebKit2/UIProcess/API/C/WKFrame.h b/Source/WebKit2/UIProcess/API/C/WKFrame.h
index 7c09642..334a27b 100644
--- a/Source/WebKit2/UIProcess/API/C/WKFrame.h
+++ b/Source/WebKit2/UIProcess/API/C/WKFrame.h
@@ -51,6 +51,8 @@ WK_EXPORT WKURLRef WKFrameCopyProvisionalURL(WKFrameRef frame);
 WK_EXPORT WKURLRef WKFrameCopyURL(WKFrameRef frame);
 WK_EXPORT WKURLRef WKFrameCopyUnreachableURL(WKFrameRef frame);
 
+WK_EXPORT void WKFrameStopLoading(WKFrameRef frame);
+
 WK_EXPORT WKStringRef WKFrameCopyMIMEType(WKFrameRef frame);
 WK_EXPORT WKStringRef WKFrameCopyTitle(WKFrameRef frame);
 
diff --git a/Source/WebKit2/UIProcess/WebFrameProxy.cpp b/Source/WebKit2/UIProcess/WebFrameProxy.cpp
index 77a2b19..779cf61 100644
--- a/Source/WebKit2/UIProcess/WebFrameProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebFrameProxy.cpp
@@ -29,6 +29,7 @@
 #include "WebContext.h"
 #include "WebFormSubmissionListenerProxy.h"
 #include "WebFramePolicyListenerProxy.h"
+#include "WebPageMessages.h"
 #include "WebPageProxy.h"
 #include <WebCore/DOMImplementation.h>
 #include <WebCore/Image.h>
@@ -81,6 +82,17 @@ bool WebFrameProxy::isMainFrame() const
     return this == m_page->mainFrame();
 }
 
+void WebFrameProxy::stopLoading() const
+{
+    if (!m_page)
+        return;
+
+    if (!m_page->isValid())
+        return;
+
+    m_page->process()->send(Messages::WebPage::StopLoadingFrame(m_frameID), m_page->pageID());
+}
+    
 bool WebFrameProxy::canProvideSource() const
 {
     return isDisplayingMarkupDocument();
diff --git a/Source/WebKit2/UIProcess/WebFrameProxy.h b/Source/WebKit2/UIProcess/WebFrameProxy.h
index ae97a78..6cc2130 100644
--- a/Source/WebKit2/UIProcess/WebFrameProxy.h
+++ b/Source/WebKit2/UIProcess/WebFrameProxy.h
@@ -86,6 +86,8 @@ public:
     bool isFrameSet() const { return m_isFrameSet; }
 
     LoadState loadState() const { return m_loadState; }
+    
+    void stopLoading() const;
 
     const String& url() const { return m_url; }
     const String& provisionalURL() const { return m_provisionalURL; }
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index a96a282..af236e9 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -439,6 +439,15 @@ void WebPage::loadPlainTextString(const String& string)
     loadData(sharedBuffer, "text/plain", "utf-16", blankURL(), KURL());
 }
 
+void WebPage::stopLoadingFrame(uint64_t frameID)
+{
+    WebFrame* frame = WebProcess::shared().webFrame(frameID);
+    if (!frame)
+        return;
+
+    frame->coreFrame()->loader()->stopForUserCancel();
+}
+
 void WebPage::stopLoading()
 {
     m_mainFrame->coreFrame()->loader()->stopForUserCancel();
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.h b/Source/WebKit2/WebProcess/WebPage/WebPage.h
index d2d8754..d29400f 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.h
@@ -200,6 +200,7 @@ public:
     bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
 
     void stopLoading();
+    void stopLoadingFrame(uint64_t frameID);
     void setDefersLoading(bool deferLoading);
 
 #if USE(ACCELERATED_COMPOSITING)
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
index 3272886..e001864 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
@@ -46,6 +46,8 @@ messages -> WebPage {
     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
     Reload(bool reloadFromOrigin)
     StopLoading()
+
+    StopLoadingFrame(uint64_t frameID)
     
     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list