Changeset 152343 in webkit
- Timestamp:
- Jul 3, 2013 1:03:53 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r152337 r152343 1 2013-07-03 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 3 Move SVGTests attributes parsing to SVGGraphicsElement 4 https://bugs.webkit.org/show_bug.cgi?id=118292 5 6 Reviewed by Darin Adler. 7 8 Move SVGTests attributes parsing to SVGGraphicsElement instead of doing 9 this in each of its subclasses. SVGGraphicsElement is now the one 10 subclassing SVGTests after r152167. 11 12 No new tests, no behavior change. 13 14 * svg/SVGAElement.cpp: 15 (WebCore::SVGAElement::isSupportedAttribute): 16 (WebCore::SVGAElement::parseAttribute): 17 * svg/SVGCircleElement.cpp: 18 (WebCore::SVGCircleElement::isSupportedAttribute): 19 (WebCore::SVGCircleElement::parseAttribute): 20 (WebCore::SVGCircleElement::svgAttributeChanged): 21 * svg/SVGClipPathElement.cpp: 22 (WebCore::SVGClipPathElement::isSupportedAttribute): 23 (WebCore::SVGClipPathElement::parseAttribute): 24 * svg/SVGEllipseElement.cpp: 25 (WebCore::SVGEllipseElement::isSupportedAttribute): 26 (WebCore::SVGEllipseElement::parseAttribute): 27 (WebCore::SVGEllipseElement::svgAttributeChanged): 28 * svg/SVGForeignObjectElement.cpp: 29 (WebCore::SVGForeignObjectElement::isSupportedAttribute): 30 (WebCore::SVGForeignObjectElement::parseAttribute): 31 (WebCore::SVGForeignObjectElement::svgAttributeChanged): 32 * svg/SVGGElement.cpp: 33 (WebCore::SVGGElement::isSupportedAttribute): 34 (WebCore::SVGGElement::parseAttribute): 35 (WebCore::SVGGElement::svgAttributeChanged): 36 * svg/SVGGraphicsElement.cpp: 37 (WebCore::SVGGraphicsElement::isSupportedAttribute): 38 (WebCore::SVGGraphicsElement::parseAttribute): 39 (WebCore::SVGGraphicsElement::svgAttributeChanged): 40 * svg/SVGImageElement.cpp: 41 (WebCore::SVGImageElement::isSupportedAttribute): 42 (WebCore::SVGImageElement::parseAttribute): 43 (WebCore::SVGImageElement::svgAttributeChanged): 44 * svg/SVGLineElement.cpp: 45 (WebCore::SVGLineElement::isSupportedAttribute): 46 (WebCore::SVGLineElement::parseAttribute): 47 (WebCore::SVGLineElement::svgAttributeChanged): 48 * svg/SVGPathElement.cpp: 49 (WebCore::SVGPathElement::isSupportedAttribute): 50 (WebCore::SVGPathElement::parseAttribute): 51 (WebCore::SVGPathElement::svgAttributeChanged): 52 * svg/SVGPolyElement.cpp: 53 (WebCore::SVGPolyElement::isSupportedAttribute): 54 (WebCore::SVGPolyElement::parseAttribute): 55 (WebCore::SVGPolyElement::svgAttributeChanged): 56 * svg/SVGRectElement.cpp: 57 (WebCore::SVGRectElement::isSupportedAttribute): 58 (WebCore::SVGRectElement::parseAttribute): 59 (WebCore::SVGRectElement::svgAttributeChanged): 60 * svg/SVGSVGElement.cpp: 61 (WebCore::SVGSVGElement::parseAttribute): 62 (WebCore::SVGSVGElement::svgAttributeChanged): Fall back to calling 63 SVGGraphicsElement::svgAttributeChanged() instead of 64 SVGStyledElement::svgAttributeChanged() as SVGGraphicsElement is the 65 parent class and it takes care of parsing SVGTests attributes now. 66 * svg/SVGUseElement.cpp: 67 (WebCore::SVGUseElement::isSupportedAttribute): 68 (WebCore::SVGUseElement::parseAttribute): 69 (WebCore::SVGUseElement::svgAttributeChanged): 70 1 71 2013-07-02 Ryosuke Niwa <rniwa@webkit.org> 2 72 -
trunk/Source/WebCore/svg/SVGAElement.cpp
r152167 r152343 93 93 if (supportedAttributes.isEmpty()) { 94 94 SVGURIReference::addSupportedAttributes(supportedAttributes); 95 SVGTests::addSupportedAttributes(supportedAttributes);96 95 SVGLangSpace::addSupportedAttributes(supportedAttributes); 97 96 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 114 113 115 114 if (SVGURIReference::parseAttribute(name, value)) 116 return;117 if (SVGTests::parseAttribute(name, value))118 115 return; 119 116 if (SVGLangSpace::parseAttribute(name, value)) -
trunk/Source/WebCore/svg/SVGCircleElement.cpp
r152167 r152343 70 70 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 71 71 if (supportedAttributes.isEmpty()) { 72 SVGTests::addSupportedAttributes(supportedAttributes);73 72 SVGLangSpace::addSupportedAttributes(supportedAttributes); 74 73 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 92 91 else if (name == SVGNames::rAttr) 93 92 setRBaseValue(SVGLength::construct(LengthModeOther, value, parseError, ForbidNegativeLengths)); 94 else if (SVGTests::parseAttribute(name, value) 95 || SVGLangSpace::parseAttribute(name, value) 93 else if (SVGLangSpace::parseAttribute(name, value) 96 94 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 97 95 } else … … 116 114 if (isLengthAttribute) 117 115 updateRelativeLengthsInformation(); 118 119 if (SVGTests::handleAttributeChange(this, attrName))120 return;121 116 122 117 RenderSVGShape* renderer = toRenderSVGShape(this->renderer()); -
trunk/Source/WebCore/svg/SVGClipPathElement.cpp
r152167 r152343 62 62 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 63 63 if (supportedAttributes.isEmpty()) { 64 SVGTests::addSupportedAttributes(supportedAttributes);65 64 SVGLangSpace::addSupportedAttributes(supportedAttributes); 66 65 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 84 83 } 85 84 86 if (SVGTests::parseAttribute(name, value))87 return;88 85 if (SVGLangSpace::parseAttribute(name, value)) 89 86 return; -
trunk/Source/WebCore/svg/SVGEllipseElement.cpp
r152167 r152343 71 71 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 72 72 if (supportedAttributes.isEmpty()) { 73 SVGTests::addSupportedAttributes(supportedAttributes);74 73 SVGLangSpace::addSupportedAttributes(supportedAttributes); 75 74 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 96 95 else if (name == SVGNames::ryAttr) 97 96 setRyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 98 else if (SVGTests::parseAttribute(name, value) 99 || SVGLangSpace::parseAttribute(name, value) 97 else if (SVGLangSpace::parseAttribute(name, value) 100 98 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 101 99 } else … … 121 119 if (isLengthAttribute) 122 120 updateRelativeLengthsInformation(); 123 124 if (SVGTests::handleAttributeChange(this, attrName))125 return;126 121 127 122 RenderSVGShape* renderer = toRenderSVGShape(this->renderer()); -
trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp
r152167 r152343 74 74 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 75 75 if (supportedAttributes.isEmpty()) { 76 SVGTests::addSupportedAttributes(supportedAttributes);77 76 SVGLangSpace::addSupportedAttributes(supportedAttributes); 78 77 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 99 98 else if (name == SVGNames::heightAttr) 100 99 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 101 else if (SVGTests::parseAttribute(name, value) 102 || SVGLangSpace::parseAttribute(name, value) 100 else if (SVGLangSpace::parseAttribute(name, value) 103 101 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 104 102 } else … … 124 122 if (isLengthAttribute) 125 123 updateRelativeLengthsInformation(); 126 127 if (SVGTests::handleAttributeChange(this, attrName))128 return;129 124 130 125 if (RenderObject* renderer = this->renderer()) -
trunk/Source/WebCore/svg/SVGGElement.cpp
r152167 r152343 56 56 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 57 57 if (supportedAttributes.isEmpty()) { 58 SVGTests::addSupportedAttributes(supportedAttributes);59 58 SVGLangSpace::addSupportedAttributes(supportedAttributes); 60 59 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 70 69 } 71 70 72 if (SVGTests::parseAttribute(name, value))73 return;74 71 if (SVGLangSpace::parseAttribute(name, value)) 75 72 return; … … 88 85 89 86 SVGElementInstance::InvalidationGuard invalidationGuard(this); 90 91 if (SVGTests::handleAttributeChange(this, attrName))92 return;93 87 94 88 if (RenderObject* renderer = this->renderer()) -
trunk/Source/WebCore/svg/SVGGraphicsElement.cpp
r152299 r152343 95 95 { 96 96 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 97 if (supportedAttributes.isEmpty()) 97 if (supportedAttributes.isEmpty()) { 98 SVGTests::addSupportedAttributes(supportedAttributes); 98 99 supportedAttributes.add(SVGNames::transformAttr); 100 } 99 101 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); 100 102 } … … 115 117 } 116 118 119 if (SVGTests::parseAttribute(name, value)) 120 return; 121 117 122 ASSERT_NOT_REACHED(); 118 123 } … … 126 131 127 132 SVGElementInstance::InvalidationGuard invalidationGuard(this); 133 134 if (SVGTests::handleAttributeChange(this, attrName)) 135 return; 128 136 129 137 RenderObject* object = renderer(); -
trunk/Source/WebCore/svg/SVGImageElement.cpp
r152167 r152343 78 78 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 79 79 if (supportedAttributes.isEmpty()) { 80 SVGTests::addSupportedAttributes(supportedAttributes);81 80 SVGLangSpace::addSupportedAttributes(supportedAttributes); 82 81 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 126 125 else if (name == SVGNames::heightAttr) 127 126 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 128 else if (SVGTests::parseAttribute(name, value) 129 || SVGLangSpace::parseAttribute(name, value) 127 else if (SVGLangSpace::parseAttribute(name, value) 130 128 || SVGExternalResourcesRequired::parseAttribute(name, value) 131 129 || SVGURIReference::parseAttribute(name, value)) { … … 152 150 if (isLengthAttribute) 153 151 updateRelativeLengthsInformation(); 154 155 if (SVGTests::handleAttributeChange(this, attrName))156 return;157 152 158 153 if (SVGURIReference::isKnownAttribute(attrName)) { -
trunk/Source/WebCore/svg/SVGLineElement.cpp
r152167 r152343 70 70 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 71 71 if (supportedAttributes.isEmpty()) { 72 SVGTests::addSupportedAttributes(supportedAttributes);73 72 SVGLangSpace::addSupportedAttributes(supportedAttributes); 74 73 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 95 94 else if (name == SVGNames::y2Attr) 96 95 setY2BaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 97 else if (SVGTests::parseAttribute(name, value) 98 || SVGLangSpace::parseAttribute(name, value) 96 else if (SVGLangSpace::parseAttribute(name, value) 99 97 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 100 98 } else … … 120 118 if (isLengthAttribute) 121 119 updateRelativeLengthsInformation(); 122 123 if (SVGTests::handleAttributeChange(this, attrName))124 return;125 120 126 121 RenderSVGShape* renderer = toRenderSVGShape(this->renderer()); -
trunk/Source/WebCore/svg/SVGPathElement.cpp
r152167 r152343 209 209 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 210 210 if (supportedAttributes.isEmpty()) { 211 SVGTests::addSupportedAttributes(supportedAttributes);212 211 SVGLangSpace::addSupportedAttributes(supportedAttributes); 213 212 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 238 237 } 239 238 240 if (SVGTests::parseAttribute(name, value))241 return;242 239 if (SVGLangSpace::parseAttribute(name, value)) 243 240 return; … … 256 253 257 254 SVGElementInstance::InvalidationGuard invalidationGuard(this); 258 259 if (SVGTests::handleAttributeChange(this, attrName))260 return;261 255 262 256 RenderSVGPath* renderer = toRenderSVGPath(this->renderer()); -
trunk/Source/WebCore/svg/SVGPolyElement.cpp
r152167 r152343 70 70 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 71 71 if (supportedAttributes.isEmpty()) { 72 SVGTests::addSupportedAttributes(supportedAttributes);73 72 SVGLangSpace::addSupportedAttributes(supportedAttributes); 74 73 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 97 96 } 98 97 99 if (SVGTests::parseAttribute(name, value))100 return;101 98 if (SVGLangSpace::parseAttribute(name, value)) 102 99 return; … … 115 112 116 113 SVGElementInstance::InvalidationGuard invalidationGuard(this); 117 118 if (SVGTests::handleAttributeChange(this, attrName))119 return;120 114 121 115 RenderSVGShape* renderer = toRenderSVGShape(this->renderer()); -
trunk/Source/WebCore/svg/SVGRectElement.cpp
r152167 r152343 76 76 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 77 77 if (supportedAttributes.isEmpty()) { 78 SVGTests::addSupportedAttributes(supportedAttributes);79 78 SVGLangSpace::addSupportedAttributes(supportedAttributes); 80 79 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 107 106 else if (name == SVGNames::heightAttr) 108 107 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 109 else if (SVGTests::parseAttribute(name, value) 110 || SVGLangSpace::parseAttribute(name, value) 108 else if (SVGLangSpace::parseAttribute(name, value) 111 109 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 112 110 } else … … 134 132 if (isLengthAttribute) 135 133 updateRelativeLengthsInformation(); 136 137 if (SVGTests::handleAttributeChange(this, attrName))138 return;139 134 140 135 RenderSVGShape* renderer = toRenderSVGShape(this->renderer()); -
trunk/Source/WebCore/svg/SVGSVGElement.cpp
r152167 r152343 269 269 else if (name == SVGNames::heightAttr) 270 270 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 271 else if (SVGTests::parseAttribute(name, value) 272 || SVGLangSpace::parseAttribute(name, value) 271 else if (SVGLangSpace::parseAttribute(name, value) 273 272 || SVGExternalResourcesRequired::parseAttribute(name, value) 274 273 || SVGFitToViewBox::parseAttribute(this, name, value) … … 281 280 282 281 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) 283 { 282 { 284 283 bool updateRelativeLengthsOrViewBox = false; 285 284 bool widthChanged = attrName == SVGNames::widthAttr; … … 307 306 308 307 SVGElementInstance::InvalidationGuard invalidationGuard(this); 309 if (SVGTests::handleAttributeChange(this, attrName))310 return;311 308 312 309 if (updateRelativeLengthsOrViewBox … … 319 316 } 320 317 321 SVG StyledElement::svgAttributeChanged(attrName);318 SVGGraphicsElement::svgAttributeChanged(attrName); 322 319 } 323 320 -
trunk/Source/WebCore/svg/SVGUseElement.cpp
r152167 r152343 136 136 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 137 137 if (supportedAttributes.isEmpty()) { 138 SVGTests::addSupportedAttributes(supportedAttributes);139 138 SVGLangSpace::addSupportedAttributes(supportedAttributes); 140 139 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); … … 162 161 else if (name == SVGNames::heightAttr) 163 162 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 164 else if (SVGTests::parseAttribute(name, value) 165 || SVGLangSpace::parseAttribute(name, value) 163 else if (SVGLangSpace::parseAttribute(name, value) 166 164 || SVGExternalResourcesRequired::parseAttribute(name, value) 167 165 || SVGURIReference::parseAttribute(name, value)) { … … 238 236 return; 239 237 } 240 241 if (SVGTests::handleAttributeChange(this, attrName))242 return;243 238 244 239 if (SVGExternalResourcesRequired::handleAttributeChange(this, attrName))
Note: See TracChangeset
for help on using the changeset viewer.