Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Unified Diff: Source/core/dom/Element.cpp

Issue 27183013: Use [ImplementedAs=domWindow] for Document.defaultView() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.idl ('k') | Source/core/dom/NamedFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « Source/core/dom/Document.idl ('k') | Source/core/dom/NamedFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698