Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index bfa70c0d8e1133af815cb29e83cb811d7ab10ed0..d705adefd437bb57d085ab221b52f92b64dceb07 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -2185,13 +2185,13 @@ bool Element::isMouseFocusable() const |
void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusDirection) |
{ |
- RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false, false, document().defaultView(), 0, oldFocusedElement); |
+ RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false, false, document().domWindow(), 0, oldFocusedElement); |
EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(event.release())); |
} |
void Element::dispatchBlurEvent(Element* newFocusedElement) |
{ |
- RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::blur, false, false, document().defaultView(), 0, newFocusedElement); |
+ RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::blur, false, false, document().domWindow(), 0, newFocusedElement); |
EventDispatcher::dispatchEvent(this, BlurEventDispatchMediator::create(event.release())); |
} |
@@ -2199,14 +2199,14 @@ void Element::dispatchFocusInEvent(const AtomicString& eventType, Element* oldFo |
{ |
ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); |
ASSERT(eventType == EventTypeNames::focusin || eventType == EventTypeNames::DOMFocusIn); |
- dispatchScopedEventDispatchMediator(FocusInEventDispatchMediator::create(FocusEvent::create(eventType, true, false, document().defaultView(), 0, oldFocusedElement))); |
+ dispatchScopedEventDispatchMediator(FocusInEventDispatchMediator::create(FocusEvent::create(eventType, true, false, document().domWindow(), 0, oldFocusedElement))); |
} |
void Element::dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocusedElement) |
{ |
ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); |
ASSERT(eventType == EventTypeNames::focusout || eventType == EventTypeNames::DOMFocusOut); |
- dispatchScopedEventDispatchMediator(FocusOutEventDispatchMediator::create(FocusEvent::create(eventType, true, false, document().defaultView(), 0, newFocusedElement))); |
+ dispatchScopedEventDispatchMediator(FocusOutEventDispatchMediator::create(FocusEvent::create(eventType, true, false, document().domWindow(), 0, newFocusedElement))); |
} |
String Element::innerText() |