| 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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 // FIXME: supportsFocus() can be called when layout is not up to date. | 1234 // FIXME: supportsFocus() can be called when layout is not up to date. |
| 1235 // Logic that deals with the renderer should be moved to rendererIsFocusable
(). | 1235 // Logic that deals with the renderer should be moved to rendererIsFocusable
(). |
| 1236 // But supportsFocus must return true when the element is editable, or else | 1236 // But supportsFocus must return true when the element is editable, or else |
| 1237 // it won't be focusable. Furthermore, supportsFocus cannot just return true | 1237 // it won't be focusable. Furthermore, supportsFocus cannot just return true |
| 1238 // always or else tabIndex() will change for all HTML elements. | 1238 // always or else tabIndex() will change for all HTML elements. |
| 1239 return hasElementFlag(TabIndexWasSetExplicitly) || (hasEditableStyle() && pa
rentNode() && !parentNode()->hasEditableStyle()); | 1239 return hasElementFlag(TabIndexWasSetExplicitly) || (hasEditableStyle() && pa
rentNode() && !parentNode()->hasEditableStyle()); |
| 1240 } | 1240 } |
| 1241 | 1241 |
| 1242 bool Element::isFocusable() const | 1242 bool Element::isFocusable() const |
| 1243 { | 1243 { |
| 1244 return inDocument() && supportsFocus() && !isInert() && rendererIsFocusable(
); | 1244 return inDocument() && supportsFocus() && rendererIsFocusable(); |
| 1245 } | 1245 } |
| 1246 | 1246 |
| 1247 bool Element::isKeyboardFocusable() const | 1247 bool Element::isKeyboardFocusable() const |
| 1248 { | 1248 { |
| 1249 return isFocusable() && tabIndex() >= 0; | 1249 return isFocusable() && tabIndex() >= 0; |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 bool Element::isMouseFocusable() const | 1252 bool Element::isMouseFocusable() const |
| 1253 { | 1253 { |
| 1254 return isFocusable(); | 1254 return isFocusable(); |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1780 return false; | 1780 return false; |
| 1781 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. | 1781 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. |
| 1782 // See comments in RenderObject::setStyle(). | 1782 // See comments in RenderObject::setStyle(). |
| 1783 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? | 1783 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? |
| 1784 if (isHTMLCanvasElement(*this)) | 1784 if (isHTMLCanvasElement(*this)) |
| 1785 return false; | 1785 return false; |
| 1786 return true; | 1786 return true; |
| 1787 } | 1787 } |
| 1788 | 1788 |
| 1789 } // namespace blink | 1789 } // namespace blink |
| OLD | NEW |