[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c
krit at webkit.org
krit at webkit.org
Mon Dec 27 16:29:56 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 1c0529cb057df2dc20d0223344dbcfa12f64af95
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 22 12:25:23 2010 +0000
2010-12-22 Dirk Schulze <krit at wbekit.org>
Reviewed by Nikolas Zimmermann.
Cleanup SVG code according to the webkit style rules 1
https://bugs.webkit.org/show_bug.cgi?id=51411
First patch to fix indention and other style issues according to the WebKit style rules in the SVG code.
No change of functionality.
* svg/ColorDistance.cpp:
(WebCore::ColorDistance::isZero):
* svg/ColorDistance.h:
* svg/ElementTimeControl.h:
(WebCore::ElementTimeControl::~ElementTimeControl):
* svg/LinearGradientAttributes.h:
(WebCore::LinearGradientAttributes::LinearGradientAttributes):
(WebCore::LinearGradientAttributes::x1):
(WebCore::LinearGradientAttributes::y1):
(WebCore::LinearGradientAttributes::x2):
(WebCore::LinearGradientAttributes::y2):
(WebCore::LinearGradientAttributes::setX1):
(WebCore::LinearGradientAttributes::setY1):
(WebCore::LinearGradientAttributes::setX2):
(WebCore::LinearGradientAttributes::setY2):
(WebCore::LinearGradientAttributes::hasX1):
(WebCore::LinearGradientAttributes::hasY1):
(WebCore::LinearGradientAttributes::hasX2):
(WebCore::LinearGradientAttributes::hasY2):
* svg/RadialGradientAttributes.h:
(WebCore::RadialGradientAttributes::RadialGradientAttributes):
(WebCore::RadialGradientAttributes::cx):
(WebCore::RadialGradientAttributes::cy):
(WebCore::RadialGradientAttributes::r):
(WebCore::RadialGradientAttributes::fx):
(WebCore::RadialGradientAttributes::fy):
(WebCore::RadialGradientAttributes::setCx):
(WebCore::RadialGradientAttributes::setCy):
(WebCore::RadialGradientAttributes::setR):
(WebCore::RadialGradientAttributes::setFx):
(WebCore::RadialGradientAttributes::setFy):
(WebCore::RadialGradientAttributes::hasCx):
(WebCore::RadialGradientAttributes::hasCy):
(WebCore::RadialGradientAttributes::hasR):
(WebCore::RadialGradientAttributes::hasFx):
(WebCore::RadialGradientAttributes::hasFy):
* svg/SVGAngle.cpp:
* svg/SVGAnimateColorElement.h:
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateAnimatedValue):
(WebCore::SVGAnimateElement::calculateDistance):
* svg/SVGAnimateElement.h:
* svg/SVGAnimateMotionElement.cpp:
* svg/SVGAnimateMotionElement.h:
* svg/SVGAnimatedNumber.h:
* svg/SVGAnimationElement.cpp:
(WebCore::parseKeyTimes):
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
(WebCore::SVGAnimationElement::updateAnimation):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::svgAttributeChanged):
* svg/SVGColor.h:
(WebCore::SVGColor::create):
(WebCore::SVGColor::createCurrentColor):
(WebCore::SVGColor::colorType):
(WebCore::SVGColor::setRGBColor):
(WebCore::SVGColor::color):
(WebCore::SVGColor::isSVGColor):
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::svgAttributeChanged):
* svg/SVGCursorElement.h:
* svg/SVGDescElement.h:
(WebCore::SVGDescElement::rendererIsNeeded):
* svg/SVGDocument.cpp:
* svg/SVGDocument.h:
(WebCore::SVGDocument::create):
(WebCore::SVGDocument::isSVGDocument):
* svg/SVGElement.h:
(WebCore::SVGElement::isStyled):
(WebCore::SVGElement::isStyledTransformable):
(WebCore::SVGElement::isStyledLocatable):
(WebCore::SVGElement::isSVG):
(WebCore::SVGElement::isFilterEffect):
(WebCore::SVGElement::isGradientStop):
(WebCore::SVGElement::isTextContent):
(WebCore::SVGElement::isValid):
(WebCore::SVGElement::svgAttributeChanged):
(WebCore::SVGElement::synchronizeProperty):
(WebCore::SVGElement::supplementalTransform):
(WebCore::SVGElement::invalidateSVGAttributes):
(WebCore::SVGElement::rendererIsNeeded):
(WebCore::SVGElement::needsPendingResourceHandling):
(WebCore::SVGElement::buildPendingResource):
* svg/SVGElementInstance.h:
(WebCore::SVGElementInstance::create):
(WebCore::SVGElementInstance::correspondingElement):
(WebCore::SVGElementInstance::correspondingUseElement):
(WebCore::SVGElementInstance::shadowTreeElement):
(WebCore::SVGElementInstance::parentNode):
(WebCore::SVGElementInstance::previousSibling):
(WebCore::SVGElementInstance::nextSibling):
(WebCore::SVGElementInstance::firstChild):
(WebCore::SVGElementInstance::lastChild):
(WebCore::SVGElementInstance::ownerDocument):
(WebCore::SVGElementInstance::toNode):
(WebCore::SVGElementInstance::toSVGElementInstance):
(WebCore::SVGElementInstance::hasChildNodes):
(WebCore::SVGElementInstance::setFirstChild):
(WebCore::SVGElementInstance::setLastChild):
(WebCore::SVGElementInstance::setNextSibling):
(WebCore::SVGElementInstance::setPreviousSibling):
(WebCore::SVGElementInstance::refEventTarget):
(WebCore::SVGElementInstance::derefEventTarget):
* svg/SVGElementInstanceList.h:
(WebCore::SVGElementInstanceList::create):
* svg/SVGException.h:
(WebCore::SVGException::create):
(WebCore::SVGException::SVGException):
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::parseMappedAttribute):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::build):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::findLights):
* svg/SVGFont.cpp:
(WebCore::convertEmUnitToPixel):
* svg/SVGUseElement.cpp:
(WebCore::isDirectReference):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 543cdfb..502bec2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,133 @@
+2010-12-22 Dirk Schulze <krit at wbekit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Cleanup SVG code according to the webkit style rules 1
+ https://bugs.webkit.org/show_bug.cgi?id=51411
+
+ First patch to fix indention and other style issues according to the WebKit style rules in the SVG code.
+
+ No change of functionality.
+
+ * svg/ColorDistance.cpp:
+ (WebCore::ColorDistance::isZero):
+ * svg/ColorDistance.h:
+ * svg/ElementTimeControl.h:
+ (WebCore::ElementTimeControl::~ElementTimeControl):
+ * svg/LinearGradientAttributes.h:
+ (WebCore::LinearGradientAttributes::LinearGradientAttributes):
+ (WebCore::LinearGradientAttributes::x1):
+ (WebCore::LinearGradientAttributes::y1):
+ (WebCore::LinearGradientAttributes::x2):
+ (WebCore::LinearGradientAttributes::y2):
+ (WebCore::LinearGradientAttributes::setX1):
+ (WebCore::LinearGradientAttributes::setY1):
+ (WebCore::LinearGradientAttributes::setX2):
+ (WebCore::LinearGradientAttributes::setY2):
+ (WebCore::LinearGradientAttributes::hasX1):
+ (WebCore::LinearGradientAttributes::hasY1):
+ (WebCore::LinearGradientAttributes::hasX2):
+ (WebCore::LinearGradientAttributes::hasY2):
+ * svg/RadialGradientAttributes.h:
+ (WebCore::RadialGradientAttributes::RadialGradientAttributes):
+ (WebCore::RadialGradientAttributes::cx):
+ (WebCore::RadialGradientAttributes::cy):
+ (WebCore::RadialGradientAttributes::r):
+ (WebCore::RadialGradientAttributes::fx):
+ (WebCore::RadialGradientAttributes::fy):
+ (WebCore::RadialGradientAttributes::setCx):
+ (WebCore::RadialGradientAttributes::setCy):
+ (WebCore::RadialGradientAttributes::setR):
+ (WebCore::RadialGradientAttributes::setFx):
+ (WebCore::RadialGradientAttributes::setFy):
+ (WebCore::RadialGradientAttributes::hasCx):
+ (WebCore::RadialGradientAttributes::hasCy):
+ (WebCore::RadialGradientAttributes::hasR):
+ (WebCore::RadialGradientAttributes::hasFx):
+ (WebCore::RadialGradientAttributes::hasFy):
+ * svg/SVGAngle.cpp:
+ * svg/SVGAnimateColorElement.h:
+ * svg/SVGAnimateElement.cpp:
+ (WebCore::SVGAnimateElement::calculateAnimatedValue):
+ (WebCore::SVGAnimateElement::calculateDistance):
+ * svg/SVGAnimateElement.h:
+ * svg/SVGAnimateMotionElement.cpp:
+ * svg/SVGAnimateMotionElement.h:
+ * svg/SVGAnimatedNumber.h:
+ * svg/SVGAnimationElement.cpp:
+ (WebCore::parseKeyTimes):
+ (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
+ (WebCore::SVGAnimationElement::updateAnimation):
+ * svg/SVGClipPathElement.cpp:
+ (WebCore::SVGClipPathElement::svgAttributeChanged):
+ * svg/SVGColor.h:
+ (WebCore::SVGColor::create):
+ (WebCore::SVGColor::createCurrentColor):
+ (WebCore::SVGColor::colorType):
+ (WebCore::SVGColor::setRGBColor):
+ (WebCore::SVGColor::color):
+ (WebCore::SVGColor::isSVGColor):
+ * svg/SVGCursorElement.cpp:
+ (WebCore::SVGCursorElement::svgAttributeChanged):
+ * svg/SVGCursorElement.h:
+ * svg/SVGDescElement.h:
+ (WebCore::SVGDescElement::rendererIsNeeded):
+ * svg/SVGDocument.cpp:
+ * svg/SVGDocument.h:
+ (WebCore::SVGDocument::create):
+ (WebCore::SVGDocument::isSVGDocument):
+ * svg/SVGElement.h:
+ (WebCore::SVGElement::isStyled):
+ (WebCore::SVGElement::isStyledTransformable):
+ (WebCore::SVGElement::isStyledLocatable):
+ (WebCore::SVGElement::isSVG):
+ (WebCore::SVGElement::isFilterEffect):
+ (WebCore::SVGElement::isGradientStop):
+ (WebCore::SVGElement::isTextContent):
+ (WebCore::SVGElement::isValid):
+ (WebCore::SVGElement::svgAttributeChanged):
+ (WebCore::SVGElement::synchronizeProperty):
+ (WebCore::SVGElement::supplementalTransform):
+ (WebCore::SVGElement::invalidateSVGAttributes):
+ (WebCore::SVGElement::rendererIsNeeded):
+ (WebCore::SVGElement::needsPendingResourceHandling):
+ (WebCore::SVGElement::buildPendingResource):
+ * svg/SVGElementInstance.h:
+ (WebCore::SVGElementInstance::create):
+ (WebCore::SVGElementInstance::correspondingElement):
+ (WebCore::SVGElementInstance::correspondingUseElement):
+ (WebCore::SVGElementInstance::shadowTreeElement):
+ (WebCore::SVGElementInstance::parentNode):
+ (WebCore::SVGElementInstance::previousSibling):
+ (WebCore::SVGElementInstance::nextSibling):
+ (WebCore::SVGElementInstance::firstChild):
+ (WebCore::SVGElementInstance::lastChild):
+ (WebCore::SVGElementInstance::ownerDocument):
+ (WebCore::SVGElementInstance::toNode):
+ (WebCore::SVGElementInstance::toSVGElementInstance):
+ (WebCore::SVGElementInstance::hasChildNodes):
+ (WebCore::SVGElementInstance::setFirstChild):
+ (WebCore::SVGElementInstance::setLastChild):
+ (WebCore::SVGElementInstance::setNextSibling):
+ (WebCore::SVGElementInstance::setPreviousSibling):
+ (WebCore::SVGElementInstance::refEventTarget):
+ (WebCore::SVGElementInstance::derefEventTarget):
+ * svg/SVGElementInstanceList.h:
+ (WebCore::SVGElementInstanceList::create):
+ * svg/SVGException.h:
+ (WebCore::SVGException::create):
+ (WebCore::SVGException::SVGException):
+ * svg/SVGFEColorMatrixElement.cpp:
+ (WebCore::SVGFEColorMatrixElement::parseMappedAttribute):
+ * svg/SVGFEComponentTransferElement.cpp:
+ (WebCore::SVGFEComponentTransferElement::build):
+ * svg/SVGFEDiffuseLightingElement.cpp:
+ (WebCore::SVGFEDiffuseLightingElement::findLights):
+ * svg/SVGFont.cpp:
+ (WebCore::convertEmUnitToPixel):
+ * svg/SVGUseElement.cpp:
+ (WebCore::isDirectReference):
+
2010-12-22 Dai Mikurube <dmikurube at google.com>
Reviewed by Kent Tamura.
diff --git a/WebCore/svg/ColorDistance.cpp b/WebCore/svg/ColorDistance.cpp
index c2fd1a6..bb682b9 100644
--- a/WebCore/svg/ColorDistance.cpp
+++ b/WebCore/svg/ColorDistance.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#if ENABLE(SVG)
#include "ColorDistance.h"
+
#include "Color.h"
#include <wtf/MathExtras.h>
@@ -78,7 +79,7 @@ Color ColorDistance::addToColorAndClamp(const Color& color) const
bool ColorDistance::isZero() const
{
- return (m_redDiff == 0 && m_blueDiff == 0 && m_greenDiff == 0);
+ return !m_redDiff && !m_blueDiff && !m_greenDiff;
}
float ColorDistance::distance() const
diff --git a/WebCore/svg/ColorDistance.h b/WebCore/svg/ColorDistance.h
index de52df3..2c142b7 100644
--- a/WebCore/svg/ColorDistance.h
+++ b/WebCore/svg/ColorDistance.h
@@ -23,28 +23,28 @@
namespace WebCore {
- class Color;
+class Color;
+
+class ColorDistance {
+public:
+ ColorDistance();
+ ColorDistance(const Color& fromColor, const Color& toColor);
+ ColorDistance(int redDiff, int blueDiff, int greenDiff);
- class ColorDistance {
- public:
- ColorDistance();
- ColorDistance(const Color& fromColor, const Color& toColor);
- ColorDistance(int redDiff, int blueDiff, int greenDiff);
-
- ColorDistance scaledDistance(float scaleFactor) const;
- Color addToColorAndClamp(const Color&) const;
+ ColorDistance scaledDistance(float scaleFactor) const;
+ Color addToColorAndClamp(const Color&) const;
- static Color addColorsAndClamp(const Color&, const Color&);
+ static Color addColorsAndClamp(const Color&, const Color&);
- bool isZero() const;
-
- float distance() const;
+ bool isZero() const;
+
+ float distance() const;
- private:
- short m_redDiff;
- short m_greenDiff;
- short m_blueDiff;
- };
+private:
+ short m_redDiff;
+ short m_greenDiff;
+ short m_blueDiff;
+};
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/ElementTimeControl.h b/WebCore/svg/ElementTimeControl.h
index c0b4fdb..101d8d0 100644
--- a/WebCore/svg/ElementTimeControl.h
+++ b/WebCore/svg/ElementTimeControl.h
@@ -33,14 +33,14 @@
namespace WebCore {
- class ElementTimeControl {
- public:
- virtual ~ElementTimeControl() {}
- virtual void beginElement() = 0;
- virtual void beginElementAt(float offset) = 0;
- virtual void endElement() = 0;
- virtual void endElementAt(float offset) = 0;
- };
+class ElementTimeControl {
+public:
+ virtual ~ElementTimeControl() {}
+ virtual void beginElement() = 0;
+ virtual void beginElementAt(float offset) = 0;
+ virtual void endElement() = 0;
+ virtual void endElementAt(float offset) = 0;
+};
}
diff --git a/WebCore/svg/LinearGradientAttributes.h b/WebCore/svg/LinearGradientAttributes.h
index 9f37860..6ff28f1 100644
--- a/WebCore/svg/LinearGradientAttributes.h
+++ b/WebCore/svg/LinearGradientAttributes.h
@@ -24,47 +24,47 @@
#include "GradientAttributes.h"
namespace WebCore {
- struct LinearGradientAttributes : GradientAttributes {
- LinearGradientAttributes()
- : m_x1()
- , m_y1()
- , m_x2(LengthModeWidth, "100%")
- , m_y2()
- , m_x1Set(false)
- , m_y1Set(false)
- , m_x2Set(false)
- , m_y2Set(false)
- {
- }
+struct LinearGradientAttributes : GradientAttributes {
+ LinearGradientAttributes()
+ : m_x1()
+ , m_y1()
+ , m_x2(LengthModeWidth, "100%")
+ , m_y2()
+ , m_x1Set(false)
+ , m_y1Set(false)
+ , m_x2Set(false)
+ , m_y2Set(false)
+ {
+ }
- SVGLength x1() const { return m_x1; }
- SVGLength y1() const { return m_y1; }
- SVGLength x2() const { return m_x2; }
- SVGLength y2() const { return m_y2; }
+ SVGLength x1() const { return m_x1; }
+ SVGLength y1() const { return m_y1; }
+ SVGLength x2() const { return m_x2; }
+ SVGLength y2() const { return m_y2; }
- void setX1(const SVGLength& value) { m_x1 = value; m_x1Set = true; }
- void setY1(const SVGLength& value) { m_y1 = value; m_y1Set = true; }
- void setX2(const SVGLength& value) { m_x2 = value; m_x2Set = true; }
- void setY2(const SVGLength& value) { m_y2 = value; m_y2Set = true; }
+ void setX1(const SVGLength& value) { m_x1 = value; m_x1Set = true; }
+ void setY1(const SVGLength& value) { m_y1 = value; m_y1Set = true; }
+ void setX2(const SVGLength& value) { m_x2 = value; m_x2Set = true; }
+ void setY2(const SVGLength& value) { m_y2 = value; m_y2Set = true; }
- bool hasX1() const { return m_x1Set; }
- bool hasY1() const { return m_y1Set; }
- bool hasX2() const { return m_x2Set; }
- bool hasY2() const { return m_y2Set; }
+ bool hasX1() const { return m_x1Set; }
+ bool hasY1() const { return m_y1Set; }
+ bool hasX2() const { return m_x2Set; }
+ bool hasY2() const { return m_y2Set; }
- private:
- // Properties
- SVGLength m_x1;
- SVGLength m_y1;
- SVGLength m_x2;
- SVGLength m_y2;
+private:
+ // Properties
+ SVGLength m_x1;
+ SVGLength m_y1;
+ SVGLength m_x2;
+ SVGLength m_y2;
- // Property states
- bool m_x1Set : 1;
- bool m_y1Set : 1;
- bool m_x2Set : 1;
- bool m_y2Set : 1;
- };
+ // Property states
+ bool m_x1Set : 1;
+ bool m_y1Set : 1;
+ bool m_x2Set : 1;
+ bool m_y2Set : 1;
+};
} // namespace WebCore
diff --git a/WebCore/svg/RadialGradientAttributes.h b/WebCore/svg/RadialGradientAttributes.h
index 7e2875b..5fb06e9 100644
--- a/WebCore/svg/RadialGradientAttributes.h
+++ b/WebCore/svg/RadialGradientAttributes.h
@@ -24,54 +24,54 @@
#include "GradientAttributes.h"
namespace WebCore {
- struct RadialGradientAttributes : GradientAttributes {
- RadialGradientAttributes()
- : m_cx(LengthModeWidth, "50%")
- , m_cy(LengthModeWidth, "50%")
- , m_r(LengthModeWidth, "50%")
- , m_fx()
- , m_fy()
- , m_cxSet(false)
- , m_cySet(false)
- , m_rSet(false)
- , m_fxSet(false)
- , m_fySet(false)
- {
- }
+struct RadialGradientAttributes : GradientAttributes {
+ RadialGradientAttributes()
+ : m_cx(LengthModeWidth, "50%")
+ , m_cy(LengthModeWidth, "50%")
+ , m_r(LengthModeWidth, "50%")
+ , m_fx()
+ , m_fy()
+ , m_cxSet(false)
+ , m_cySet(false)
+ , m_rSet(false)
+ , m_fxSet(false)
+ , m_fySet(false)
+ {
+ }
- SVGLength cx() const { return m_cx; }
- SVGLength cy() const { return m_cy; }
- SVGLength r() const { return m_r; }
- SVGLength fx() const { return m_fx; }
- SVGLength fy() const { return m_fy; }
+ SVGLength cx() const { return m_cx; }
+ SVGLength cy() const { return m_cy; }
+ SVGLength r() const { return m_r; }
+ SVGLength fx() const { return m_fx; }
+ SVGLength fy() const { return m_fy; }
- void setCx(const SVGLength& value) { m_cx = value; m_cxSet = true; }
- void setCy(const SVGLength& value) { m_cy = value; m_cySet = true; }
- void setR(const SVGLength& value) { m_r = value; m_rSet = true; }
- void setFx(const SVGLength& value) { m_fx = value; m_fxSet = true; }
- void setFy(const SVGLength& value) { m_fy = value; m_fySet = true; }
+ void setCx(const SVGLength& value) { m_cx = value; m_cxSet = true; }
+ void setCy(const SVGLength& value) { m_cy = value; m_cySet = true; }
+ void setR(const SVGLength& value) { m_r = value; m_rSet = true; }
+ void setFx(const SVGLength& value) { m_fx = value; m_fxSet = true; }
+ void setFy(const SVGLength& value) { m_fy = value; m_fySet = true; }
- bool hasCx() const { return m_cxSet; }
- bool hasCy() const { return m_cySet; }
- bool hasR() const { return m_rSet; }
- bool hasFx() const { return m_fxSet; }
- bool hasFy() const { return m_fySet; }
+ bool hasCx() const { return m_cxSet; }
+ bool hasCy() const { return m_cySet; }
+ bool hasR() const { return m_rSet; }
+ bool hasFx() const { return m_fxSet; }
+ bool hasFy() const { return m_fySet; }
- private:
- // Properties
- SVGLength m_cx;
- SVGLength m_cy;
- SVGLength m_r;
- SVGLength m_fx;
- SVGLength m_fy;
+private:
+ // Properties
+ SVGLength m_cx;
+ SVGLength m_cy;
+ SVGLength m_r;
+ SVGLength m_fx;
+ SVGLength m_fy;
- // Property states
- bool m_cxSet : 1;
- bool m_cySet : 1;
- bool m_rSet : 1;
- bool m_fxSet : 1;
- bool m_fySet : 1;
- };
+ // Property states
+ bool m_cxSet : 1;
+ bool m_cySet : 1;
+ bool m_rSet : 1;
+ bool m_fxSet : 1;
+ bool m_fySet : 1;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGAngle.cpp b/WebCore/svg/SVGAngle.cpp
index 6475064..37cb73a 100644
--- a/WebCore/svg/SVGAngle.cpp
+++ b/WebCore/svg/SVGAngle.cpp
@@ -25,8 +25,8 @@
#include "SVGAngle.h"
#include "SVGParserUtilities.h"
-#include <wtf/text/StringConcatenate.h>
#include <wtf/MathExtras.h>
+#include <wtf/text/StringConcatenate.h>
namespace WebCore {
diff --git a/WebCore/svg/SVGAnimateColorElement.h b/WebCore/svg/SVGAnimateColorElement.h
index d36c8de..140c55f 100644
--- a/WebCore/svg/SVGAnimateColorElement.h
+++ b/WebCore/svg/SVGAnimateColorElement.h
@@ -27,14 +27,14 @@
namespace WebCore {
- // SVGAnimateElement implements superset of the functionality.
- class SVGAnimateColorElement : public SVGAnimateElement {
- public:
- static PassRefPtr<SVGAnimateColorElement> create(const QualifiedName&, Document*);
-
- private:
- SVGAnimateColorElement(const QualifiedName&, Document*);
- };
+// SVGAnimateElement implements superset of the functionality.
+class SVGAnimateColorElement : public SVGAnimateElement {
+public:
+ static PassRefPtr<SVGAnimateColorElement> create(const QualifiedName&, Document*);
+
+private:
+ SVGAnimateColorElement(const QualifiedName&, Document*);
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGAnimateElement.cpp b/WebCore/svg/SVGAnimateElement.cpp
index fadb845..7fe4c87 100644
--- a/WebCore/svg/SVGAnimateElement.cpp
+++ b/WebCore/svg/SVGAnimateElement.cpp
@@ -165,8 +165,9 @@ void SVGAnimateElement::calculateAnimatedValue(float percentage, unsigned repeat
}
}
return;
- } else if (m_propertyType == PointsProperty) {
- if (percentage == 0)
+ }
+ if (m_propertyType == PointsProperty) {
+ if (!percentage)
results->m_animatedPoints = m_fromPoints;
else if (percentage == 1.f)
results->m_animatedPoints = m_toPoints;
@@ -318,7 +319,8 @@ float SVGAnimateElement::calculateDistance(const String& fromString, const Strin
if (!parseNumberValueAndUnit(toString, to, unit))
return -1.f;
return narrowPrecisionToFloat(fabs(to - from));
- } else if (m_propertyType == ColorProperty) {
+ }
+ if (m_propertyType == ColorProperty) {
Color from = SVGColor::colorFromRGBColorString(fromString);
if (!from.isValid())
return -1.f;
diff --git a/WebCore/svg/SVGAnimateElement.h b/WebCore/svg/SVGAnimateElement.h
index e478cf8..3217c4a 100644
--- a/WebCore/svg/SVGAnimateElement.h
+++ b/WebCore/svg/SVGAnimateElement.h
@@ -32,47 +32,47 @@
namespace WebCore {
- class SVGPathSegList;
+class SVGPathSegList;
- class SVGAnimateElement : public SVGAnimationElement {
- public:
- static PassRefPtr<SVGAnimateElement> create(const QualifiedName&, Document*);
+class SVGAnimateElement : public SVGAnimationElement {
+public:
+ static PassRefPtr<SVGAnimateElement> create(const QualifiedName&, Document*);
- virtual ~SVGAnimateElement();
+ virtual ~SVGAnimateElement();
- protected:
- SVGAnimateElement(const QualifiedName&, Document*);
-
- virtual void resetToBaseValue(const String&);
- virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
- virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
- virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement);
- virtual void applyResultsToTarget();
- virtual float calculateDistance(const String& fromString, const String& toString);
+protected:
+ SVGAnimateElement(const QualifiedName&, Document*);
- private:
- enum PropertyType { NumberProperty, ColorProperty, StringProperty, PathProperty, PointsProperty };
- PropertyType determinePropertyType(const String& attribute) const;
- PropertyType m_propertyType;
-
- double m_fromNumber;
- double m_toNumber;
- double m_animatedNumber;
- String m_numberUnit;
- Color m_fromColor;
- Color m_toColor;
- Color m_animatedColor;
- String m_fromString;
- String m_toString;
- String m_animatedString;
- OwnPtr<SVGPathByteStream> m_fromPath;
- OwnPtr<SVGPathByteStream> m_toPath;
- OwnPtr<SVGPathByteStream> m_animatedPath;
- SVGPathByteStream* m_animatedPathPointer;
- SVGPointList m_fromPoints;
- SVGPointList m_toPoints;
- SVGPointList m_animatedPoints;
- };
+ virtual void resetToBaseValue(const String&);
+ virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
+ virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
+ virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement);
+ virtual void applyResultsToTarget();
+ virtual float calculateDistance(const String& fromString, const String& toString);
+
+private:
+ enum PropertyType { NumberProperty, ColorProperty, StringProperty, PathProperty, PointsProperty };
+ PropertyType determinePropertyType(const String& attribute) const;
+ PropertyType m_propertyType;
+
+ double m_fromNumber;
+ double m_toNumber;
+ double m_animatedNumber;
+ String m_numberUnit;
+ Color m_fromColor;
+ Color m_toColor;
+ Color m_animatedColor;
+ String m_fromString;
+ String m_toString;
+ String m_animatedString;
+ OwnPtr<SVGPathByteStream> m_fromPath;
+ OwnPtr<SVGPathByteStream> m_toPath;
+ OwnPtr<SVGPathByteStream> m_animatedPath;
+ SVGPathByteStream* m_animatedPathPointer;
+ SVGPointList m_fromPoints;
+ SVGPointList m_toPoints;
+ SVGPointList m_animatedPoints;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGAnimateMotionElement.cpp b/WebCore/svg/SVGAnimateMotionElement.cpp
index 828c15d..ec51548 100644
--- a/WebCore/svg/SVGAnimateMotionElement.cpp
+++ b/WebCore/svg/SVGAnimateMotionElement.cpp
@@ -31,10 +31,10 @@
#include "SVGMPathElement.h"
#include "SVGNames.h"
#include "SVGParserUtilities.h"
-#include "SVGPathParserFactory.h"
#include "SVGPathElement.h"
+#include "SVGPathParserFactory.h"
#include "SVGTransformList.h"
-#include <math.h>
+#include <wtf/MathExtras.h>
#include <wtf/StdLibExtras.h>
namespace WebCore {
diff --git a/WebCore/svg/SVGAnimateMotionElement.h b/WebCore/svg/SVGAnimateMotionElement.h
index 225a076..7e168c3 100644
--- a/WebCore/svg/SVGAnimateMotionElement.h
+++ b/WebCore/svg/SVGAnimateMotionElement.h
@@ -27,47 +27,47 @@
namespace WebCore {
- class SVGAnimateMotionElement : public SVGAnimationElement {
- public:
- static PassRefPtr<SVGAnimateMotionElement> create(const QualifiedName&, Document*);
+class SVGAnimateMotionElement : public SVGAnimationElement {
+public:
+ static PassRefPtr<SVGAnimateMotionElement> create(const QualifiedName&, Document*);
- private:
- SVGAnimateMotionElement(const QualifiedName&, Document*);
+private:
+ SVGAnimateMotionElement(const QualifiedName&, Document*);
- virtual bool hasValidTarget() const;
+ virtual bool hasValidTarget() const;
- virtual void parseMappedAttribute(Attribute*);
-
- virtual void resetToBaseValue(const String&);
- virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
- virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
- virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement);
- virtual void applyResultsToTarget();
- virtual float calculateDistance(const String& fromString, const String& toString);
- virtual Path animationPath() const;
-
- enum RotateMode {
- RotateAngle,
- RotateAuto,
- RotateAutoReverse
- };
- RotateMode rotateMode() const;
+ virtual void parseMappedAttribute(Attribute*);
- FloatSize m_animatedTranslation;
- float m_animatedAngle;
+ virtual void resetToBaseValue(const String&);
+ virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
+ virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
+ virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement);
+ virtual void applyResultsToTarget();
+ virtual float calculateDistance(const String& fromString, const String& toString);
+ virtual Path animationPath() const;
- // Note: we do not support percentage values for to/from coords as the spec implies we should (opera doesn't either)
- FloatPoint m_fromPoint;
- float m_fromAngle;
- FloatPoint m_toPoint;
- float m_toAngle;
+ enum RotateMode {
+ RotateAngle,
+ RotateAuto,
+ RotateAutoReverse
+ };
+ RotateMode rotateMode() const;
- unsigned m_baseIndexInTransformList;
+ FloatSize m_animatedTranslation;
+ float m_animatedAngle;
- Path m_path;
- Vector<float> m_keyPoints;
- float m_angle;
- };
+ // Note: we do not support percentage values for to/from coords as the spec implies we should (opera doesn't either)
+ FloatPoint m_fromPoint;
+ float m_fromAngle;
+ FloatPoint m_toPoint;
+ float m_toAngle;
+
+ unsigned m_baseIndexInTransformList;
+
+ Path m_path;
+ Vector<float> m_keyPoints;
+ float m_angle;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGAnimatedNumber.h b/WebCore/svg/SVGAnimatedNumber.h
index 04410d7..b59deac 100644
--- a/WebCore/svg/SVGAnimatedNumber.h
+++ b/WebCore/svg/SVGAnimatedNumber.h
@@ -21,8 +21,8 @@
#define SVGAnimatedNumber_h
#if ENABLE(SVG)
-#include "SVGAnimatedStaticPropertyTearOff.h"
#include "SVGAnimatedPropertyMacros.h"
+#include "SVGAnimatedStaticPropertyTearOff.h"
namespace WebCore {
diff --git a/WebCore/svg/SVGAnimationElement.cpp b/WebCore/svg/SVGAnimationElement.cpp
index cc16536..2acb085 100644
--- a/WebCore/svg/SVGAnimationElement.cpp
+++ b/WebCore/svg/SVGAnimationElement.cpp
@@ -73,7 +73,7 @@ static void parseKeyTimes(const String& parse, Vector<float>& result, bool verif
goto fail;
if (verifyOrder) {
if (!n) {
- if (time != 0)
+ if (time)
goto fail;
} else if (time < result.last())
goto fail;
@@ -463,7 +463,7 @@ void SVGAnimationElement::currentValuesForValuesAnimation(float percent, float&
unsigned keyTimesCount = m_keyTimes.size();
ASSERT(!keyTimesCount || valuesCount == keyTimesCount);
- ASSERT(!keyTimesCount || (keyTimesCount > 1 && m_keyTimes[0] == 0));
+ ASSERT(!keyTimesCount || (keyTimesCount > 1 && !m_keyTimes[0]));
unsigned index = calculateKeyTimesIndex(percent);
if (calcMode == CalcModeDiscrete) {
@@ -572,7 +572,7 @@ void SVGAnimationElement::updateAnimation(float percent, unsigned repeat, SVGSMI
String from;
String to;
currentValuesForValuesAnimation(percent, effectivePercent, from, to);
- if (from != m_lastValuesAnimationFrom || to != m_lastValuesAnimationTo ) {
+ if (from != m_lastValuesAnimationFrom || to != m_lastValuesAnimationTo) {
m_animationValid = calculateFromAndToValues(from, to);
if (!m_animationValid)
return;
diff --git a/WebCore/svg/SVGClipPathElement.cpp b/WebCore/svg/SVGClipPathElement.cpp
index c161e80..d86370d 100644
--- a/WebCore/svg/SVGClipPathElement.cpp
+++ b/WebCore/svg/SVGClipPathElement.cpp
@@ -75,11 +75,11 @@ void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName)
if (!object)
return;
- if (attrName == SVGNames::clipPathUnitsAttr ||
- SVGTests::isKnownAttribute(attrName) ||
- SVGLangSpace::isKnownAttribute(attrName) ||
- SVGExternalResourcesRequired::isKnownAttribute(attrName) ||
- SVGStyledTransformableElement::isKnownAttribute(attrName))
+ if (attrName == SVGNames::clipPathUnitsAttr
+ || SVGTests::isKnownAttribute(attrName)
+ || SVGLangSpace::isKnownAttribute(attrName)
+ || SVGExternalResourcesRequired::isKnownAttribute(attrName)
+ || SVGStyledTransformableElement::isKnownAttribute(attrName))
object->setNeedsLayout(true);
}
diff --git a/WebCore/svg/SVGColor.h b/WebCore/svg/SVGColor.h
index f8b55f0..6d8b94e 100644
--- a/WebCore/svg/SVGColor.h
+++ b/WebCore/svg/SVGColor.h
@@ -28,61 +28,61 @@
namespace WebCore {
- class RGBColor;
-
- class SVGColor : public CSSValue {
- public:
- static PassRefPtr<SVGColor> create(const String& color)
- {
- return adoptRef(new SVGColor(color));
- }
- static PassRefPtr<SVGColor> create(const Color& color)
- {
- return adoptRef(new SVGColor(color));
- }
- static PassRefPtr<SVGColor> createCurrentColor()
- {
- return adoptRef(new SVGColor(SVG_COLORTYPE_CURRENTCOLOR));
- }
-
- enum SVGColorType {
- SVG_COLORTYPE_UNKNOWN = 0,
- SVG_COLORTYPE_RGBCOLOR = 1,
- SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2,
- SVG_COLORTYPE_CURRENTCOLOR = 3
- };
+class RGBColor;
+
+class SVGColor : public CSSValue {
+public:
+ static PassRefPtr<SVGColor> create(const String& color)
+ {
+ return adoptRef(new SVGColor(color));
+ }
+ static PassRefPtr<SVGColor> create(const Color& color)
+ {
+ return adoptRef(new SVGColor(color));
+ }
+ static PassRefPtr<SVGColor> createCurrentColor()
+ {
+ return adoptRef(new SVGColor(SVG_COLORTYPE_CURRENTCOLOR));
+ }
+
+ enum SVGColorType {
+ SVG_COLORTYPE_UNKNOWN = 0,
+ SVG_COLORTYPE_RGBCOLOR = 1,
+ SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2,
+ SVG_COLORTYPE_CURRENTCOLOR = 3
+ };
- // 'SVGColor' functions
- unsigned short colorType() const { return m_colorType; }
+ // 'SVGColor' functions
+ unsigned short colorType() const { return m_colorType; }
- PassRefPtr<RGBColor> rgbColor() const;
+ PassRefPtr<RGBColor> rgbColor() const;
- static Color colorFromRGBColorString(const String&);
+ static Color colorFromRGBColorString(const String&);
- void setRGBColor(const String& rgbColor) { ExceptionCode ignored = 0; setRGBColor(rgbColor, ignored); }
- void setRGBColor(const String& rgbColor, ExceptionCode&);
- void setRGBColorICCColor(const String& rgbColor, const String& iccColor, ExceptionCode&);
- void setColor(unsigned short colorType, const String& rgbColor, const String& iccColor, ExceptionCode&);
+ void setRGBColor(const String& rgbColor) { ExceptionCode ignored = 0; setRGBColor(rgbColor, ignored); }
+ void setRGBColor(const String& rgbColor, ExceptionCode&);
+ void setRGBColorICCColor(const String& rgbColor, const String& iccColor, ExceptionCode&);
+ void setColor(unsigned short colorType, const String& rgbColor, const String& iccColor, ExceptionCode&);
- const Color& color() const { return m_color; }
+ const Color& color() const { return m_color; }
- protected:
- SVGColor();
- SVGColor(const String& color);
- SVGColor(const Color&);
+protected:
+ SVGColor();
+ SVGColor(const String& color);
+ SVGColor(const Color&);
- virtual String cssText() const;
+ virtual String cssText() const;
- private:
- SVGColor(SVGColorType);
+private:
+ SVGColor(SVGColorType);
- static void create(int); // compile-time guard
+ static void create(int); // compile-time guard
- virtual bool isSVGColor() const { return true; }
+ virtual bool isSVGColor() const { return true; }
- Color m_color;
- unsigned short m_colorType;
- };
+ Color m_color;
+ unsigned short m_colorType;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGCursorElement.cpp b/WebCore/svg/SVGCursorElement.cpp
index aa820a5..0c6a5d9 100644
--- a/WebCore/svg/SVGCursorElement.cpp
+++ b/WebCore/svg/SVGCursorElement.cpp
@@ -93,10 +93,11 @@ void SVGCursorElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGElement::svgAttributeChanged(attrName);
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr ||
- SVGTests::isKnownAttribute(attrName) ||
- SVGExternalResourcesRequired::isKnownAttribute(attrName) ||
- SVGURIReference::isKnownAttribute(attrName)) {
+ if (attrName == SVGNames::xAttr
+ || attrName == SVGNames::yAttr
+ || SVGTests::isKnownAttribute(attrName)
+ || SVGExternalResourcesRequired::isKnownAttribute(attrName)
+ || SVGURIReference::isKnownAttribute(attrName)) {
HashSet<SVGElement*>::const_iterator it = m_clients.begin();
HashSet<SVGElement*>::const_iterator end = m_clients.end();
diff --git a/WebCore/svg/SVGCursorElement.h b/WebCore/svg/SVGCursorElement.h
index 6ce7b19..cd4a44e 100644
--- a/WebCore/svg/SVGCursorElement.h
+++ b/WebCore/svg/SVGCursorElement.h
@@ -26,9 +26,9 @@
#include "SVGAnimatedLength.h"
#include "SVGAnimatedString.h"
#include "SVGElement.h"
+#include "SVGExternalResourcesRequired.h"
#include "SVGTests.h"
#include "SVGURIReference.h"
-#include "SVGExternalResourcesRequired.h"
namespace WebCore {
diff --git a/WebCore/svg/SVGDescElement.h b/WebCore/svg/SVGDescElement.h
index 994007c..32a7ad0 100644
--- a/WebCore/svg/SVGDescElement.h
+++ b/WebCore/svg/SVGDescElement.h
@@ -27,18 +27,18 @@
namespace WebCore {
- class SVGDescElement : public SVGStyledElement,
- public SVGLangSpace {
- public:
- static PassRefPtr<SVGDescElement> create(const QualifiedName&, Document*);
+class SVGDescElement : public SVGStyledElement,
+ public SVGLangSpace {
+public:
+ static PassRefPtr<SVGDescElement> create(const QualifiedName&, Document*);
- String description() const;
+ String description() const;
- private:
- SVGDescElement(const QualifiedName&, Document*);
+private:
+ SVGDescElement(const QualifiedName&, Document*);
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- };
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGDocument.cpp b/WebCore/svg/SVGDocument.cpp
index e6d53a4..9b200b7 100644
--- a/WebCore/svg/SVGDocument.cpp
+++ b/WebCore/svg/SVGDocument.cpp
@@ -30,8 +30,8 @@
#include "SVGNames.h"
#include "SVGSVGElement.h"
#include "SVGViewSpec.h"
-#include "SVGZoomEvent.h"
#include "SVGZoomAndPan.h"
+#include "SVGZoomEvent.h"
namespace WebCore {
diff --git a/WebCore/svg/SVGDocument.h b/WebCore/svg/SVGDocument.h
index 58e3518..b934145 100644
--- a/WebCore/svg/SVGDocument.h
+++ b/WebCore/svg/SVGDocument.h
@@ -27,36 +27,36 @@
namespace WebCore {
- class DOMImplementation;
- class SVGElement;
- class SVGSVGElement;
+class DOMImplementation;
+class SVGElement;
+class SVGSVGElement;
- class SVGDocument : public Document {
- public:
- static PassRefPtr<SVGDocument> create(Frame* frame, const KURL& url)
- {
- return adoptRef(new SVGDocument(frame, url));
- }
+class SVGDocument : public Document {
+public:
+ static PassRefPtr<SVGDocument> create(Frame* frame, const KURL& url)
+ {
+ return adoptRef(new SVGDocument(frame, url));
+ }
- SVGSVGElement* rootElement() const;
-
- void dispatchZoomEvent(float prevScale, float newScale);
- void dispatchScrollEvent();
+ SVGSVGElement* rootElement() const;
- bool zoomAndPanEnabled() const;
+ void dispatchZoomEvent(float prevScale, float newScale);
+ void dispatchScrollEvent();
- void startPan(const FloatPoint& start);
- void updatePan(const FloatPoint& pos) const;
+ bool zoomAndPanEnabled() const;
- private:
- SVGDocument(Frame*, const KURL&);
+ void startPan(const FloatPoint& start);
+ void updatePan(const FloatPoint& pos) const;
- virtual bool isSVGDocument() const { return true; }
+private:
+ SVGDocument(Frame*, const KURL&);
- virtual bool childShouldCreateRenderer(Node*) const;
+ virtual bool isSVGDocument() const { return true; }
- FloatPoint m_translate;
- };
+ virtual bool childShouldCreateRenderer(Node*) const;
+
+ FloatPoint m_translate;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGElement.h b/WebCore/svg/SVGElement.h
index 3098335..0fe9a4f 100644
--- a/WebCore/svg/SVGElement.h
+++ b/WebCore/svg/SVGElement.h
@@ -29,86 +29,86 @@
namespace WebCore {
- class CSSCursorImageValue;
- class Document;
- class SVGCursorElement;
- class SVGElementInstance;
- class SVGElementRareData;
- class SVGSVGElement;
- class AffineTransform;
+class CSSCursorImageValue;
+class Document;
+class SVGCursorElement;
+class SVGElementInstance;
+class SVGElementRareData;
+class SVGSVGElement;
+class AffineTransform;
- class SVGElement : public StyledElement {
- public:
- static PassRefPtr<SVGElement> create(const QualifiedName&, Document*);
- virtual ~SVGElement();
+class SVGElement : public StyledElement {
+public:
+ static PassRefPtr<SVGElement> create(const QualifiedName&, Document*);
+ virtual ~SVGElement();
- String xmlbase() const;
- void setXmlbase(const String&, ExceptionCode&);
+ String xmlbase() const;
+ void setXmlbase(const String&, ExceptionCode&);
- SVGSVGElement* ownerSVGElement() const;
- SVGElement* viewportElement() const;
+ SVGSVGElement* ownerSVGElement() const;
+ SVGElement* viewportElement() const;
- SVGDocumentExtensions* accessDocumentSVGExtensions() const;
+ SVGDocumentExtensions* accessDocumentSVGExtensions() const;
- virtual bool isStyled() const { return false; }
- virtual bool isStyledTransformable() const { return false; }
- virtual bool isStyledLocatable() const { return false; }
- virtual bool isSVG() const { return false; }
- virtual bool isFilterEffect() const { return false; }
- virtual bool isGradientStop() const { return false; }
- virtual bool isTextContent() const { return false; }
+ virtual bool isStyled() const { return false; }
+ virtual bool isStyledTransformable() const { return false; }
+ virtual bool isStyledLocatable() const { return false; }
+ virtual bool isSVG() const { return false; }
+ virtual bool isFilterEffect() const { return false; }
+ virtual bool isGradientStop() const { return false; }
+ virtual bool isTextContent() const { return false; }
- // For SVGTests
- virtual bool isValid() const { return true; }
+ // For SVGTests
+ virtual bool isValid() const { return true; }
- virtual void svgAttributeChanged(const QualifiedName&) { }
- virtual void synchronizeProperty(const QualifiedName&) { }
+ virtual void svgAttributeChanged(const QualifiedName&) { }
+ virtual void synchronizeProperty(const QualifiedName&) { }
- void sendSVGLoadEventIfPossible(bool sendParentLoadEvents = false);
-
- virtual AffineTransform* supplementalTransform() { return 0; }
+ void sendSVGLoadEventIfPossible(bool sendParentLoadEvents = false);
- void invalidateSVGAttributes() { clearAreSVGAttributesValid(); }
+ virtual AffineTransform* supplementalTransform() { return 0; }
- const HashSet<SVGElementInstance*>& instancesForElement() const;
+ void invalidateSVGAttributes() { clearAreSVGAttributesValid(); }
- bool boundingBox(FloatRect&, SVGLocatable::StyleUpdateStrategy = SVGLocatable::AllowStyleUpdate) const;
+ const HashSet<SVGElementInstance*>& instancesForElement() const;
- void setCursorElement(SVGCursorElement*);
- void cursorElementRemoved();
- void setCursorImageValue(CSSCursorImageValue*);
- void cursorImageElementRemoved();
+ bool boundingBox(FloatRect&, SVGLocatable::StyleUpdateStrategy = SVGLocatable::AllowStyleUpdate) const;
- virtual void updateAnimatedSVGAttribute(const QualifiedName&) const;
+ void setCursorElement(SVGCursorElement*);
+ void cursorElementRemoved();
+ void setCursorImageValue(CSSCursorImageValue*);
+ void cursorImageElementRemoved();
- protected:
- SVGElement(const QualifiedName&, Document*);
+ virtual void updateAnimatedSVGAttribute(const QualifiedName&) const;
- virtual void parseMappedAttribute(Attribute*);
+protected:
+ SVGElement(const QualifiedName&, Document*);
- virtual void finishParsingChildren();
- virtual void insertedIntoDocument();
- virtual void attributeChanged(Attribute*, bool preserveDecls = false);
- virtual bool childShouldCreateRenderer(Node*) const;
+ virtual void parseMappedAttribute(Attribute*);
- SVGElementRareData* rareSVGData() const;
- SVGElementRareData* ensureRareSVGData();
+ virtual void finishParsingChildren();
+ virtual void insertedIntoDocument();
+ virtual void attributeChanged(Attribute*, bool preserveDecls = false);
+ virtual bool childShouldCreateRenderer(Node*) const;
- private:
- friend class SVGElementInstance;
+ SVGElementRareData* rareSVGData() const;
+ SVGElementRareData* ensureRareSVGData();
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+private:
+ friend class SVGElementInstance;
- virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- virtual bool needsPendingResourceHandling() const { return true; }
- virtual void buildPendingResource() { }
+ virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
- void mapInstanceToElement(SVGElementInstance*);
- void removeInstanceMapping(SVGElementInstance*);
+ virtual bool needsPendingResourceHandling() const { return true; }
+ virtual void buildPendingResource() { }
- virtual bool haveLoadedRequiredResources();
- };
+ void mapInstanceToElement(SVGElementInstance*);
+ void removeInstanceMapping(SVGElementInstance*);
+
+ virtual bool haveLoadedRequiredResources();
+};
}
diff --git a/WebCore/svg/SVGElementInstance.h b/WebCore/svg/SVGElementInstance.h
index 54471c1..3e05ee9 100644
--- a/WebCore/svg/SVGElementInstance.h
+++ b/WebCore/svg/SVGElementInstance.h
@@ -27,138 +27,138 @@
namespace WebCore {
- namespace Private {
- template<class GenericNode, class GenericNodeContainer>
- void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer* container);
- };
-
- class SVGUseElement;
- class SVGElementInstanceList;
-
- // SVGElementInstance mimics Node, but without providing all its functionality
- class SVGElementInstance : public TreeShared<SVGElementInstance>,
- public EventTarget {
- public:
- static PassRefPtr<SVGElementInstance> create(SVGUseElement* useElement, PassRefPtr<SVGElement> originalElement)
- {
- return adoptRef(new SVGElementInstance(useElement, originalElement));
- }
-
- virtual ~SVGElementInstance();
-
- virtual ScriptExecutionContext* scriptExecutionContext() const;
-
- virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
- virtual bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture);
- virtual void removeAllEventListeners();
- using EventTarget::dispatchEvent;
- virtual bool dispatchEvent(PassRefPtr<Event>);
-
- SVGElement* correspondingElement() const { return m_element.get(); }
- SVGUseElement* correspondingUseElement() const { return m_useElement; }
- SVGElement* shadowTreeElement() const { return m_shadowTreeElement.get(); }
-
- SVGElementInstance* parentNode() const { return parent(); }
- PassRefPtr<SVGElementInstanceList> childNodes();
-
- SVGElementInstance* previousSibling() const { return m_previousSibling; }
- SVGElementInstance* nextSibling() const { return m_nextSibling; }
-
- SVGElementInstance* firstChild() const { return m_firstChild; }
- SVGElementInstance* lastChild() const { return m_lastChild; }
-
- Document* ownerDocument() const { return m_element ? m_element->ownerDocument() : 0; }
-
- static void invalidateAllInstancesOfElement(SVGElement*);
-
- using TreeShared<SVGElementInstance>::ref;
- using TreeShared<SVGElementInstance>::deref;
-
- // EventTarget API
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), abort);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), blur);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), change);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), click);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), contextmenu);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dblclick);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), error);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), focus);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), input);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), keydown);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), keypress);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), keyup);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), load);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mousedown);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mousemove);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mouseout);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mouseover);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mouseup);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mousewheel);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), beforecut);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), cut);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), beforecopy);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), copy);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), beforepaste);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), paste);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragenter);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragover);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragleave);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), drop);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragstart);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), drag);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragend);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), reset);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), resize);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), scroll);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), search);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), select);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), selectstart);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), submit);
- DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), unload);
-
- private:
- friend class SVGUseElement;
-
- SVGElementInstance(SVGUseElement*, PassRefPtr<SVGElement> originalElement);
-
- virtual Node* toNode() { return shadowTreeElement(); }
- virtual SVGElementInstance* toSVGElementInstance() { return this; }
-
- void appendChild(PassRefPtr<SVGElementInstance> child);
- void setShadowTreeElement(SVGElement*);
-
- template<class GenericNode, class GenericNodeContainer>
- friend void appendChildToContainer(GenericNode* child, GenericNodeContainer* container);
-
- template<class GenericNode, class GenericNodeContainer>
- friend void removeAllChildrenInContainer(GenericNodeContainer* container);
-
- template<class GenericNode, class GenericNodeContainer>
- friend void Private::addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer* container);
-
- bool hasChildNodes() const { return m_firstChild; }
-
- void setFirstChild(SVGElementInstance* child) { m_firstChild = child; }
- void setLastChild(SVGElementInstance* child) { m_lastChild = child; }
-
- void setNextSibling(SVGElementInstance* sibling) { m_nextSibling = sibling; }
- void setPreviousSibling(SVGElementInstance* sibling) { m_previousSibling = sibling; }
-
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
- virtual EventTargetData* eventTargetData();
- virtual EventTargetData* ensureEventTargetData();
-
- SVGUseElement* m_useElement;
- RefPtr<SVGElement> m_element;
- RefPtr<SVGElement> m_shadowTreeElement;
-
- SVGElementInstance* m_previousSibling;
- SVGElementInstance* m_nextSibling;
-
- SVGElementInstance* m_firstChild;
- SVGElementInstance* m_lastChild;
- };
+namespace Private {
+template<class GenericNode, class GenericNodeContainer>
+void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer* container);
+};
+
+class SVGUseElement;
+class SVGElementInstanceList;
+
+// SVGElementInstance mimics Node, but without providing all its functionality
+class SVGElementInstance : public TreeShared<SVGElementInstance>,
+ public EventTarget {
+public:
+ static PassRefPtr<SVGElementInstance> create(SVGUseElement* useElement, PassRefPtr<SVGElement> originalElement)
+ {
+ return adoptRef(new SVGElementInstance(useElement, originalElement));
+ }
+
+ virtual ~SVGElementInstance();
+
+ virtual ScriptExecutionContext* scriptExecutionContext() const;
+
+ virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
+ virtual bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture);
+ virtual void removeAllEventListeners();
+ using EventTarget::dispatchEvent;
+ virtual bool dispatchEvent(PassRefPtr<Event>);
+
+ SVGElement* correspondingElement() const { return m_element.get(); }
+ SVGUseElement* correspondingUseElement() const { return m_useElement; }
+ SVGElement* shadowTreeElement() const { return m_shadowTreeElement.get(); }
+
+ SVGElementInstance* parentNode() const { return parent(); }
+ PassRefPtr<SVGElementInstanceList> childNodes();
+
+ SVGElementInstance* previousSibling() const { return m_previousSibling; }
+ SVGElementInstance* nextSibling() const { return m_nextSibling; }
+
+ SVGElementInstance* firstChild() const { return m_firstChild; }
+ SVGElementInstance* lastChild() const { return m_lastChild; }
+
+ Document* ownerDocument() const { return m_element ? m_element->ownerDocument() : 0; }
+
+ static void invalidateAllInstancesOfElement(SVGElement*);
+
+ using TreeShared<SVGElementInstance>::ref;
+ using TreeShared<SVGElementInstance>::deref;
+
+ // EventTarget API
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), abort);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), blur);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), change);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), click);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), contextmenu);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dblclick);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), error);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), focus);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), input);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), keydown);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), keypress);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), keyup);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), load);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mousedown);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mousemove);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mouseout);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mouseover);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mouseup);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), mousewheel);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), beforecut);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), cut);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), beforecopy);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), copy);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), beforepaste);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), paste);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragenter);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragover);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragleave);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), drop);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragstart);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), drag);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dragend);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), reset);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), resize);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), scroll);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), search);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), select);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), selectstart);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), submit);
+ DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), unload);
+
+private:
+ friend class SVGUseElement;
+
+ SVGElementInstance(SVGUseElement*, PassRefPtr<SVGElement> originalElement);
+
+ virtual Node* toNode() { return shadowTreeElement(); }
+ virtual SVGElementInstance* toSVGElementInstance() { return this; }
+
+ void appendChild(PassRefPtr<SVGElementInstance> child);
+ void setShadowTreeElement(SVGElement*);
+
+ template<class GenericNode, class GenericNodeContainer>
+ friend void appendChildToContainer(GenericNode* child, GenericNodeContainer* container);
+
+ template<class GenericNode, class GenericNodeContainer>
+ friend void removeAllChildrenInContainer(GenericNodeContainer* container);
+
+ template<class GenericNode, class GenericNodeContainer>
+ friend void Private::addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer* container);
+
+ bool hasChildNodes() const { return m_firstChild; }
+
+ void setFirstChild(SVGElementInstance* child) { m_firstChild = child; }
+ void setLastChild(SVGElementInstance* child) { m_lastChild = child; }
+
+ void setNextSibling(SVGElementInstance* sibling) { m_nextSibling = sibling; }
+ void setPreviousSibling(SVGElementInstance* sibling) { m_previousSibling = sibling; }
+
+ virtual void refEventTarget() { ref(); }
+ virtual void derefEventTarget() { deref(); }
+ virtual EventTargetData* eventTargetData();
+ virtual EventTargetData* ensureEventTargetData();
+
+ SVGUseElement* m_useElement;
+ RefPtr<SVGElement> m_element;
+ RefPtr<SVGElement> m_shadowTreeElement;
+
+ SVGElementInstance* m_previousSibling;
+ SVGElementInstance* m_nextSibling;
+
+ SVGElementInstance* m_firstChild;
+ SVGElementInstance* m_lastChild;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGElementInstanceList.h b/WebCore/svg/SVGElementInstanceList.h
index 87dffe1..643876a 100644
--- a/WebCore/svg/SVGElementInstanceList.h
+++ b/WebCore/svg/SVGElementInstanceList.h
@@ -22,24 +22,24 @@
#if ENABLE(SVG)
-#include <wtf/RefCounted.h>
#include "SVGElementInstance.h"
+#include <wtf/RefCounted.h>
namespace WebCore {
- class SVGElementInstanceList : public RefCounted<SVGElementInstanceList> {
- public:
- static PassRefPtr<SVGElementInstanceList> create(PassRefPtr<SVGElementInstance> root) { return adoptRef(new SVGElementInstanceList(root)); }
- virtual ~SVGElementInstanceList();
+class SVGElementInstanceList : public RefCounted<SVGElementInstanceList> {
+public:
+ static PassRefPtr<SVGElementInstanceList> create(PassRefPtr<SVGElementInstance> root) { return adoptRef(new SVGElementInstanceList(root)); }
+ virtual ~SVGElementInstanceList();
- unsigned length() const;
- SVGElementInstance* item(unsigned index);
+ unsigned length() const;
+ SVGElementInstance* item(unsigned index);
- private:
- SVGElementInstanceList(PassRefPtr<SVGElementInstance>);
+private:
+ SVGElementInstanceList(PassRefPtr<SVGElementInstance>);
- RefPtr<SVGElementInstance> m_rootInstance;
- };
+ RefPtr<SVGElementInstance> m_rootInstance;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGException.h b/WebCore/svg/SVGException.h
index ef54080..0193bac 100644
--- a/WebCore/svg/SVGException.h
+++ b/WebCore/svg/SVGException.h
@@ -27,29 +27,29 @@
namespace WebCore {
- class SVGException : public ExceptionBase {
- public:
- static PassRefPtr<SVGException> create(const ExceptionCodeDescription& description)
- {
- return adoptRef(new SVGException(description));
- }
-
- static const int SVGExceptionOffset = 300;
- static const int SVGExceptionMax = 399;
-
- enum SVGExceptionCode {
- SVG_WRONG_TYPE_ERR = SVGExceptionOffset,
- SVG_INVALID_VALUE_ERR = SVGExceptionOffset + 1,
- SVG_MATRIX_NOT_INVERTABLE = SVGExceptionOffset + 2
- };
-
- private:
- SVGException(const ExceptionCodeDescription& description)
- : ExceptionBase(description)
- {
- }
+class SVGException : public ExceptionBase {
+public:
+ static PassRefPtr<SVGException> create(const ExceptionCodeDescription& description)
+ {
+ return adoptRef(new SVGException(description));
+ }
+
+ static const int SVGExceptionOffset = 300;
+ static const int SVGExceptionMax = 399;
+
+ enum SVGExceptionCode {
+ SVG_WRONG_TYPE_ERR = SVGExceptionOffset,
+ SVG_INVALID_VALUE_ERR = SVGExceptionOffset + 1,
+ SVG_MATRIX_NOT_INVERTABLE = SVGExceptionOffset + 2
};
+private:
+ SVGException(const ExceptionCodeDescription& description)
+ : ExceptionBase(description)
+ {
+ }
+};
+
} // namespace WebCore
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGFEColorMatrixElement.cpp b/WebCore/svg/SVGFEColorMatrixElement.cpp
index 9a7b5b9..79716fb 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.cpp
+++ b/WebCore/svg/SVGFEColorMatrixElement.cpp
@@ -56,8 +56,7 @@ void SVGFEColorMatrixElement::parseMappedAttribute(Attribute* attr)
setTypeBaseValue(FECOLORMATRIX_TYPE_HUEROTATE);
else if (value == "luminanceToAlpha")
setTypeBaseValue(FECOLORMATRIX_TYPE_LUMINANCETOALPHA);
- }
- else if (attr->name() == SVGNames::inAttr)
+ } else if (attr->name() == SVGNames::inAttr)
setIn1BaseValue(value);
else if (attr->name() == SVGNames::valuesAttr) {
SVGNumberList newList;
@@ -139,6 +138,6 @@ PassRefPtr<FilterEffect> SVGFEColorMatrixElement::build(SVGFilterBuilder* filter
return effect.release();
}
-} //namespace WebCore
+} // namespace WebCore
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGFEComponentTransferElement.cpp b/WebCore/svg/SVGFEComponentTransferElement.cpp
index d2dbaa0..0fa98a4 100644
--- a/WebCore/svg/SVGFEComponentTransferElement.cpp
+++ b/WebCore/svg/SVGFEComponentTransferElement.cpp
@@ -74,15 +74,15 @@ PassRefPtr<FilterEffect> SVGFEComponentTransferElement::build(SVGFilterBuilder*
ComponentTransferFunction blue;
ComponentTransferFunction alpha;
- for (Node* n = firstChild(); n != 0; n = n->nextSibling()) {
- if (n->hasTagName(SVGNames::feFuncRTag))
- red = static_cast<SVGFEFuncRElement*>(n)->transferFunction();
- else if (n->hasTagName(SVGNames::feFuncGTag))
- green = static_cast<SVGFEFuncGElement*>(n)->transferFunction();
- else if (n->hasTagName(SVGNames::feFuncBTag))
- blue = static_cast<SVGFEFuncBElement*>(n)->transferFunction();
- else if (n->hasTagName(SVGNames::feFuncATag))
- alpha = static_cast<SVGFEFuncAElement*>(n)->transferFunction();
+ for (Node* node = firstChild(); node; node = node->nextSibling()) {
+ if (node->hasTagName(SVGNames::feFuncRTag))
+ red = static_cast<SVGFEFuncRElement*>(node)->transferFunction();
+ else if (node->hasTagName(SVGNames::feFuncGTag))
+ green = static_cast<SVGFEFuncGElement*>(node)->transferFunction();
+ else if (node->hasTagName(SVGNames::feFuncBTag))
+ blue = static_cast<SVGFEFuncBElement*>(node)->transferFunction();
+ else if (node->hasTagName(SVGNames::feFuncATag))
+ alpha = static_cast<SVGFEFuncAElement*>(node)->transferFunction();
}
RefPtr<FilterEffect> effect = FEComponentTransfer::create(filter, red, green, blue, alpha);
diff --git a/WebCore/svg/SVGFEDiffuseLightingElement.cpp b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
index c76aff9..873b831 100644
--- a/WebCore/svg/SVGFEDiffuseLightingElement.cpp
+++ b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
@@ -137,11 +137,11 @@ PassRefPtr<FilterEffect> SVGFEDiffuseLightingElement::build(SVGFilterBuilder* fi
PassRefPtr<LightSource> SVGFEDiffuseLightingElement::findLights() const
{
- for (Node* n = firstChild(); n; n = n->nextSibling()) {
- if (n->hasTagName(SVGNames::feDistantLightTag) ||
- n->hasTagName(SVGNames::fePointLightTag) ||
- n->hasTagName(SVGNames::feSpotLightTag)) {
- SVGFELightElement* lightNode = static_cast<SVGFELightElement*>(n);
+ for (Node* node = firstChild(); node; node = node->nextSibling()) {
+ if (node->hasTagName(SVGNames::feDistantLightTag)
+ || node->hasTagName(SVGNames::fePointLightTag)
+ || node->hasTagName(SVGNames::feSpotLightTag)) {
+ SVGFELightElement* lightNode = static_cast<SVGFELightElement*>(node);
return lightNode->lightSource();
}
}
diff --git a/WebCore/svg/SVGFont.cpp b/WebCore/svg/SVGFont.cpp
index b0151cb..dd99ac5 100644
--- a/WebCore/svg/SVGFont.cpp
+++ b/WebCore/svg/SVGFont.cpp
@@ -27,15 +27,15 @@
#include "GraphicsContext.h"
#include "RenderObject.h"
#include "RenderSVGResourceSolidColor.h"
-#include "SimpleFontData.h"
#include "SVGAltGlyphElement.h"
#include "SVGFontData.h"
-#include "SVGGlyphElement.h"
-#include "SVGGlyphMap.h"
#include "SVGFontElement.h"
#include "SVGFontFaceElement.h"
+#include "SVGGlyphElement.h"
+#include "SVGGlyphMap.h"
#include "SVGMissingGlyphElement.h"
#include "SVGNames.h"
+#include "SimpleFontData.h"
#include "XMLNames.h"
using namespace WTF::Unicode;
@@ -44,7 +44,7 @@ namespace WebCore {
static inline float convertEmUnitToPixel(float fontSize, float unitsPerEm, float value)
{
- if (unitsPerEm == 0.0f)
+ if (!unitsPerEm)
return 0.0f;
return value * fontSize / unitsPerEm;
diff --git a/WebCore/svg/SVGUseElement.cpp b/WebCore/svg/SVGUseElement.cpp
index 9ec604e..f259b85 100644
--- a/WebCore/svg/SVGUseElement.cpp
+++ b/WebCore/svg/SVGUseElement.cpp
@@ -583,7 +583,7 @@ void SVGUseElement::buildShadowAndInstanceTree(SVGShadowTreeRootElement* shadowR
#ifdef DUMP_SHADOW_TREE
ExceptionCode ec = 0;
- PassRefPtr<XMLSerializer> serializer = XMLSerializer::create();
+ RefPtr<XMLSerializer> serializer = XMLSerializer::create();
String markup = serializer->serializeToString(shadowRoot, ec);
ASSERT(!ec);
@@ -627,15 +627,15 @@ void SVGUseElement::detach()
m_targetElementInstance = 0;
}
-static bool isDirectReference(Node* n)
+static bool isDirectReference(Node* node)
{
- return n->hasTagName(SVGNames::pathTag) ||
- n->hasTagName(SVGNames::rectTag) ||
- n->hasTagName(SVGNames::circleTag) ||
- n->hasTagName(SVGNames::ellipseTag) ||
- n->hasTagName(SVGNames::polygonTag) ||
- n->hasTagName(SVGNames::polylineTag) ||
- n->hasTagName(SVGNames::textTag);
+ return node->hasTagName(SVGNames::pathTag)
+ || node->hasTagName(SVGNames::rectTag)
+ || node->hasTagName(SVGNames::circleTag)
+ || node->hasTagName(SVGNames::ellipseTag)
+ || node->hasTagName(SVGNames::polygonTag)
+ || node->hasTagName(SVGNames::polylineTag)
+ || node->hasTagName(SVGNames::textTag);
}
void SVGUseElement::toClipPath(Path& path) const
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list