Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: Source/core/svg/SVGAElement.cpp

Issue 62083002: Remove support for the externalResourcesRequired attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline test Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/svg/SVGAElement.h ('k') | Source/core/svg/SVGAElement.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "platform/PlatformMouseEvent.h" 50 #include "platform/PlatformMouseEvent.h"
51 #include "platform/network/ResourceRequest.h" 51 #include "platform/network/ResourceRequest.h"
52 52
53 namespace WebCore { 53 namespace WebCore {
54 54
55 using namespace HTMLNames; 55 using namespace HTMLNames;
56 56
57 // Animated property definitions 57 // Animated property definitions
58 DEFINE_ANIMATED_STRING(SVGAElement, SVGNames::targetAttr, SVGTarget, svgTarget) 58 DEFINE_ANIMATED_STRING(SVGAElement, SVGNames::targetAttr, SVGTarget, svgTarget)
59 DEFINE_ANIMATED_STRING(SVGAElement, XLinkNames::hrefAttr, Href, href) 59 DEFINE_ANIMATED_STRING(SVGAElement, XLinkNames::hrefAttr, Href, href)
60 DEFINE_ANIMATED_BOOLEAN(SVGAElement, SVGNames::externalResourcesRequiredAttr, Ex ternalResourcesRequired, externalResourcesRequired)
61 60
62 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAElement) 61 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAElement)
63 REGISTER_LOCAL_ANIMATED_PROPERTY(svgTarget) 62 REGISTER_LOCAL_ANIMATED_PROPERTY(svgTarget)
64 REGISTER_LOCAL_ANIMATED_PROPERTY(href) 63 REGISTER_LOCAL_ANIMATED_PROPERTY(href)
65 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
66 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) 64 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
67 END_REGISTER_ANIMATED_PROPERTIES 65 END_REGISTER_ANIMATED_PROPERTIES
68 66
69 inline SVGAElement::SVGAElement(Document& document) 67 inline SVGAElement::SVGAElement(Document& document)
70 : SVGGraphicsElement(SVGNames::aTag, document) 68 : SVGGraphicsElement(SVGNames::aTag, document)
71 { 69 {
72 ScriptWrappable::init(this); 70 ScriptWrappable::init(this);
73 registerAnimatedPropertiesForSVGAElement(); 71 registerAnimatedPropertiesForSVGAElement();
74 } 72 }
75 73
(...skipping 11 matching lines...) Expand all
87 85
88 // Otherwise, use the title of this element. 86 // Otherwise, use the title of this element.
89 return SVGElement::title(); 87 return SVGElement::title();
90 } 88 }
91 89
92 bool SVGAElement::isSupportedAttribute(const QualifiedName& attrName) 90 bool SVGAElement::isSupportedAttribute(const QualifiedName& attrName)
93 { 91 {
94 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 92 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
95 if (supportedAttributes.isEmpty()) { 93 if (supportedAttributes.isEmpty()) {
96 SVGURIReference::addSupportedAttributes(supportedAttributes); 94 SVGURIReference::addSupportedAttributes(supportedAttributes);
97 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes );
98 supportedAttributes.add(SVGNames::targetAttr); 95 supportedAttributes.add(SVGNames::targetAttr);
99 } 96 }
100 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); 97 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
101 } 98 }
102 99
103 void SVGAElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 100 void SVGAElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
104 { 101 {
105 if (!isSupportedAttribute(name)) { 102 if (!isSupportedAttribute(name)) {
106 SVGGraphicsElement::parseAttribute(name, value); 103 SVGGraphicsElement::parseAttribute(name, value);
107 return; 104 return;
108 } 105 }
109 106
110 if (name == SVGNames::targetAttr) { 107 if (name == SVGNames::targetAttr) {
111 setSVGTargetBaseValue(value); 108 setSVGTargetBaseValue(value);
112 return; 109 return;
113 } 110 }
114 111
115 if (SVGURIReference::parseAttribute(name, value)) 112 if (SVGURIReference::parseAttribute(name, value))
116 return; 113 return;
117 if (SVGExternalResourcesRequired::parseAttribute(name, value))
118 return;
119 114
120 ASSERT_NOT_REACHED(); 115 ASSERT_NOT_REACHED();
121 } 116 }
122 117
123 void SVGAElement::svgAttributeChanged(const QualifiedName& attrName) 118 void SVGAElement::svgAttributeChanged(const QualifiedName& attrName)
124 { 119 {
125 if (!isSupportedAttribute(attrName)) { 120 if (!isSupportedAttribute(attrName)) {
126 SVGGraphicsElement::svgAttributeChanged(attrName); 121 SVGGraphicsElement::svgAttributeChanged(attrName);
127 return; 122 return;
128 } 123 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 231
237 return SVGGraphicsElement::childShouldCreateRenderer(child); 232 return SVGGraphicsElement::childShouldCreateRenderer(child);
238 } 233 }
239 234
240 bool SVGAElement::willRespondToMouseClickEvents() 235 bool SVGAElement::willRespondToMouseClickEvents()
241 { 236 {
242 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents(); 237 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents();
243 } 238 }
244 239
245 } // namespace WebCore 240 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAElement.h ('k') | Source/core/svg/SVGAElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698