| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2355 return isFocusable(); | 2355 return isFocusable(); |
| 2356 } | 2356 } |
| 2357 | 2357 |
| 2358 bool Element::isFocusedElementInDocument() const | 2358 bool Element::isFocusedElementInDocument() const |
| 2359 { | 2359 { |
| 2360 return this == document().focusedElement(); | 2360 return this == document().focusedElement(); |
| 2361 } | 2361 } |
| 2362 | 2362 |
| 2363 void Element::dispatchFocusEvent(Element* oldFocusedElement, WebFocusType type) | 2363 void Element::dispatchFocusEvent(Element* oldFocusedElement, WebFocusType type) |
| 2364 { | 2364 { |
| 2365 RefPtrWillBeRawPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::fo
cus, false, false, document().domWindow(), 0, oldFocusedElement); | 2365 dispatchEvent(FocusEvent::create(EventTypeNames::focus, false, false, docume
nt().domWindow(), 0, oldFocusedElement)); |
| 2366 EventDispatcher::dispatchEvent(*this, FocusEventDispatchMediator::create(eve
nt.release())); | |
| 2367 } | 2366 } |
| 2368 | 2367 |
| 2369 void Element::dispatchBlurEvent(Element* newFocusedElement, WebFocusType type) | 2368 void Element::dispatchBlurEvent(Element* newFocusedElement, WebFocusType type) |
| 2370 { | 2369 { |
| 2371 RefPtrWillBeRawPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::bl
ur, false, false, document().domWindow(), 0, newFocusedElement); | 2370 dispatchEvent(FocusEvent::create(EventTypeNames::blur, false, false, documen
t().domWindow(), 0, newFocusedElement)); |
| 2372 EventDispatcher::dispatchEvent(*this, BlurEventDispatchMediator::create(even
t.release())); | |
| 2373 } | 2371 } |
| 2374 | 2372 |
| 2375 void Element::dispatchFocusInEvent(const AtomicString& eventType, Element* oldFo
cusedElement, WebFocusType) | 2373 void Element::dispatchFocusInEvent(const AtomicString& eventType, Element* oldFo
cusedElement, WebFocusType) |
| 2376 { | 2374 { |
| 2377 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); | 2375 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
| 2378 ASSERT(eventType == EventTypeNames::focusin || eventType == EventTypeNames::
DOMFocusIn); | 2376 ASSERT(eventType == EventTypeNames::focusin || eventType == EventTypeNames::
DOMFocusIn); |
| 2379 dispatchScopedEventDispatchMediator(FocusInEventDispatchMediator::create(Foc
usEvent::create(eventType, true, false, document().domWindow(), 0, oldFocusedEle
ment))); | 2377 dispatchScopedEvent(FocusEvent::create(eventType, true, false, document().do
mWindow(), 0, oldFocusedElement)); |
| 2380 } | 2378 } |
| 2381 | 2379 |
| 2382 void Element::dispatchFocusOutEvent(const AtomicString& eventType, Element* newF
ocusedElement) | 2380 void Element::dispatchFocusOutEvent(const AtomicString& eventType, Element* newF
ocusedElement) |
| 2383 { | 2381 { |
| 2384 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); | 2382 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
| 2385 ASSERT(eventType == EventTypeNames::focusout || eventType == EventTypeNames:
:DOMFocusOut); | 2383 ASSERT(eventType == EventTypeNames::focusout || eventType == EventTypeNames:
:DOMFocusOut); |
| 2386 dispatchScopedEventDispatchMediator(FocusOutEventDispatchMediator::create(Fo
cusEvent::create(eventType, true, false, document().domWindow(), 0, newFocusedEl
ement))); | 2384 dispatchScopedEvent(FocusEvent::create(eventType, true, false, document().do
mWindow(), 0, newFocusedElement)); |
| 2387 } | 2385 } |
| 2388 | 2386 |
| 2389 String Element::innerHTML() const | 2387 String Element::innerHTML() const |
| 2390 { | 2388 { |
| 2391 return createMarkup(this, ChildrenOnly); | 2389 return createMarkup(this, ChildrenOnly); |
| 2392 } | 2390 } |
| 2393 | 2391 |
| 2394 String Element::outerHTML() const | 2392 String Element::outerHTML() const |
| 2395 { | 2393 { |
| 2396 return createMarkup(this); | 2394 return createMarkup(this); |
| (...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3451 { | 3449 { |
| 3452 #if ENABLE(OILPAN) | 3450 #if ENABLE(OILPAN) |
| 3453 if (hasRareData()) | 3451 if (hasRareData()) |
| 3454 visitor->trace(elementRareData()); | 3452 visitor->trace(elementRareData()); |
| 3455 visitor->trace(m_elementData); | 3453 visitor->trace(m_elementData); |
| 3456 #endif | 3454 #endif |
| 3457 ContainerNode::trace(visitor); | 3455 ContainerNode::trace(visitor); |
| 3458 } | 3456 } |
| 3459 | 3457 |
| 3460 } // namespace blink | 3458 } // namespace blink |
| OLD | NEW |