summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/DOMWindow.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-03-12 14:11:15 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-03-12 14:11:15 +0100
commitdd91e772430dc294e3bf478c119ef8d43c0a3358 (patch)
tree6f33ce4d5872a5691e0291eb45bf6ab373a5f567 /Source/WebCore/page/DOMWindow.cpp
parentad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (diff)
downloadqtwebkit-dd91e772430dc294e3bf478c119ef8d43c0a3358.tar.gz
Imported WebKit commit 3db4eb1820ac8fb03065d7ea73a4d9db1e8fea1a (http://svn.webkit.org/repository/webkit/trunk@110422)
This includes build fixes for the latest qtbase/qtdeclarative as well as the final QML2 API.
Diffstat (limited to 'Source/WebCore/page/DOMWindow.cpp')
-rw-r--r--Source/WebCore/page/DOMWindow.cpp34
1 files changed, 12 insertions, 22 deletions
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index 051bbf0db..eec969ff6 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -65,8 +65,6 @@
#include "FrameView.h"
#include "HTMLFrameOwnerElement.h"
#include "History.h"
-#include "IDBFactory.h"
-#include "IDBFactoryBackendInterface.h"
#include "InspectorInstrumentation.h"
#include "KURL.h"
#include "Location.h"
@@ -420,9 +418,6 @@ DOMWindow::~DOMWindow()
#if ENABLE(NOTIFICATIONS)
ASSERT(!m_notifications);
#endif
-#if ENABLE(INDEXED_DATABASE)
- ASSERT(!m_idbFactory);
-#endif
#if ENABLE(BLOB)
ASSERT(!m_domURL);
#endif
@@ -463,6 +458,11 @@ void DOMWindow::setSecurityOrigin(SecurityOrigin* securityOrigin)
m_securityOrigin = securityOrigin;
}
+Page* DOMWindow::page()
+{
+ return frame() ? frame()->page() : 0;
+}
+
void DOMWindow::frameDestroyed()
{
FrameDestructionObserver::frameDestroyed();
@@ -526,9 +526,6 @@ void DOMWindow::clear()
// the rest of the DOMWindowProperties.
resetNotifications();
#endif
-#if ENABLE(INDEXED_DATABASE)
- m_idbFactory = 0;
-#endif
#if ENABLE(BLOB)
m_domURL = 0;
#endif
@@ -719,7 +716,7 @@ NotificationCenter* DOMWindow::webkitNotifications() const
if (!page)
return 0;
- NotificationPresenter* provider = NotificationController::clientFrom(page);
+ NotificationClient* provider = NotificationController::clientFrom(page);
if (provider)
m_notifications = NotificationCenter::create(document, provider);
@@ -735,13 +732,6 @@ void DOMWindow::resetNotifications()
}
#endif
-#if ENABLE(INDEXED_DATABASE)
-void DOMWindow::setIDBFactory(PassRefPtr<IDBFactory> idbFactory)
-{
- m_idbFactory = idbFactory;
-}
-#endif
-
void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort* port, const String& targetOrigin, DOMWindow* source, ExceptionCode& ec)
{
MessagePortArray ports;
@@ -1494,10 +1484,10 @@ bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<Event
addBeforeUnloadEventListener(this);
#if ENABLE(DEVICE_ORIENTATION)
else if (eventType == eventNames().devicemotionEvent) {
- if (DeviceMotionController* controller = DeviceMotionController::from(frame()))
+ if (DeviceMotionController* controller = DeviceMotionController::from(page()))
controller->addListener(this);
} else if (eventType == eventNames().deviceorientationEvent) {
- if (DeviceOrientationController* controller = DeviceOrientationController::from(frame()))
+ if (DeviceOrientationController* controller = DeviceOrientationController::from(page()))
controller->addListener(this);
}
#endif
@@ -1521,10 +1511,10 @@ bool DOMWindow::removeEventListener(const AtomicString& eventType, EventListener
removeBeforeUnloadEventListener(this);
#if ENABLE(DEVICE_ORIENTATION)
else if (eventType == eventNames().devicemotionEvent) {
- if (DeviceMotionController* controller = DeviceMotionController::from(frame()))
+ if (DeviceMotionController* controller = DeviceMotionController::from(page()))
controller->removeListener(this);
} else if (eventType == eventNames().deviceorientationEvent) {
- if (DeviceOrientationController* controller = DeviceOrientationController::from(frame()))
+ if (DeviceOrientationController* controller = DeviceOrientationController::from(page()))
controller->removeListener(this);
}
#endif
@@ -1579,9 +1569,9 @@ void DOMWindow::removeAllEventListeners()
EventTarget::removeAllEventListeners();
#if ENABLE(DEVICE_ORIENTATION)
- if (DeviceMotionController* controller = DeviceMotionController::from(frame()))
+ if (DeviceMotionController* controller = DeviceMotionController::from(page()))
controller->removeAllListeners(this);
- if (DeviceOrientationController* controller = DeviceOrientationController::from(frame()))
+ if (DeviceOrientationController* controller = DeviceOrientationController::from(page()))
controller->removeAllListeners(this);
#endif