Title: [152343] trunk/Source/WebCore
Revision
152343
Author
[email protected]
Date
2013-07-03 01:03:53 -0700 (Wed, 03 Jul 2013)

Log Message

Move SVGTests attributes parsing to SVGGraphicsElement
https://bugs.webkit.org/show_bug.cgi?id=118292

Reviewed by Darin Adler.

Move SVGTests attributes parsing to SVGGraphicsElement instead of doing
this in each of its subclasses. SVGGraphicsElement is now the one
subclassing SVGTests after r152167.

No new tests, no behavior change.

* svg/SVGAElement.cpp:
(WebCore::SVGAElement::isSupportedAttribute):
(WebCore::SVGAElement::parseAttribute):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::isSupportedAttribute):
(WebCore::SVGCircleElement::parseAttribute):
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::isSupportedAttribute):
(WebCore::SVGClipPathElement::parseAttribute):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::isSupportedAttribute):
(WebCore::SVGEllipseElement::parseAttribute):
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::isSupportedAttribute):
(WebCore::SVGForeignObjectElement::parseAttribute):
(WebCore::SVGForeignObjectElement::svgAttributeChanged):
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::isSupportedAttribute):
(WebCore::SVGGElement::parseAttribute):
(WebCore::SVGGElement::svgAttributeChanged):
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::isSupportedAttribute):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isSupportedAttribute):
(WebCore::SVGImageElement::parseAttribute):
(WebCore::SVGImageElement::svgAttributeChanged):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::isSupportedAttribute):
(WebCore::SVGLineElement::parseAttribute):
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::isSupportedAttribute):
(WebCore::SVGPathElement::parseAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::isSupportedAttribute):
(WebCore::SVGPolyElement::parseAttribute):
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::isSupportedAttribute):
(WebCore::SVGRectElement::parseAttribute):
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseAttribute):
(WebCore::SVGSVGElement::svgAttributeChanged): Fall back to calling
SVGGraphicsElement::svgAttributeChanged() instead of
SVGStyledElement::svgAttributeChanged() as SVGGraphicsElement is the
parent class and it takes care of parsing SVGTests attributes now.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::isSupportedAttribute):
(WebCore::SVGUseElement::parseAttribute):
(WebCore::SVGUseElement::svgAttributeChanged):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (152342 => 152343)


--- trunk/Source/WebCore/ChangeLog	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/ChangeLog	2013-07-03 08:03:53 UTC (rev 152343)
@@ -1,3 +1,73 @@
+2013-07-03  Christophe Dumez  <[email protected]>
+
+        Move SVGTests attributes parsing to SVGGraphicsElement
+        https://bugs.webkit.org/show_bug.cgi?id=118292
+
+        Reviewed by Darin Adler.
+
+        Move SVGTests attributes parsing to SVGGraphicsElement instead of doing
+        this in each of its subclasses. SVGGraphicsElement is now the one
+        subclassing SVGTests after r152167.
+
+        No new tests, no behavior change.
+
+        * svg/SVGAElement.cpp:
+        (WebCore::SVGAElement::isSupportedAttribute):
+        (WebCore::SVGAElement::parseAttribute):
+        * svg/SVGCircleElement.cpp:
+        (WebCore::SVGCircleElement::isSupportedAttribute):
+        (WebCore::SVGCircleElement::parseAttribute):
+        (WebCore::SVGCircleElement::svgAttributeChanged):
+        * svg/SVGClipPathElement.cpp:
+        (WebCore::SVGClipPathElement::isSupportedAttribute):
+        (WebCore::SVGClipPathElement::parseAttribute):
+        * svg/SVGEllipseElement.cpp:
+        (WebCore::SVGEllipseElement::isSupportedAttribute):
+        (WebCore::SVGEllipseElement::parseAttribute):
+        (WebCore::SVGEllipseElement::svgAttributeChanged):
+        * svg/SVGForeignObjectElement.cpp:
+        (WebCore::SVGForeignObjectElement::isSupportedAttribute):
+        (WebCore::SVGForeignObjectElement::parseAttribute):
+        (WebCore::SVGForeignObjectElement::svgAttributeChanged):
+        * svg/SVGGElement.cpp:
+        (WebCore::SVGGElement::isSupportedAttribute):
+        (WebCore::SVGGElement::parseAttribute):
+        (WebCore::SVGGElement::svgAttributeChanged):
+        * svg/SVGGraphicsElement.cpp:
+        (WebCore::SVGGraphicsElement::isSupportedAttribute):
+        (WebCore::SVGGraphicsElement::parseAttribute):
+        (WebCore::SVGGraphicsElement::svgAttributeChanged):
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::isSupportedAttribute):
+        (WebCore::SVGImageElement::parseAttribute):
+        (WebCore::SVGImageElement::svgAttributeChanged):
+        * svg/SVGLineElement.cpp:
+        (WebCore::SVGLineElement::isSupportedAttribute):
+        (WebCore::SVGLineElement::parseAttribute):
+        (WebCore::SVGLineElement::svgAttributeChanged):
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::isSupportedAttribute):
+        (WebCore::SVGPathElement::parseAttribute):
+        (WebCore::SVGPathElement::svgAttributeChanged):
+        * svg/SVGPolyElement.cpp:
+        (WebCore::SVGPolyElement::isSupportedAttribute):
+        (WebCore::SVGPolyElement::parseAttribute):
+        (WebCore::SVGPolyElement::svgAttributeChanged):
+        * svg/SVGRectElement.cpp:
+        (WebCore::SVGRectElement::isSupportedAttribute):
+        (WebCore::SVGRectElement::parseAttribute):
+        (WebCore::SVGRectElement::svgAttributeChanged):
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::parseAttribute):
+        (WebCore::SVGSVGElement::svgAttributeChanged): Fall back to calling
+        SVGGraphicsElement::svgAttributeChanged() instead of
+        SVGStyledElement::svgAttributeChanged() as SVGGraphicsElement is the
+        parent class and it takes care of parsing SVGTests attributes now.
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::isSupportedAttribute):
+        (WebCore::SVGUseElement::parseAttribute):
+        (WebCore::SVGUseElement::svgAttributeChanged):
+
 2013-07-02  Ryosuke Niwa  <[email protected]>
 
         Modernize QualifiedName by wrapping gNameCache in a function and using more early exits

Modified: trunk/Source/WebCore/svg/SVGAElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGAElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGAElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -92,7 +92,6 @@
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
         SVGURIReference::addSupportedAttributes(supportedAttributes);
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::targetAttr);
@@ -114,8 +113,6 @@
 
     if (SVGURIReference::parseAttribute(name, value))
         return;
-    if (SVGTests::parseAttribute(name, value))
-        return;
     if (SVGLangSpace::parseAttribute(name, value))
         return;
     if (SVGExternalResourcesRequired::parseAttribute(name, value))

Modified: trunk/Source/WebCore/svg/SVGCircleElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGCircleElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGCircleElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -69,7 +69,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::cxAttr);
@@ -91,8 +90,7 @@
         setCyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
     else if (name == SVGNames::rAttr)
         setRBaseValue(SVGLength::construct(LengthModeOther, value, parseError, ForbidNegativeLengths));
-    else if (SVGTests::parseAttribute(name, value)
-             || SVGLangSpace::parseAttribute(name, value)
+    else if (SVGLangSpace::parseAttribute(name, value)
              || SVGExternalResourcesRequired::parseAttribute(name, value)) {
     } else
         ASSERT_NOT_REACHED();
@@ -116,9 +114,6 @@
     if (isLengthAttribute)
         updateRelativeLengthsInformation();
 
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
-
     RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
     if (!renderer)
         return;

Modified: trunk/Source/WebCore/svg/SVGClipPathElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGClipPathElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGClipPathElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -61,7 +61,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::clipPathUnitsAttr);
@@ -83,8 +82,6 @@
         return;
     }
 
-    if (SVGTests::parseAttribute(name, value))
-        return;
     if (SVGLangSpace::parseAttribute(name, value))
         return;
     if (SVGExternalResourcesRequired::parseAttribute(name, value))

Modified: trunk/Source/WebCore/svg/SVGEllipseElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGEllipseElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGEllipseElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -70,7 +70,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::cxAttr);
@@ -95,8 +94,7 @@
         setRxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
     else if (name == SVGNames::ryAttr)
         setRyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
-    else if (SVGTests::parseAttribute(name, value)
-             || SVGLangSpace::parseAttribute(name, value)
+    else if (SVGLangSpace::parseAttribute(name, value)
              || SVGExternalResourcesRequired::parseAttribute(name, value)) {
     } else
         ASSERT_NOT_REACHED();
@@ -120,9 +118,6 @@
 
     if (isLengthAttribute)
         updateRelativeLengthsInformation();
- 
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
 
     RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
     if (!renderer)

Modified: trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -73,7 +73,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::xAttr);
@@ -98,8 +97,7 @@
         setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
     else if (name == SVGNames::heightAttr)
         setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
-    else if (SVGTests::parseAttribute(name, value)
-               || SVGLangSpace::parseAttribute(name, value)
+    else if (SVGLangSpace::parseAttribute(name, value)
                || SVGExternalResourcesRequired::parseAttribute(name, value)) {
     } else
         ASSERT_NOT_REACHED();
@@ -124,9 +122,6 @@
     if (isLengthAttribute)
         updateRelativeLengthsInformation();
 
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
-
     if (RenderObject* renderer = this->renderer())
         RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
 }

Modified: trunk/Source/WebCore/svg/SVGGElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGGElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGGElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -55,7 +55,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
     }
@@ -69,8 +68,6 @@
         return;
     }
 
-    if (SVGTests::parseAttribute(name, value))
-        return;
     if (SVGLangSpace::parseAttribute(name, value))
         return;
     if (SVGExternalResourcesRequired::parseAttribute(name, value))
@@ -87,9 +84,6 @@
     }
 
     SVGElementInstance::InvalidationGuard invalidationGuard(this);
-    
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
 
     if (RenderObject* renderer = this->renderer())
         RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);

Modified: trunk/Source/WebCore/svg/SVGGraphicsElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGGraphicsElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGGraphicsElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -94,8 +94,10 @@
 bool SVGGraphicsElement::isSupportedAttribute(const QualifiedName& attrName)
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
-    if (supportedAttributes.isEmpty())
+    if (supportedAttributes.isEmpty()) {
+        SVGTests::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::transformAttr);
+    }
     return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 }
 
@@ -114,6 +116,9 @@
         return;
     }
 
+    if (SVGTests::parseAttribute(name, value))
+        return;
+
     ASSERT_NOT_REACHED();
 }
 
@@ -126,6 +131,9 @@
 
     SVGElementInstance::InvalidationGuard invalidationGuard(this);
 
+    if (SVGTests::handleAttributeChange(this, attrName))
+        return;
+
     RenderObject* object = renderer();
     if (!object)
         return;

Modified: trunk/Source/WebCore/svg/SVGImageElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGImageElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGImageElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -77,7 +77,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         SVGURIReference::addSupportedAttributes(supportedAttributes);
@@ -125,8 +124,7 @@
         setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
     else if (name == SVGNames::heightAttr)
         setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
-    else if (SVGTests::parseAttribute(name, value)
-             || SVGLangSpace::parseAttribute(name, value)
+    else if (SVGLangSpace::parseAttribute(name, value)
              || SVGExternalResourcesRequired::parseAttribute(name, value)
              || SVGURIReference::parseAttribute(name, value)) {
     } else
@@ -152,9 +150,6 @@
     if (isLengthAttribute)
         updateRelativeLengthsInformation();
 
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
-
     if (SVGURIReference::isKnownAttribute(attrName)) {
         m_imageLoader.updateFromElementIgnoringPreviousError();
         return;

Modified: trunk/Source/WebCore/svg/SVGLineElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGLineElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGLineElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -69,7 +69,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::x1Attr);
@@ -94,8 +93,7 @@
         setX2BaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
     else if (name == SVGNames::y2Attr)
         setY2BaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
-    else if (SVGTests::parseAttribute(name, value)
-             || SVGLangSpace::parseAttribute(name, value)
+    else if (SVGLangSpace::parseAttribute(name, value)
              || SVGExternalResourcesRequired::parseAttribute(name, value)) {
     } else
         ASSERT_NOT_REACHED();
@@ -120,9 +118,6 @@
     if (isLengthAttribute)
         updateRelativeLengthsInformation();
 
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
-
     RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
     if (!renderer)
         return;

Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGPathElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -208,7 +208,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::dAttr);
@@ -237,8 +236,6 @@
         return;
     }
 
-    if (SVGTests::parseAttribute(name, value))
-        return;
     if (SVGLangSpace::parseAttribute(name, value))
         return;
     if (SVGExternalResourcesRequired::parseAttribute(name, value))
@@ -255,9 +252,6 @@
     }
 
     SVGElementInstance::InvalidationGuard invalidationGuard(this);
-    
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
 
     RenderSVGPath* renderer = toRenderSVGPath(this->renderer());
 

Modified: trunk/Source/WebCore/svg/SVGPolyElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGPolyElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGPolyElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -69,7 +69,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::pointsAttr);
@@ -96,8 +95,6 @@
         return;
     }
 
-    if (SVGTests::parseAttribute(name, value))
-        return;
     if (SVGLangSpace::parseAttribute(name, value))
         return;
     if (SVGExternalResourcesRequired::parseAttribute(name, value))
@@ -114,9 +111,6 @@
     }
 
     SVGElementInstance::InvalidationGuard invalidationGuard(this);
-    
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
 
     RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
     if (!renderer)

Modified: trunk/Source/WebCore/svg/SVGRectElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGRectElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGRectElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -75,7 +75,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         supportedAttributes.add(SVGNames::xAttr);
@@ -106,8 +105,7 @@
         setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
     else if (name == SVGNames::heightAttr)
         setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
-    else if (SVGTests::parseAttribute(name, value)
-             || SVGLangSpace::parseAttribute(name, value)
+    else if (SVGLangSpace::parseAttribute(name, value)
              || SVGExternalResourcesRequired::parseAttribute(name, value)) {
     } else
         ASSERT_NOT_REACHED();
@@ -134,9 +132,6 @@
     if (isLengthAttribute)
         updateRelativeLengthsInformation();
 
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
-
     RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
     if (!renderer)
         return;

Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGSVGElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -268,8 +268,7 @@
         setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
     else if (name == SVGNames::heightAttr)
         setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
-    else if (SVGTests::parseAttribute(name, value)
-               || SVGLangSpace::parseAttribute(name, value)
+    else if (SVGLangSpace::parseAttribute(name, value)
                || SVGExternalResourcesRequired::parseAttribute(name, value)
                || SVGFitToViewBox::parseAttribute(this, name, value)
                || SVGZoomAndPan::parseAttribute(this, name, value)) {
@@ -280,7 +279,7 @@
 }
 
 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName)
-{ 
+{
     bool updateRelativeLengthsOrViewBox = false;
     bool widthChanged = attrName == SVGNames::widthAttr;
     if (widthChanged
@@ -306,8 +305,6 @@
     }
 
     SVGElementInstance::InvalidationGuard invalidationGuard(this);
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
 
     if (updateRelativeLengthsOrViewBox
         || SVGLangSpace::isKnownAttribute(attrName)
@@ -318,7 +315,7 @@
         return;
     }
 
-    SVGStyledElement::svgAttributeChanged(attrName);
+    SVGGraphicsElement::svgAttributeChanged(attrName);
 }
 
 unsigned SVGSVGElement::suspendRedraw(unsigned /* maxWaitMilliseconds */)

Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (152342 => 152343)


--- trunk/Source/WebCore/svg/SVGUseElement.cpp	2013-07-03 07:44:23 UTC (rev 152342)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp	2013-07-03 08:03:53 UTC (rev 152343)
@@ -135,7 +135,6 @@
 {
     DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     if (supportedAttributes.isEmpty()) {
-        SVGTests::addSupportedAttributes(supportedAttributes);
         SVGLangSpace::addSupportedAttributes(supportedAttributes);
         SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
         SVGURIReference::addSupportedAttributes(supportedAttributes);
@@ -161,8 +160,7 @@
         setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
     else if (name == SVGNames::heightAttr)
         setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
-    else if (SVGTests::parseAttribute(name, value)
-             || SVGLangSpace::parseAttribute(name, value)
+    else if (SVGLangSpace::parseAttribute(name, value)
              || SVGExternalResourcesRequired::parseAttribute(name, value)
              || SVGURIReference::parseAttribute(name, value)) {
     } else
@@ -238,9 +236,6 @@
         return;
     }
 
-    if (SVGTests::handleAttributeChange(this, attrName))
-        return;
-
     if (SVGExternalResourcesRequired::handleAttributeChange(this, attrName))
         return;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to