Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index 410231b47d2a01365fa606c17fb6b5e691a25103..0056f331f0683c629dd46779e76aee089edb8893 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -2285,7 +2285,7 @@ void Node::dispatchSubtreeModifiedEvent() |
bool Node::dispatchDOMActivateEvent(int detail, PassRefPtr<Event> underlyingEvent) |
{ |
ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); |
- RefPtr<UIEvent> event = UIEvent::create(EventTypeNames::DOMActivate, true, true, document().defaultView(), detail); |
+ RefPtr<UIEvent> event = UIEvent::create(EventTypeNames::DOMActivate, true, true, document().domWindow(), detail); |
event->setUnderlyingEvent(underlyingEvent); |
dispatchScopedEvent(event); |
return event->defaultHandled(); |
@@ -2293,18 +2293,18 @@ bool Node::dispatchDOMActivateEvent(int detail, PassRefPtr<Event> underlyingEven |
bool Node::dispatchKeyEvent(const PlatformKeyboardEvent& event) |
{ |
- return EventDispatcher::dispatchEvent(this, KeyboardEventDispatchMediator::create(KeyboardEvent::create(event, document().defaultView()))); |
+ return EventDispatcher::dispatchEvent(this, KeyboardEventDispatchMediator::create(KeyboardEvent::create(event, document().domWindow()))); |
} |
bool Node::dispatchMouseEvent(const PlatformMouseEvent& event, const AtomicString& eventType, |
int detail, Node* relatedTarget) |
{ |
- return EventDispatcher::dispatchEvent(this, MouseEventDispatchMediator::create(MouseEvent::create(eventType, document().defaultView(), event, detail, relatedTarget))); |
+ return EventDispatcher::dispatchEvent(this, MouseEventDispatchMediator::create(MouseEvent::create(eventType, document().domWindow(), event, detail, relatedTarget))); |
} |
bool Node::dispatchGestureEvent(const PlatformGestureEvent& event) |
{ |
- RefPtr<GestureEvent> gestureEvent = GestureEvent::create(document().defaultView(), event); |
+ RefPtr<GestureEvent> gestureEvent = GestureEvent::create(document().domWindow(), event); |
if (!gestureEvent.get()) |
return false; |
return EventDispatcher::dispatchEvent(this, GestureEventDispatchMediator::create(gestureEvent)); |
@@ -2333,7 +2333,7 @@ bool Node::dispatchBeforeLoadEvent(const String& sourceURL) |
bool Node::dispatchWheelEvent(const PlatformWheelEvent& event) |
{ |
- return EventDispatcher::dispatchEvent(this, WheelEventDispatchMediator::create(event, document().defaultView())); |
+ return EventDispatcher::dispatchEvent(this, WheelEventDispatchMediator::create(event, document().domWindow())); |
} |
void Node::dispatchChangeEvent() |