Index: Source/core/page/EventHandler.cpp |
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp |
index 0fbfe2a174f6aa2e60eb249e23f2d635526e7207..90de2cccd3f3a53c897011f6b19d347f273f026d 100644 |
--- a/Source/core/page/EventHandler.cpp |
+++ b/Source/core/page/EventHandler.cpp |
@@ -1741,7 +1741,7 @@ bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa |
view->resetDeferredRepaintDelay(); |
RefPtr<MouseEvent> me = MouseEvent::create(eventType, |
- true, true, m_frame->document()->defaultView(), |
+ true, true, m_frame->document()->domWindow(), |
0, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), |
event.movementDelta().x(), event.movementDelta().y(), |
event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), |
@@ -3040,7 +3040,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) |
PlatformKeyboardEvent keyDownEvent = initialKeyEvent; |
if (keyDownEvent.type() != PlatformEvent::RawKeyDown) |
keyDownEvent.disambiguateKeyDownEvent(PlatformEvent::RawKeyDown); |
- RefPtr<KeyboardEvent> keydown = KeyboardEvent::create(keyDownEvent, m_frame->document()->defaultView()); |
+ RefPtr<KeyboardEvent> keydown = KeyboardEvent::create(keyDownEvent, m_frame->document()->domWindow()); |
if (matchedAnAccessKey) |
keydown->setDefaultPrevented(true); |
keydown->setTarget(node); |
@@ -3069,7 +3069,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) |
keyPressEvent.disambiguateKeyDownEvent(PlatformEvent::Char); |
if (keyPressEvent.text().isEmpty()) |
return keydownResult; |
- RefPtr<KeyboardEvent> keypress = KeyboardEvent::create(keyPressEvent, m_frame->document()->defaultView()); |
+ RefPtr<KeyboardEvent> keypress = KeyboardEvent::create(keyPressEvent, m_frame->document()->domWindow()); |
keypress->setTarget(node); |
if (keydownResult) |
keypress->setDefaultPrevented(true); |
@@ -3753,8 +3753,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event) |
RefPtr<TouchEvent> touchEvent = |
TouchEvent::create(effectiveTouches.get(), targetTouches.get(), changedTouches[state].m_touches.get(), |
- stateName, touchEventTarget->toNode()->document().defaultView(), |
- 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey()); |
+ stateName, touchEventTarget->toNode()->document().domWindow(), |
+ 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey()); |
touchEventTarget->toNode()->dispatchTouchEvent(touchEvent.get()); |
swallowedEvent = swallowedEvent || touchEvent->defaultPrevented() || touchEvent->defaultHandled(); |
} |