https://bugs.webkit.org/show_bug.cgi?id=89974
Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-29
Reviewed by Anders Carlsson.
Move the intent delivery code from the frame to the page
and add the corresponding C API for WKPage.
* UIProcess/API/C/WKPage.cpp:
(WKPageDeliverIntentToFrame):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::stopLoading):
* UIProcess/WebFrameProxy.h:
(WebKit):
* UIProcess/WebPageProxy.cpp:
(WebKit):
(WebKit::WebPageProxy::deliverIntentToFrame):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121590
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-06-29 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2] Move intent delivery code from the frame to the page
+ https://bugs.webkit.org/show_bug.cgi?id=89974
+
+ Reviewed by Anders Carlsson.
+
+ Move the intent delivery code from the frame to the page
+ and add the corresponding C API for WKPage.
+
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageDeliverIntentToFrame):
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/WebFrameProxy.cpp:
+ (WebKit::WebFrameProxy::stopLoading):
+ * UIProcess/WebFrameProxy.h:
+ (WebKit):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit):
+ (WebKit::WebPageProxy::deliverIntentToFrame):
+ * UIProcess/WebPageProxy.h:
+ (WebPageProxy):
+
2012-06-29 Dan Bernstein <mitz@apple.com>
Can’t get basic element info from a WKRenderObject
}
#endif
+void WKPageDeliverIntentToFrame(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent)
+{
+#if ENABLE(WEB_INTENTS)
+ toImpl(page)->deliverIntentToFrame(toImpl(frame), toImpl(intent));
+#endif
+}
+
WKImageRef WKPageCreateSnapshotOfVisibleContent(WKPageRef)
{
return 0;
typedef void (*WKPageForceRepaintFunction)(WKErrorRef, void*);
WK_EXPORT void WKPageForceRepaint(WKPageRef page, void* context, WKPageForceRepaintFunction function);
+WK_EXPORT void WKPageDeliverIntentToFrame(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent);
+
/*
Some of the more common command name strings include the following, although any WebCore EditorCommand string is supported:
#include <stdio.h>
#include <wtf/text/WTFString.h>
-#if ENABLE(WEB_INTENTS)
-#include "WebIntentData.h"
-#endif
-
using namespace WebCore;
using namespace std;
m_page->process()->send(Messages::WebPage::StopLoadingFrame(m_frameID), m_page->pageID());
}
-
-#if ENABLE(WEB_INTENTS)
-void WebFrameProxy::deliverIntent(WebIntentData* webIntentData)
-{
- if (!m_page)
- return;
-
- if (!m_page->isValid())
- return;
-
- m_page->process()->send(Messages::WebPage::DeliverIntentToFrame(m_frameID, webIntentData->store()), m_page->pageID());
-}
-#endif
bool WebFrameProxy::canProvideSource() const
{
class WebFramePolicyListenerProxy;
class WebPageProxy;
-#if ENABLE(WEB_INTENTS)
-class WebIntentData;
-#endif
-
typedef GenericCallback<WKDataRef> DataCallback;
class WebFrameProxy : public APIObject {
bool isFrameSet() const { return m_isFrameSet; }
LoadState loadState() const { return m_loadState; }
-
-#if ENABLE(WEB_INTENTS)
- void deliverIntent(WebIntentData*);
-#endif
void stopLoading() const;
process()->send(Messages::WebPage::GetSourceForFrame(frame->frameID(), callbackID), m_pageID);
}
+#if ENABLE(WEB_INTENTS)
+void WebPageProxy::deliverIntentToFrame(WebFrameProxy* frame, WebIntentData* webIntentData)
+{
+ if (!isValid())
+ return;
+
+ process()->send(Messages::WebPage::DeliverIntentToFrame(frame->frameID(), webIntentData->store()), m_pageID);
+}
+#endif
+
void WebPageProxy::getContentsAsString(PassRefPtr<StringCallback> prpCallback)
{
RefPtr<StringCallback> callback = prpCallback;
typedef Evas_Object* PlatformWidget;
#endif
+#if ENABLE(WEB_INTENTS)
+class WebIntentData;
+#endif
+
namespace WebKit {
class NativeWebKeyboardEvent;
void runJavaScriptInMainFrame(const String&, PassRefPtr<ScriptValueCallback>);
void forceRepaint(PassRefPtr<VoidCallback>);
+#if ENABLE(WEB_INTENTS)
+ void deliverIntentToFrame(WebFrameProxy*, WebIntentData*);
+#endif
+
float headerHeight(WebFrameProxy*);
float footerHeight(WebFrameProxy*);
void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);