summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp
index 2c5f882825..74b290d6b0 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp
@@ -28,9 +28,13 @@
#include "Frame.h"
#include "FrameLoader.h"
#include "FrameTree.h"
+#include "History.h"
#include "JSDOMWindowShell.h"
#include "JSEventListener.h"
+#include "JSHistory.h"
+#include "JSLocation.h"
#include "JSMessagePort.h"
+#include "Location.h"
#include "MessagePort.h"
#include "ScriptController.h"
#include "Settings.h"
@@ -124,6 +128,28 @@ JSValuePtr JSDOMWindow::lookupSetter(ExecState* exec, const Identifier& property
return Base::lookupSetter(exec, propertyName);
}
+JSValuePtr JSDOMWindow::history(ExecState* exec) const
+{
+ History* history = impl()->history();
+ if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), history))
+ return wrapper;
+
+ JSHistory* jsHistory = new (exec) JSHistory(getDOMStructure<JSHistory>(exec, const_cast<JSDOMWindow*>(this)), history);
+ cacheDOMObjectWrapper(exec->globalData(), history, jsHistory);
+ return jsHistory;
+}
+
+JSValuePtr JSDOMWindow::location(ExecState* exec) const
+{
+ Location* location = impl()->location();
+ if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), location))
+ return wrapper;
+
+ JSLocation* jsLocation = new (exec) JSLocation(getDOMStructure<JSLocation>(exec, const_cast<JSDOMWindow*>(this)), location);
+ cacheDOMObjectWrapper(exec->globalData(), location, jsLocation);
+ return jsLocation;
+}
+
void JSDOMWindow::setLocation(ExecState* exec, JSValuePtr value)
{
Frame* activeFrame = asJSDOMWindow(exec->dynamicGlobalObject())->impl()->frame();