summaryrefslogtreecommitdiffstats
path: root/WebKit/win/WebFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/win/WebFrame.cpp')
-rw-r--r--WebKit/win/WebFrame.cpp38
1 files changed, 32 insertions, 6 deletions
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index e50a830..6bdf51e 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -94,6 +94,7 @@
#include <WebCore/TextIterator.h>
#include <WebCore/JSDOMBinding.h>
#include <WebCore/ScriptController.h>
+#include <WebCore/SecurityOrigin.h>
#include <JavaScriptCore/APICast.h>
#include <wtf/MathExtras.h>
#pragma warning(pop)
@@ -304,6 +305,16 @@ HRESULT STDMETHODCALLTYPE WebFrame::setExcludeFromTextSearch(
return E_FAIL;
}
+HRESULT WebFrame::reloadFromOrigin()
+{
+ Frame* coreFrame = core(this);
+ if (!coreFrame)
+ return E_FAIL;
+
+ coreFrame->loader()->reload(true);
+ return S_OK;
+}
+
HRESULT STDMETHODCALLTYPE WebFrame::paintDocumentRectToContext(
/* [in] */ RECT rect,
/* [in] */ OLE_HANDLE deviceContext)
@@ -1138,6 +1149,21 @@ HRESULT WebFrame::isDisplayingStandaloneImage(BOOL* result)
return S_OK;
}
+HRESULT WebFrame::allowsFollowingLink(BSTR url, BOOL* result)
+{
+ if (!result)
+ return E_POINTER;
+
+ *result = TRUE;
+
+ Frame* frame = core(this);
+ if (!frame)
+ return E_FAIL;
+
+ *result = SecurityOrigin::canLoad(MarshallingHelpers::BSTRToKURL(url), String(), frame->document());
+ return S_OK;
+}
+
HRESULT WebFrame::controlsInForm(IDOMElement* form, IDOMElement** controls, int* cControls)
{
if (!form)
@@ -1315,7 +1341,7 @@ void WebFrame::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<F
COMPtr<IWebFormDelegate> formDelegate;
if (FAILED(d->webView->formDelegate(&formDelegate))) {
- (coreFrame->loader()->*function)(PolicyUse);
+ (coreFrame->loader()->policyChecker()->*function)(PolicyUse);
return;
}
@@ -1334,7 +1360,7 @@ void WebFrame::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<F
return;
// FIXME: Add a sane default implementation
- (coreFrame->loader()->*function)(PolicyUse);
+ (coreFrame->loader()->policyChecker()->*function)(PolicyUse);
}
void WebFrame::revertToProvisionalState(DocumentLoader*)
@@ -1500,7 +1526,7 @@ void WebFrame::receivedPolicyDecision(PolicyAction action)
Frame* coreFrame = core(this);
ASSERT(coreFrame);
- (coreFrame->loader()->*function)(action);
+ (coreFrame->loader()->policyChecker()->*function)(action);
}
void WebFrame::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String& mimeType, const ResourceRequest& request)
@@ -1517,7 +1543,7 @@ void WebFrame::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, con
if (SUCCEEDED(policyDelegate->decidePolicyForMIMEType(d->webView, BString(mimeType), urlRequest.get(), this, setUpPolicyListener(function).get())))
return;
- (coreFrame->loader()->*function)(PolicyUse);
+ (coreFrame->loader()->policyChecker()->*function)(PolicyUse);
}
void WebFrame::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request, PassRefPtr<FormState> formState, const String& frameName)
@@ -1535,7 +1561,7 @@ void WebFrame::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction functi
if (SUCCEEDED(policyDelegate->decidePolicyForNewWindowAction(d->webView, actionInformation.get(), urlRequest.get(), BString(frameName), setUpPolicyListener(function).get())))
return;
- (coreFrame->loader()->*function)(PolicyUse);
+ (coreFrame->loader()->policyChecker()->*function)(PolicyUse);
}
void WebFrame::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request, PassRefPtr<FormState> formState)
@@ -1553,7 +1579,7 @@ void WebFrame::dispatchDecidePolicyForNavigationAction(FramePolicyFunction funct
if (SUCCEEDED(policyDelegate->decidePolicyForNavigationAction(d->webView, actionInformation.get(), urlRequest.get(), this, setUpPolicyListener(function).get())))
return;
- (coreFrame->loader()->*function)(PolicyUse);
+ (coreFrame->loader()->policyChecker()->*function)(PolicyUse);
}
void WebFrame::dispatchUnableToImplementPolicy(const ResourceError& error)