| 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) 2000 Simon Hausmann <hausmann@kde.org> | 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 return HTMLElement::supportsFocus(); | 82 return HTMLElement::supportsFocus(); |
| 83 // If not a link we should still be able to focus the element if it has tabI
ndex. | 83 // If not a link we should still be able to focus the element if it has tabI
ndex. |
| 84 return isLink() || HTMLElement::supportsFocus(); | 84 return isLink() || HTMLElement::supportsFocus(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 bool HTMLAnchorElement::shouldHaveFocusAppearance() const | 87 bool HTMLAnchorElement::shouldHaveFocusAppearance() const |
| 88 { | 88 { |
| 89 return !m_wasFocusedByMouse || HTMLElement::supportsFocus(); | 89 return !m_wasFocusedByMouse || HTMLElement::supportsFocus(); |
| 90 } | 90 } |
| 91 | 91 |
| 92 bool HTMLAnchorElement::wasFocusedByMouse() const | 92 void HTMLAnchorElement::dispatchFocusEvent(Element* oldFocusedElement, FocusType
type) |
| 93 { | 93 { |
| 94 return m_wasFocusedByMouse; | 94 if (type != FocusTypePage) |
| 95 } | 95 m_wasFocusedByMouse = type == FocusTypeMouse; |
| 96 | 96 HTMLElement::dispatchFocusEvent(oldFocusedElement, type); |
| 97 void HTMLAnchorElement::setWasFocusedByMouse(bool wasFocusedByMouse) | |
| 98 { | |
| 99 m_wasFocusedByMouse = wasFocusedByMouse; | |
| 100 } | 97 } |
| 101 | 98 |
| 102 bool HTMLAnchorElement::isMouseFocusable() const | 99 bool HTMLAnchorElement::isMouseFocusable() const |
| 103 { | 100 { |
| 104 if (isLink()) | 101 if (isLink()) |
| 105 return supportsFocus(); | 102 return supportsFocus(); |
| 106 | 103 |
| 107 return HTMLElement::isMouseFocusable(); | 104 return HTMLElement::isMouseFocusable(); |
| 108 } | 105 } |
| 109 | 106 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 Vector<String> argv; | 393 Vector<String> argv; |
| 397 argv.append("a"); | 394 argv.append("a"); |
| 398 argv.append(fastGetAttribute(hrefAttr)); | 395 argv.append(fastGetAttribute(hrefAttr)); |
| 399 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data()
); | 396 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data()
); |
| 400 } | 397 } |
| 401 } | 398 } |
| 402 return HTMLElement::insertedInto(insertionPoint); | 399 return HTMLElement::insertedInto(insertionPoint); |
| 403 } | 400 } |
| 404 | 401 |
| 405 } | 402 } |
| OLD | NEW |