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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void SVGAElement::svgAttributeChanged(const QualifiedName& attrName) | 84 void SVGAElement::svgAttributeChanged(const QualifiedName& attrName) |
85 { | 85 { |
86 // Unlike other SVG*Element classes, SVGAElement only listens to SVGURIRefer
ence changes | 86 // Unlike other SVG*Element classes, SVGAElement only listens to SVGURIRefer
ence changes |
87 // as none of the other properties changes the linking behaviour for our <a>
element. | 87 // as none of the other properties changes the linking behaviour for our <a>
element. |
88 if (SVGURIReference::isKnownAttribute(attrName)) { | 88 if (SVGURIReference::isKnownAttribute(attrName)) { |
89 SVGElement::InvalidationGuard invalidationGuard(this); | 89 SVGElement::InvalidationGuard invalidationGuard(this); |
90 | 90 |
91 bool wasLink = isLink(); | 91 bool wasLink = isLink(); |
92 setIsLink(!hrefString().isNull()); | 92 setIsLink(!hrefString().isNull()); |
93 | 93 |
94 if (wasLink != isLink()) | 94 if (wasLink || isLink()) { |
95 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing:
:create(StyleChangeReason::LinkColorChange)); | 95 pseudoStateChanged(CSSSelector::PseudoLink); |
96 | 96 pseudoStateChanged(CSSSelector::PseudoVisited); |
| 97 pseudoStateChanged(CSSSelector::PseudoAnyLink); |
| 98 } |
97 return; | 99 return; |
98 } | 100 } |
99 | 101 |
100 SVGGraphicsElement::svgAttributeChanged(attrName); | 102 SVGGraphicsElement::svgAttributeChanged(attrName); |
101 } | 103 } |
102 | 104 |
103 LayoutObject* SVGAElement::createLayoutObject(const ComputedStyle&) | 105 LayoutObject* SVGAElement::createLayoutObject(const ComputedStyle&) |
104 { | 106 { |
105 if (parentNode() && parentNode()->isSVGElement() && toSVGElement(parentNode(
))->isTextContent()) | 107 if (parentNode() && parentNode()->isSVGElement() && toSVGElement(parentNode(
))->isTextContent()) |
106 return new LayoutSVGInline(this); | 108 return new LayoutSVGInline(this); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 return SVGElement::canStartSelection(); | 212 return SVGElement::canStartSelection(); |
211 return hasEditableStyle(); | 213 return hasEditableStyle(); |
212 } | 214 } |
213 | 215 |
214 bool SVGAElement::willRespondToMouseClickEvents() | 216 bool SVGAElement::willRespondToMouseClickEvents() |
215 { | 217 { |
216 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents(); | 218 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents(); |
217 } | 219 } |
218 | 220 |
219 } // namespace blink | 221 } // namespace blink |
OLD | NEW |