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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 #include "core/html/HTMLPlugInElement.h" | 100 #include "core/html/HTMLPlugInElement.h" |
101 #include "core/html/HTMLTableRowsCollection.h" | 101 #include "core/html/HTMLTableRowsCollection.h" |
102 #include "core/html/HTMLTemplateElement.h" | 102 #include "core/html/HTMLTemplateElement.h" |
103 #include "core/html/parser/HTMLParserIdioms.h" | 103 #include "core/html/parser/HTMLParserIdioms.h" |
104 #include "core/inspector/InspectorInstrumentation.h" | 104 #include "core/inspector/InspectorInstrumentation.h" |
105 #include "core/page/Chrome.h" | 105 #include "core/page/Chrome.h" |
106 #include "core/page/ChromeClient.h" | 106 #include "core/page/ChromeClient.h" |
107 #include "core/page/FocusController.h" | 107 #include "core/page/FocusController.h" |
108 #include "core/page/Page.h" | 108 #include "core/page/Page.h" |
109 #include "core/page/PointerLockController.h" | 109 #include "core/page/PointerLockController.h" |
| 110 #include "core/page/SpatialNavigation.h" |
110 #include "core/rendering/RenderLayer.h" | 111 #include "core/rendering/RenderLayer.h" |
111 #include "core/rendering/RenderTextFragment.h" | 112 #include "core/rendering/RenderTextFragment.h" |
112 #include "core/rendering/RenderView.h" | 113 #include "core/rendering/RenderView.h" |
113 #include "core/rendering/compositing/RenderLayerCompositor.h" | 114 #include "core/rendering/compositing/RenderLayerCompositor.h" |
114 #include "core/svg/SVGDocumentExtensions.h" | 115 #include "core/svg/SVGDocumentExtensions.h" |
115 #include "core/svg/SVGElement.h" | 116 #include "core/svg/SVGElement.h" |
116 #include "platform/EventDispatchForbiddenScope.h" | 117 #include "platform/EventDispatchForbiddenScope.h" |
117 #include "platform/RuntimeEnabledFeatures.h" | 118 #include "platform/RuntimeEnabledFeatures.h" |
118 #include "platform/UserGestureIndicator.h" | 119 #include "platform/UserGestureIndicator.h" |
119 #include "platform/scroll/ScrollableArea.h" | 120 #include "platform/scroll/ScrollableArea.h" |
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2110 } | 2111 } |
2111 | 2112 |
2112 bool Element::supportsSpatialNavigationFocus() const | 2113 bool Element::supportsSpatialNavigationFocus() const |
2113 { | 2114 { |
2114 // This function checks whether the element satisfies the extended criteria | 2115 // This function checks whether the element satisfies the extended criteria |
2115 // for the element to be focusable, introduced by spatial navigation feature
, | 2116 // for the element to be focusable, introduced by spatial navigation feature
, |
2116 // i.e. checks if click or keyboard event handler is specified. | 2117 // i.e. checks if click or keyboard event handler is specified. |
2117 // This is the way to make it possible to navigate to (focus) elements | 2118 // This is the way to make it possible to navigate to (focus) elements |
2118 // which web designer meant for being active (made them respond to click eve
nts). | 2119 // which web designer meant for being active (made them respond to click eve
nts). |
2119 | 2120 |
2120 if (!document().settings() || !document().settings()->spatialNavigationEnabl
ed()) | 2121 if (!isSpatialNavigationEnabled(document().frame())) |
2121 return false; | 2122 return false; |
2122 if (hasEventListeners(EventTypeNames::click) | 2123 if (hasEventListeners(EventTypeNames::click) |
2123 || hasEventListeners(EventTypeNames::keydown) | 2124 || hasEventListeners(EventTypeNames::keydown) |
2124 || hasEventListeners(EventTypeNames::keypress) | 2125 || hasEventListeners(EventTypeNames::keypress) |
2125 || hasEventListeners(EventTypeNames::keyup)) | 2126 || hasEventListeners(EventTypeNames::keyup)) |
2126 return true; | 2127 return true; |
2127 if (!isSVGElement()) | 2128 if (!isSVGElement()) |
2128 return false; | 2129 return false; |
2129 return (hasEventListeners(EventTypeNames::focus) | 2130 return (hasEventListeners(EventTypeNames::focus) |
2130 || hasEventListeners(EventTypeNames::blur) | 2131 || hasEventListeners(EventTypeNames::blur) |
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3306 return wrapper; | 3307 return wrapper; |
3307 | 3308 |
3308 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); | 3309 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); |
3309 | 3310 |
3310 wrapper->SetPrototype(binding->prototype()); | 3311 wrapper->SetPrototype(binding->prototype()); |
3311 | 3312 |
3312 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType,
wrapper); | 3313 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType,
wrapper); |
3313 } | 3314 } |
3314 | 3315 |
3315 } // namespace blink | 3316 } // namespace blink |
OLD | NEW |