| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 bool SVGAElement::shouldHaveFocusAppearance() const { | 161 bool SVGAElement::shouldHaveFocusAppearance() const { |
| 162 return !m_wasFocusedByMouse || SVGGraphicsElement::supportsFocus(); | 162 return !m_wasFocusedByMouse || SVGGraphicsElement::supportsFocus(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 // TODO(lanwei): Will add the InputDeviceCapabilities when SVGAElement gets | 165 // TODO(lanwei): Will add the InputDeviceCapabilities when SVGAElement gets |
| 166 // focus later, see https://crbug.com/476530. | 166 // focus later, see https://crbug.com/476530. |
| 167 void SVGAElement::dispatchFocusEvent( | 167 void SVGAElement::dispatchFocusEvent( |
| 168 Element* oldFocusedElement, | 168 Element* oldFocusedElement, |
| 169 WebFocusType type, | 169 WebFocusType type, |
| 170 InputDeviceCapabilities* sourceCapabilities) { | 170 const InputDeviceCapabilitiesValue& sourceCapabilities) { |
| 171 if (type != WebFocusTypePage) | 171 if (type != WebFocusTypePage) |
| 172 m_wasFocusedByMouse = type == WebFocusTypeMouse; | 172 m_wasFocusedByMouse = type == WebFocusTypeMouse; |
| 173 SVGGraphicsElement::dispatchFocusEvent(oldFocusedElement, type, | 173 SVGGraphicsElement::dispatchFocusEvent(oldFocusedElement, type, |
| 174 sourceCapabilities); | 174 sourceCapabilities); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void SVGAElement::dispatchBlurEvent( | 177 void SVGAElement::dispatchBlurEvent( |
| 178 Element* newFocusedElement, | 178 Element* newFocusedElement, |
| 179 WebFocusType type, | 179 WebFocusType type, |
| 180 InputDeviceCapabilities* sourceCapabilities) { | 180 const InputDeviceCapabilitiesValue& sourceCapabilities) { |
| 181 if (type != WebFocusTypePage) | 181 if (type != WebFocusTypePage) |
| 182 m_wasFocusedByMouse = false; | 182 m_wasFocusedByMouse = false; |
| 183 SVGGraphicsElement::dispatchBlurEvent(newFocusedElement, type, | 183 SVGGraphicsElement::dispatchBlurEvent(newFocusedElement, type, |
| 184 sourceCapabilities); | 184 sourceCapabilities); |
| 185 } | 185 } |
| 186 | 186 |
| 187 bool SVGAElement::isURLAttribute(const Attribute& attribute) const { | 187 bool SVGAElement::isURLAttribute(const Attribute& attribute) const { |
| 188 return attribute.name().localName() == hrefAttr || | 188 return attribute.name().localName() == hrefAttr || |
| 189 SVGGraphicsElement::isURLAttribute(attribute); | 189 SVGGraphicsElement::isURLAttribute(attribute); |
| 190 } | 190 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 208 if (!isLink()) | 208 if (!isLink()) |
| 209 return SVGElement::canStartSelection(); | 209 return SVGElement::canStartSelection(); |
| 210 return hasEditableStyle(*this); | 210 return hasEditableStyle(*this); |
| 211 } | 211 } |
| 212 | 212 |
| 213 bool SVGAElement::willRespondToMouseClickEvents() { | 213 bool SVGAElement::willRespondToMouseClickEvents() { |
| 214 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents(); | 214 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace blink | 217 } // namespace blink |
| OLD | NEW |