summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/WebPage/WebFrame.h
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-08-25 19:20:41 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:30:55 +0000
commit6882a04fb36642862b11efe514251d32070c3d65 (patch)
treeb7959826000b061fd5ccc7512035c7478742f7b0 /Source/WebKit2/WebProcess/WebPage/WebFrame.h
parentab6df191029eeeb0b0f16f127d553265659f739e (diff)
downloadqtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/WebFrame.h')
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebFrame.h59
1 files changed, 42 insertions, 17 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/WebFrame.h b/Source/WebKit2/WebProcess/WebPage/WebFrame.h
index bf69ba19a..4e3a0b7a4 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebFrame.h
+++ b/Source/WebKit2/WebProcess/WebPage/WebFrame.h
@@ -27,7 +27,8 @@
#define WebFrame_h
#include "APIObject.h"
-#include "ImmutableArray.h"
+#include "DownloadID.h"
+#include "ShareableBitmap.h"
#include "WKBase.h"
#include "WebFrameLoaderClient.h"
#include <JavaScriptCore/JSBase.h>
@@ -39,25 +40,32 @@
#include <wtf/RefPtr.h>
#include <wtf/RetainPtr.h>
+namespace API {
+class Array;
+}
+
namespace WebCore {
+class CertificateInfo;
class Frame;
class HTMLFrameOwnerElement;
class IntPoint;
class IntRect;
-class KURL;
+class SessionID;
+class URL;
}
namespace WebKit {
+class InjectedBundleFileHandle;
class InjectedBundleHitTestResult;
class InjectedBundleNodeHandle;
class InjectedBundleRangeHandle;
class InjectedBundleScriptWorld;
class WebPage;
-class WebFrame : public TypedAPIObject<APIObject::TypeBundleFrame> {
+class WebFrame : public API::ObjectImpl<API::Object::Type::BundleFrame> {
public:
- static PassRefPtr<WebFrame> createMainFrame(WebPage*);
+ static PassRefPtr<WebFrame> createWithCoreMainFrame(WebPage*, WebCore::Frame*);
static PassRefPtr<WebFrame> createSubframe(WebPage*, const String& frameName, WebCore::HTMLFrameOwnerElement*);
~WebFrame();
@@ -65,16 +73,18 @@ public:
void invalidate();
WebPage* page() const;
+
+ static WebFrame* fromCoreFrame(WebCore::Frame&);
WebCore::Frame* coreFrame() const { return m_coreFrame; }
uint64_t frameID() const { return m_frameID; }
uint64_t setUpPolicyListener(WebCore::FramePolicyFunction);
void invalidatePolicyListener();
- void didReceivePolicyDecision(uint64_t listenerID, WebCore::PolicyAction, uint64_t downloadID);
+ void didReceivePolicyDecision(uint64_t listenerID, WebCore::PolicyAction, uint64_t navigationID, DownloadID);
void startDownload(const WebCore::ResourceRequest&);
- void convertMainResourceLoadToDownload(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
+ void convertMainResourceLoadToDownload(WebCore::DocumentLoader*, WebCore::SessionID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
String source() const;
String contentsAsString() const;
@@ -86,10 +96,11 @@ public:
bool isMainFrame() const;
String name() const;
String url() const;
+ WebCore::CertificateInfo certificateInfo() const;
String innerText() const;
bool isFrameSet() const;
WebFrame* parentFrame() const;
- PassRefPtr<ImmutableArray> childFrames();
+ Ref<API::Array> childFrames();
JSGlobalContextRef jsContext();
JSGlobalContextRef jsContextForWorld(InjectedBundleScriptWorld*);
WebCore::IntRect contentBounds() const;
@@ -104,11 +115,14 @@ public:
bool containsAnyFormControls() const;
void stopLoading();
bool handlesPageScaleGesture() const;
+ bool requiresUnifiedScaleFactor() const;
+ void setAccessibleName(const String&);
static WebFrame* frameForContext(JSContextRef);
JSValueRef jsWrapperForWorld(InjectedBundleNodeHandle*, InjectedBundleScriptWorld*);
JSValueRef jsWrapperForWorld(InjectedBundleRangeHandle*, InjectedBundleScriptWorld*);
+ JSValueRef jsWrapperForWorld(InjectedBundleFileHandle*, InjectedBundleScriptWorld*);
static String counterValue(JSObjectRef element);
@@ -116,14 +130,16 @@ public:
unsigned pendingUnloadCount() const;
- bool allowsFollowingLink(const WebCore::KURL&) const;
+ bool allowsFollowingLink(const WebCore::URL&) const;
String provisionalURL() const;
- String suggestedFilenameForResourceWithURL(const WebCore::KURL&) const;
- String mimeTypeForResourceWithURL(const WebCore::KURL&) const;
+ String suggestedFilenameForResourceWithURL(const WebCore::URL&) const;
+ String mimeTypeForResourceWithURL(const WebCore::URL&) const;
void setTextDirection(const String&);
+ void documentLoaderDetached(uint64_t navigationID);
+
// Simple listener class used by plug-ins to know when frames finish or fail loading.
class LoadListener {
public:
@@ -135,27 +151,36 @@ public:
void setLoadListener(LoadListener* loadListener) { m_loadListener = loadListener; }
LoadListener* loadListener() const { return m_loadListener; }
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
typedef bool (*FrameFilterFunction)(WKBundleFrameRef, WKBundleFrameRef subframe, void* context);
RetainPtr<CFDataRef> webArchiveData(FrameFilterFunction, void* context);
#endif
-private:
- static PassRefPtr<WebFrame> create();
- WebFrame();
+ PassRefPtr<ShareableBitmap> createSelectionSnapshot() const;
- void init(WebPage*, const String& frameName, WebCore::HTMLFrameOwnerElement*);
+#if PLATFORM(IOS)
+ uint64_t firstLayerTreeTransactionIDAfterDidCommitLoad() const { return m_firstLayerTreeTransactionIDAfterDidCommitLoad; }
+ void setFirstLayerTreeTransactionIDAfterDidCommitLoad(uint64_t transactionID) { m_firstLayerTreeTransactionIDAfterDidCommitLoad = transactionID; }
+#endif
+
+private:
+ static PassRefPtr<WebFrame> create(std::unique_ptr<WebFrameLoaderClient>);
+ WebFrame(std::unique_ptr<WebFrameLoaderClient>);
WebCore::Frame* m_coreFrame;
uint64_t m_policyListenerID;
WebCore::FramePolicyFunction m_policyFunction;
- uint64_t m_policyDownloadID;
+ DownloadID m_policyDownloadID;
- WebFrameLoaderClient m_frameLoaderClient;
+ std::unique_ptr<WebFrameLoaderClient> m_frameLoaderClient;
LoadListener* m_loadListener;
uint64_t m_frameID;
+
+#if PLATFORM(IOS)
+ uint64_t m_firstLayerTreeTransactionIDAfterDidCommitLoad;
+#endif
};
} // namespace WebKit