summaryrefslogtreecommitdiffstats
path: root/WebKit/wx/WebFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/wx/WebFrame.cpp')
-rw-r--r--WebKit/wx/WebFrame.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp
index bd983f6..6cda197 100644
--- a/WebKit/wx/WebFrame.cpp
+++ b/WebKit/wx/WebFrame.cpp
@@ -24,6 +24,7 @@
*/
#include "config.h"
+#include "BackForwardList.h"
#include "CString.h"
#include "Document.h"
#include "Editor.h"
@@ -33,6 +34,7 @@
#include "FrameLoader.h"
#include "FrameView.h"
#include "HitTestResult.h"
+#include "HostWindow.h"
#include "HTMLFrameOwnerElement.h"
#include "markup.h"
#include "Page.h"
@@ -90,6 +92,13 @@ wxWebFrame::wxWebFrame(wxWebView* container, wxWebFrame* parent, WebViewFrameDat
m_impl->frame = newFrame.get();
+ if (data)
+ newFrame->tree()->setName(data->name);
+
+ // Subframes expect to be added to the FrameTree before init is called.
+ if (parentFrame)
+ parentFrame->document()->frame()->tree()->appendChild(newFrame.get());
+
loaderClient->setFrame(this);
loaderClient->setWebView(container);
@@ -192,7 +201,7 @@ wxString wxWebFrame::RunScript(const wxString& javascript)
wxASSERT_MSG(hasLoaded, wxT("Document must be loaded before calling RunScript."));
if (hasLoaded) {
WebCore::ScriptController* controller = m_impl->frame->script();
- bool jsEnabled = controller->isEnabled();
+ bool jsEnabled = controller->canExecuteScripts();
wxASSERT_MSG(jsEnabled, wxT("RunScript requires JavaScript to be enabled."));
if (jsEnabled) {
JSC::JSValue result = controller->executeScript(javascript, true).jsValue();
@@ -409,3 +418,11 @@ bool wxWebFrame::ShouldClose() const
return true;
}
+
+wxWebKitParseMode wxWebFrame::GetParseMode() const
+{
+ if (m_impl->frame && m_impl->frame->document())
+ return (wxWebKitParseMode)m_impl->frame->document()->parseMode();
+
+ return NoDocument;
+}