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 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2229 || supportsSpatialNavigationFocus(); | 2229 || supportsSpatialNavigationFocus(); |
2230 } | 2230 } |
2231 | 2231 |
2232 bool Element::supportsSpatialNavigationFocus() const | 2232 bool Element::supportsSpatialNavigationFocus() const |
2233 { | 2233 { |
2234 // This function checks whether the element satisfies the extended criteria | 2234 // This function checks whether the element satisfies the extended criteria |
2235 // for the element to be focusable, introduced by spatial navigation feature
, | 2235 // for the element to be focusable, introduced by spatial navigation feature
, |
2236 // i.e. checks if click or keyboard event handler is specified. | 2236 // i.e. checks if click or keyboard event handler is specified. |
2237 // This is the way to make it possible to navigate to (focus) elements | 2237 // This is the way to make it possible to navigate to (focus) elements |
2238 // which web designer meant for being active (made them respond to click eve
nts). | 2238 // which web designer meant for being active (made them respond to click eve
nts). |
2239 | 2239 if (!isSpatialNavigationEnabled(document().frame()) || spatialNavigationIgno
resEventHandlers(document().frame())) |
2240 if (!isSpatialNavigationEnabled(document().frame())) | |
2241 return false; | 2240 return false; |
2242 if (hasEventListeners(EventTypeNames::click) | 2241 if (hasEventListeners(EventTypeNames::click) |
2243 || hasEventListeners(EventTypeNames::keydown) | 2242 || hasEventListeners(EventTypeNames::keydown) |
2244 || hasEventListeners(EventTypeNames::keypress) | 2243 || hasEventListeners(EventTypeNames::keypress) |
2245 || hasEventListeners(EventTypeNames::keyup)) | 2244 || hasEventListeners(EventTypeNames::keyup)) |
2246 return true; | 2245 return true; |
2247 if (!isSVGElement()) | 2246 if (!isSVGElement()) |
2248 return false; | 2247 return false; |
2249 return (hasEventListeners(EventTypeNames::focus) | 2248 return (hasEventListeners(EventTypeNames::focus) |
2250 || hasEventListeners(EventTypeNames::blur) | 2249 || hasEventListeners(EventTypeNames::blur) |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3421 return v8::Handle<v8::Object>(); | 3420 return v8::Handle<v8::Object>(); |
3422 | 3421 |
3423 V8PerContextData* perContextData = V8PerContextData::from(context); | 3422 V8PerContextData* perContextData = V8PerContextData::from(context); |
3424 if (perContextData) | 3423 if (perContextData) |
3425 wrapper->SetPrototype(perContextData->customElementBinding(customElement
Definition())->prototype()); | 3424 wrapper->SetPrototype(perContextData->customElementBinding(customElement
Definition())->prototype()); |
3426 | 3425 |
3427 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType,
wrapper); | 3426 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType,
wrapper); |
3428 } | 3427 } |
3429 | 3428 |
3430 } // namespace blink | 3429 } // namespace blink |
OLD | NEW |