| 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 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2178 return isFocusable() && tabIndex() >= 0; | 2178 return isFocusable() && tabIndex() >= 0; |
| 2179 } | 2179 } |
| 2180 | 2180 |
| 2181 bool Element::isMouseFocusable() const | 2181 bool Element::isMouseFocusable() const |
| 2182 { | 2182 { |
| 2183 return isFocusable(); | 2183 return isFocusable(); |
| 2184 } | 2184 } |
| 2185 | 2185 |
| 2186 void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusDirection) | 2186 void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusDirection) |
| 2187 { | 2187 { |
| 2188 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false,
false, document().defaultView(), 0, oldFocusedElement); | 2188 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false,
false, document().domWindow(), 0, oldFocusedElement); |
| 2189 EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(even
t.release())); | 2189 EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(even
t.release())); |
| 2190 } | 2190 } |
| 2191 | 2191 |
| 2192 void Element::dispatchBlurEvent(Element* newFocusedElement) | 2192 void Element::dispatchBlurEvent(Element* newFocusedElement) |
| 2193 { | 2193 { |
| 2194 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::blur, false, f
alse, document().defaultView(), 0, newFocusedElement); | 2194 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::blur, false, f
alse, document().domWindow(), 0, newFocusedElement); |
| 2195 EventDispatcher::dispatchEvent(this, BlurEventDispatchMediator::create(event
.release())); | 2195 EventDispatcher::dispatchEvent(this, BlurEventDispatchMediator::create(event
.release())); |
| 2196 } | 2196 } |
| 2197 | 2197 |
| 2198 void Element::dispatchFocusInEvent(const AtomicString& eventType, Element* oldFo
cusedElement) | 2198 void Element::dispatchFocusInEvent(const AtomicString& eventType, Element* oldFo
cusedElement) |
| 2199 { | 2199 { |
| 2200 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); | 2200 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); |
| 2201 ASSERT(eventType == EventTypeNames::focusin || eventType == EventTypeNames::
DOMFocusIn); | 2201 ASSERT(eventType == EventTypeNames::focusin || eventType == EventTypeNames::
DOMFocusIn); |
| 2202 dispatchScopedEventDispatchMediator(FocusInEventDispatchMediator::create(Foc
usEvent::create(eventType, true, false, document().defaultView(), 0, oldFocusedE
lement))); | 2202 dispatchScopedEventDispatchMediator(FocusInEventDispatchMediator::create(Foc
usEvent::create(eventType, true, false, document().domWindow(), 0, oldFocusedEle
ment))); |
| 2203 } | 2203 } |
| 2204 | 2204 |
| 2205 void Element::dispatchFocusOutEvent(const AtomicString& eventType, Element* newF
ocusedElement) | 2205 void Element::dispatchFocusOutEvent(const AtomicString& eventType, Element* newF
ocusedElement) |
| 2206 { | 2206 { |
| 2207 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); | 2207 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); |
| 2208 ASSERT(eventType == EventTypeNames::focusout || eventType == EventTypeNames:
:DOMFocusOut); | 2208 ASSERT(eventType == EventTypeNames::focusout || eventType == EventTypeNames:
:DOMFocusOut); |
| 2209 dispatchScopedEventDispatchMediator(FocusOutEventDispatchMediator::create(Fo
cusEvent::create(eventType, true, false, document().defaultView(), 0, newFocused
Element))); | 2209 dispatchScopedEventDispatchMediator(FocusOutEventDispatchMediator::create(Fo
cusEvent::create(eventType, true, false, document().domWindow(), 0, newFocusedEl
ement))); |
| 2210 } | 2210 } |
| 2211 | 2211 |
| 2212 String Element::innerText() | 2212 String Element::innerText() |
| 2213 { | 2213 { |
| 2214 // We need to update layout, since plainText uses line boxes in the render t
ree. | 2214 // We need to update layout, since plainText uses line boxes in the render t
ree. |
| 2215 document().updateLayoutIgnorePendingStylesheets(); | 2215 document().updateLayoutIgnorePendingStylesheets(); |
| 2216 | 2216 |
| 2217 if (!renderer()) | 2217 if (!renderer()) |
| 2218 return textContent(true); | 2218 return textContent(true); |
| 2219 | 2219 |
| (...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3743 return 0; | 3743 return 0; |
| 3744 } | 3744 } |
| 3745 | 3745 |
| 3746 Attribute* UniqueElementData::attributeItem(unsigned index) | 3746 Attribute* UniqueElementData::attributeItem(unsigned index) |
| 3747 { | 3747 { |
| 3748 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); | 3748 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); |
| 3749 return &m_attributeVector.at(index); | 3749 return &m_attributeVector.at(index); |
| 3750 } | 3750 } |
| 3751 | 3751 |
| 3752 } // namespace WebCore | 3752 } // namespace WebCore |
| OLD | NEW |