| 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 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2172 bool Element::supportsSpatialNavigationFocus() const | 2172 bool Element::supportsSpatialNavigationFocus() const | 
| 2173 { | 2173 { | 
| 2174     // This function checks whether the element satisfies the extended criteria | 2174     // This function checks whether the element satisfies the extended criteria | 
| 2175     // for the element to be focusable, introduced by spatial navigation feature
      , | 2175     // for the element to be focusable, introduced by spatial navigation feature
      , | 
| 2176     // i.e. checks if click or keyboard event handler is specified. | 2176     // i.e. checks if click or keyboard event handler is specified. | 
| 2177     // This is the way to make it possible to navigate to (focus) elements | 2177     // This is the way to make it possible to navigate to (focus) elements | 
| 2178     // which web designer meant for being active (made them respond to click eve
      nts). | 2178     // which web designer meant for being active (made them respond to click eve
      nts). | 
| 2179 | 2179 | 
| 2180     if (!document().settings() || !document().settings()->spatialNavigationEnabl
      ed()) | 2180     if (!document().settings() || !document().settings()->spatialNavigationEnabl
      ed()) | 
| 2181         return false; | 2181         return false; | 
| 2182     return hasEventListeners(EventTypeNames::click) | 2182     if (hasEventListeners(EventTypeNames::click) | 
| 2183         || hasEventListeners(EventTypeNames::keydown) | 2183         || hasEventListeners(EventTypeNames::keydown) | 
| 2184         || hasEventListeners(EventTypeNames::keypress) | 2184         || hasEventListeners(EventTypeNames::keypress) | 
| 2185         || hasEventListeners(EventTypeNames::keyup); | 2185         || hasEventListeners(EventTypeNames::keyup)) | 
|  | 2186         return true; | 
|  | 2187     if (!isSVGElement()) | 
|  | 2188         return false; | 
|  | 2189     return (hasEventListeners(EventTypeNames::focus) | 
|  | 2190         || hasEventListeners(EventTypeNames::blur) | 
|  | 2191         || hasEventListeners(EventTypeNames::focusin) | 
|  | 2192         || hasEventListeners(EventTypeNames::focusout)); | 
| 2186 } | 2193 } | 
| 2187 | 2194 | 
| 2188 bool Element::isFocusable() const | 2195 bool Element::isFocusable() const | 
| 2189 { | 2196 { | 
| 2190     return inDocument() && supportsFocus() && !isInert() && rendererIsFocusable(
      ); | 2197     return inDocument() && supportsFocus() && !isInert() && rendererIsFocusable(
      ); | 
| 2191 } | 2198 } | 
| 2192 | 2199 | 
| 2193 bool Element::isKeyboardFocusable() const | 2200 bool Element::isKeyboardFocusable() const | 
| 2194 { | 2201 { | 
| 2195     return isFocusable() && tabIndex() >= 0; | 2202     return isFocusable() && tabIndex() >= 0; | 
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3345 | 3352 | 
| 3346 void Element::trace(Visitor* visitor) | 3353 void Element::trace(Visitor* visitor) | 
| 3347 { | 3354 { | 
| 3348     if (hasRareData()) | 3355     if (hasRareData()) | 
| 3349         visitor->trace(elementRareData()); | 3356         visitor->trace(elementRareData()); | 
| 3350     visitor->trace(m_elementData); | 3357     visitor->trace(m_elementData); | 
| 3351     ContainerNode::trace(visitor); | 3358     ContainerNode::trace(visitor); | 
| 3352 } | 3359 } | 
| 3353 | 3360 | 
| 3354 } // namespace WebCore | 3361 } // namespace WebCore | 
| OLD | NEW | 
|---|