Chromium Code Reviews| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 #include "core/frame/UseCounter.h" | 82 #include "core/frame/UseCounter.h" |
| 83 #include "core/frame/csp/ContentSecurityPolicy.h" | 83 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 84 #include "core/html/ClassList.h" | 84 #include "core/html/ClassList.h" |
| 85 #include "core/html/HTMLCanvasElement.h" | 85 #include "core/html/HTMLCanvasElement.h" |
| 86 #include "core/html/HTMLCollection.h" | 86 #include "core/html/HTMLCollection.h" |
| 87 #include "core/html/HTMLDocument.h" | 87 #include "core/html/HTMLDocument.h" |
| 88 #include "core/html/HTMLElement.h" | 88 #include "core/html/HTMLElement.h" |
| 89 #include "core/html/HTMLFormControlsCollection.h" | 89 #include "core/html/HTMLFormControlsCollection.h" |
| 90 #include "core/html/HTMLFrameElementBase.h" | 90 #include "core/html/HTMLFrameElementBase.h" |
| 91 #include "core/html/HTMLFrameOwnerElement.h" | 91 #include "core/html/HTMLFrameOwnerElement.h" |
| 92 #include "core/html/HTMLInputElement.h" | |
| 92 #include "core/html/HTMLLabelElement.h" | 93 #include "core/html/HTMLLabelElement.h" |
| 93 #include "core/html/HTMLOptionsCollection.h" | 94 #include "core/html/HTMLOptionsCollection.h" |
| 94 #include "core/html/HTMLTableRowsCollection.h" | 95 #include "core/html/HTMLTableRowsCollection.h" |
| 95 #include "core/html/HTMLTemplateElement.h" | 96 #include "core/html/HTMLTemplateElement.h" |
| 96 #include "core/html/parser/HTMLParserIdioms.h" | 97 #include "core/html/parser/HTMLParserIdioms.h" |
| 97 #include "core/inspector/InspectorInstrumentation.h" | 98 #include "core/inspector/InspectorInstrumentation.h" |
| 98 #include "core/page/Chrome.h" | 99 #include "core/page/Chrome.h" |
| 99 #include "core/page/ChromeClient.h" | 100 #include "core/page/ChromeClient.h" |
| 100 #include "core/page/FocusController.h" | 101 #include "core/page/FocusController.h" |
| 101 #include "core/page/Page.h" | 102 #include "core/page/Page.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 void Element::setTabIndex(int value) | 214 void Element::setTabIndex(int value) |
| 214 { | 215 { |
| 215 setIntegralAttribute(tabindexAttr, value); | 216 setIntegralAttribute(tabindexAttr, value); |
| 216 } | 217 } |
| 217 | 218 |
| 218 short Element::tabIndex() const | 219 short Element::tabIndex() const |
| 219 { | 220 { |
| 220 return hasRareData() ? elementRareData()->tabIndex() : 0; | 221 return hasRareData() ? elementRareData()->tabIndex() : 0; |
| 221 } | 222 } |
| 222 | 223 |
| 224 bool Element::shouldUseInputMethod() | |
| 225 { | |
| 226 return isHTMLInputElement(this) ? toHTMLInputElement(this)->shouldUseInputMe thod() : isContentEditable(UserSelectAllIsAlwaysNonEditable); | |
|
adamk
2014/07/21 22:06:32
Is isHTMLInputElement(this) ever true? The only ca
| |
| 227 } | |
| 228 | |
| 223 bool Element::rendererIsFocusable() const | 229 bool Element::rendererIsFocusable() const |
| 224 { | 230 { |
| 225 // Elements in canvas fallback content are not rendered, but they are allowe d to be | 231 // Elements in canvas fallback content are not rendered, but they are allowe d to be |
| 226 // focusable as long as their canvas is displayed and visible. | 232 // focusable as long as their canvas is displayed and visible. |
| 227 if (isInCanvasSubtree()) { | 233 if (isInCanvasSubtree()) { |
| 228 const HTMLCanvasElement* canvas = Traversal<HTMLCanvasElement>::firstAnc estorOrSelf(*this); | 234 const HTMLCanvasElement* canvas = Traversal<HTMLCanvasElement>::firstAnc estorOrSelf(*this); |
| 229 ASSERT(canvas); | 235 ASSERT(canvas); |
| 230 return canvas->renderer() && canvas->renderer()->style()->visibility() = = VISIBLE; | 236 return canvas->renderer() && canvas->renderer()->style()->visibility() = = VISIBLE; |
| 231 } | 237 } |
| 232 | 238 |
| (...skipping 3134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3367 { | 3373 { |
| 3368 #if ENABLE(OILPAN) | 3374 #if ENABLE(OILPAN) |
| 3369 if (hasRareData()) | 3375 if (hasRareData()) |
| 3370 visitor->trace(elementRareData()); | 3376 visitor->trace(elementRareData()); |
| 3371 visitor->trace(m_elementData); | 3377 visitor->trace(m_elementData); |
| 3372 #endif | 3378 #endif |
| 3373 ContainerNode::trace(visitor); | 3379 ContainerNode::trace(visitor); |
| 3374 } | 3380 } |
| 3375 | 3381 |
| 3376 } // namespace blink | 3382 } // namespace blink |
| OLD | NEW |