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 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 bool Element::isKeyboardFocusable() const | 2243 bool Element::isKeyboardFocusable() const |
2244 { | 2244 { |
2245 return isFocusable() && tabIndex() >= 0; | 2245 return isFocusable() && tabIndex() >= 0; |
2246 } | 2246 } |
2247 | 2247 |
2248 bool Element::isMouseFocusable() const | 2248 bool Element::isMouseFocusable() const |
2249 { | 2249 { |
2250 return isFocusable(); | 2250 return isFocusable(); |
2251 } | 2251 } |
2252 | 2252 |
| 2253 bool Element::isTabStop() const |
| 2254 { |
| 2255 // Any element which never supports focus will always return false. |
| 2256 return supportsFocus() && (hasRareData() ? elementRareData()->isTabStop() :
true); |
| 2257 } |
| 2258 |
| 2259 void Element::setIsTabStop(bool flag) |
| 2260 { |
| 2261 ensureElementRareData().setIsTabStop(flag); |
| 2262 } |
| 2263 |
2253 void Element::dispatchFocusEvent(Element* oldFocusedElement, WebFocusType type) | 2264 void Element::dispatchFocusEvent(Element* oldFocusedElement, WebFocusType type) |
2254 { | 2265 { |
2255 RefPtrWillBeRawPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::fo
cus, false, false, document().domWindow(), 0, oldFocusedElement); | 2266 RefPtrWillBeRawPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::fo
cus, false, false, document().domWindow(), 0, oldFocusedElement); |
2256 EventDispatcher::dispatchEvent(*this, FocusEventDispatchMediator::create(eve
nt.release())); | 2267 EventDispatcher::dispatchEvent(*this, FocusEventDispatchMediator::create(eve
nt.release())); |
2257 } | 2268 } |
2258 | 2269 |
2259 void Element::dispatchBlurEvent(Element* newFocusedElement) | 2270 void Element::dispatchBlurEvent(Element* newFocusedElement) |
2260 { | 2271 { |
2261 RefPtrWillBeRawPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::bl
ur, false, false, document().domWindow(), 0, newFocusedElement); | 2272 RefPtrWillBeRawPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::bl
ur, false, false, document().domWindow(), 0, newFocusedElement); |
2262 EventDispatcher::dispatchEvent(*this, BlurEventDispatchMediator::create(even
t.release())); | 2273 EventDispatcher::dispatchEvent(*this, BlurEventDispatchMediator::create(even
t.release())); |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3370 { | 3381 { |
3371 #if ENABLE(OILPAN) | 3382 #if ENABLE(OILPAN) |
3372 if (hasRareData()) | 3383 if (hasRareData()) |
3373 visitor->trace(elementRareData()); | 3384 visitor->trace(elementRareData()); |
3374 visitor->trace(m_elementData); | 3385 visitor->trace(m_elementData); |
3375 #endif | 3386 #endif |
3376 ContainerNode::trace(visitor); | 3387 ContainerNode::trace(visitor); |
3377 } | 3388 } |
3378 | 3389 |
3379 } // namespace blink | 3390 } // namespace blink |
OLD | NEW |