[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:30:43 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 6a0cb5b130bc68747fafa732e0f8637349d64548
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 22 20:15:51 2010 +0000
2010-12-22 Dirk Schulze <krit at wbekit.org>
Reviewed by Nikolas Zimmermann.
Cleanup SVG code according to the webkit style rules 2
https://bugs.webkit.org/show_bug.cgi?id=51461
Second patch to fix indention and other style issues according to the WebKit style rules in the SVG code.
No changes of functionality, so no new tests.
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::stringToChannel):
* svg/SVGFEDistantLightElement.h:
* svg/SVGFEFuncAElement.h:
* svg/SVGFEFuncBElement.h:
* svg/SVGFEFuncGElement.h:
* svg/SVGFEFuncRElement.h:
* svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::build):
* svg/SVGFEMorphologyElement.cpp:
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::findLights):
* svg/SVGFESpotLightElement.h:
* svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::parseViewBox):
(WebCore::SVGFitToViewBox::isKnownAttribute):
* svg/SVGFontFaceElement.cpp:
(WebCore::cssPropertyIdForSVGAttributeName):
* svg/SVGFontFaceElement.h:
(WebCore::SVGFontFaceElement::associatedFontElement):
* svg/SVGFontFaceNameElement.h:
* svg/SVGFontFaceSrcElement.cpp:
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.h:
* svg/SVGForeignObjectElement.h:
* svg/SVGGlyphElement.cpp:
(WebCore::parseArabicForm):
(WebCore::parseOrientation):
* svg/SVGGlyphElement.h:
(WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
(WebCore::SVGGlyphIdentifier::inheritedValue):
(WebCore::SVGGlyphIdentifier::operator==):
(WebCore::SVGGlyphElement::rendererIsNeeded):
* svg/SVGGlyphMap.h:
(WebCore::GlyphMapNode::GlyphMapNode):
(WebCore::GlyphMapNode::create):
(WebCore::SVGGlyphMap::SVGGlyphMap):
(WebCore::SVGGlyphMap::add):
(WebCore::SVGGlyphMap::compareGlyphPriority):
(WebCore::SVGGlyphMap::get):
(WebCore::SVGGlyphMap::clear):
* svg/SVGGradientElement.cpp:
* svg/SVGHKernElement.cpp:
* svg/SVGHKernElement.h:
(WebCore::SVGHKernElement::rendererIsNeeded):
* svg/SVGImageElement.h:
* svg/SVGImageLoader.cpp:
* svg/SVGImageLoader.h:
* svg/SVGLangSpace.cpp:
(WebCore::SVGLangSpace::parseMappedAttribute):
(WebCore::SVGLangSpace::isKnownAttribute):
* svg/SVGLangSpace.h:
(WebCore::SVGLangSpace::xmllang):
* svg/SVGMetadataElement.h:
* svg/SVGMissingGlyphElement.h:
(WebCore::SVGMissingGlyphElement::rendererIsNeeded):
* svg/SVGPaint.cpp:
(WebCore::SVGPaint::cssText):
* svg/SVGPaint.h:
(WebCore::SVGPaint::create):
(WebCore::SVGPaint::paintType):
(WebCore::SVGPaint::isSVGPaint):
* svg/SVGParserUtilities.cpp:
* svg/SVGParserUtilities.h:
(WebCore::isWhitespace):
(WebCore::skipOptionalSpaces):
(WebCore::skipOptionalSpacesOrDelimiter):
* svg/SVGPathElement.cpp:
* svg/SVGPathParserFactory.h:
* svg/SVGPathSegList.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 99c169d..37e2e3b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,86 @@
+2010-12-22 Dirk Schulze <krit at wbekit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Cleanup SVG code according to the webkit style rules 2
+ https://bugs.webkit.org/show_bug.cgi?id=51461
+
+ Second patch to fix indention and other style issues according to the WebKit style rules in the SVG code.
+
+ No changes of functionality, so no new tests.
+
+ * svg/SVGFEDisplacementMapElement.cpp:
+ (WebCore::SVGFEDisplacementMapElement::stringToChannel):
+ * svg/SVGFEDistantLightElement.h:
+ * svg/SVGFEFuncAElement.h:
+ * svg/SVGFEFuncBElement.h:
+ * svg/SVGFEFuncGElement.h:
+ * svg/SVGFEFuncRElement.h:
+ * svg/SVGFEMergeElement.cpp:
+ (WebCore::SVGFEMergeElement::build):
+ * svg/SVGFEMorphologyElement.cpp:
+ * svg/SVGFEPointLightElement.h:
+ * svg/SVGFESpecularLightingElement.cpp:
+ (WebCore::SVGFESpecularLightingElement::findLights):
+ * svg/SVGFESpotLightElement.h:
+ * svg/SVGFitToViewBox.cpp:
+ (WebCore::SVGFitToViewBox::parseViewBox):
+ (WebCore::SVGFitToViewBox::isKnownAttribute):
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::cssPropertyIdForSVGAttributeName):
+ * svg/SVGFontFaceElement.h:
+ (WebCore::SVGFontFaceElement::associatedFontElement):
+ * svg/SVGFontFaceNameElement.h:
+ * svg/SVGFontFaceSrcElement.cpp:
+ * svg/SVGFontFaceSrcElement.h:
+ * svg/SVGFontFaceUriElement.h:
+ * svg/SVGForeignObjectElement.h:
+ * svg/SVGGlyphElement.cpp:
+ (WebCore::parseArabicForm):
+ (WebCore::parseOrientation):
+ * svg/SVGGlyphElement.h:
+ (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
+ (WebCore::SVGGlyphIdentifier::inheritedValue):
+ (WebCore::SVGGlyphIdentifier::operator==):
+ (WebCore::SVGGlyphElement::rendererIsNeeded):
+ * svg/SVGGlyphMap.h:
+ (WebCore::GlyphMapNode::GlyphMapNode):
+ (WebCore::GlyphMapNode::create):
+ (WebCore::SVGGlyphMap::SVGGlyphMap):
+ (WebCore::SVGGlyphMap::add):
+ (WebCore::SVGGlyphMap::compareGlyphPriority):
+ (WebCore::SVGGlyphMap::get):
+ (WebCore::SVGGlyphMap::clear):
+ * svg/SVGGradientElement.cpp:
+ * svg/SVGHKernElement.cpp:
+ * svg/SVGHKernElement.h:
+ (WebCore::SVGHKernElement::rendererIsNeeded):
+ * svg/SVGImageElement.h:
+ * svg/SVGImageLoader.cpp:
+ * svg/SVGImageLoader.h:
+ * svg/SVGLangSpace.cpp:
+ (WebCore::SVGLangSpace::parseMappedAttribute):
+ (WebCore::SVGLangSpace::isKnownAttribute):
+ * svg/SVGLangSpace.h:
+ (WebCore::SVGLangSpace::xmllang):
+ * svg/SVGMetadataElement.h:
+ * svg/SVGMissingGlyphElement.h:
+ (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
+ * svg/SVGPaint.cpp:
+ (WebCore::SVGPaint::cssText):
+ * svg/SVGPaint.h:
+ (WebCore::SVGPaint::create):
+ (WebCore::SVGPaint::paintType):
+ (WebCore::SVGPaint::isSVGPaint):
+ * svg/SVGParserUtilities.cpp:
+ * svg/SVGParserUtilities.h:
+ (WebCore::isWhitespace):
+ (WebCore::skipOptionalSpaces):
+ (WebCore::skipOptionalSpacesOrDelimiter):
+ * svg/SVGPathElement.cpp:
+ * svg/SVGPathParserFactory.h:
+ * svg/SVGPathSegList.h:
+
2010-12-22 Chris Fleizach <cfleizach at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.cpp b/WebCore/svg/SVGFEDisplacementMapElement.cpp
index 2edd174..a363b3a 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.cpp
+++ b/WebCore/svg/SVGFEDisplacementMapElement.cpp
@@ -50,11 +50,11 @@ ChannelSelectorType SVGFEDisplacementMapElement::stringToChannel(const String& k
{
if (key == "R")
return CHANNEL_R;
- else if (key == "G")
+ if (key == "G")
return CHANNEL_G;
- else if (key == "B")
+ if (key == "B")
return CHANNEL_B;
- else if (key == "A")
+ if (key == "A")
return CHANNEL_A;
return CHANNEL_UNKNOWN;
diff --git a/WebCore/svg/SVGFEDistantLightElement.h b/WebCore/svg/SVGFEDistantLightElement.h
index 9024cce..04964ac 100644
--- a/WebCore/svg/SVGFEDistantLightElement.h
+++ b/WebCore/svg/SVGFEDistantLightElement.h
@@ -25,15 +25,15 @@
namespace WebCore {
- class SVGFEDistantLightElement : public SVGFELightElement {
- public:
- static PassRefPtr<SVGFEDistantLightElement> create(const QualifiedName&, Document*);
+class SVGFEDistantLightElement : public SVGFELightElement {
+public:
+ static PassRefPtr<SVGFEDistantLightElement> create(const QualifiedName&, Document*);
- private:
- SVGFEDistantLightElement(const QualifiedName&, Document*);
+private:
+ SVGFEDistantLightElement(const QualifiedName&, Document*);
- virtual PassRefPtr<LightSource> lightSource() const;
- };
+ virtual PassRefPtr<LightSource> lightSource() const;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncAElement.h b/WebCore/svg/SVGFEFuncAElement.h
index f92ad5b..26fcc23 100644
--- a/WebCore/svg/SVGFEFuncAElement.h
+++ b/WebCore/svg/SVGFEFuncAElement.h
@@ -26,13 +26,13 @@
namespace WebCore {
- class SVGFEFuncAElement : public SVGComponentTransferFunctionElement {
- public:
- static PassRefPtr<SVGFEFuncAElement> create(const QualifiedName&, Document*);
+class SVGFEFuncAElement : public SVGComponentTransferFunctionElement {
+public:
+ static PassRefPtr<SVGFEFuncAElement> create(const QualifiedName&, Document*);
- private:
- SVGFEFuncAElement(const QualifiedName&, Document*);
- };
+private:
+ SVGFEFuncAElement(const QualifiedName&, Document*);
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncBElement.h b/WebCore/svg/SVGFEFuncBElement.h
index ea664f5..83143db 100644
--- a/WebCore/svg/SVGFEFuncBElement.h
+++ b/WebCore/svg/SVGFEFuncBElement.h
@@ -26,13 +26,13 @@
namespace WebCore {
- class SVGFEFuncBElement : public SVGComponentTransferFunctionElement {
- public:
- static PassRefPtr<SVGFEFuncBElement> create(const QualifiedName&, Document*);
+class SVGFEFuncBElement : public SVGComponentTransferFunctionElement {
+public:
+ static PassRefPtr<SVGFEFuncBElement> create(const QualifiedName&, Document*);
- private:
- SVGFEFuncBElement(const QualifiedName&, Document*);
- };
+private:
+ SVGFEFuncBElement(const QualifiedName&, Document*);
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncGElement.h b/WebCore/svg/SVGFEFuncGElement.h
index df32106..1c679b6 100644
--- a/WebCore/svg/SVGFEFuncGElement.h
+++ b/WebCore/svg/SVGFEFuncGElement.h
@@ -26,13 +26,13 @@
namespace WebCore {
- class SVGFEFuncGElement : public SVGComponentTransferFunctionElement {
- public:
- static PassRefPtr<SVGFEFuncGElement> create(const QualifiedName&, Document*);
+class SVGFEFuncGElement : public SVGComponentTransferFunctionElement {
+public:
+ static PassRefPtr<SVGFEFuncGElement> create(const QualifiedName&, Document*);
- private:
- SVGFEFuncGElement(const QualifiedName&, Document*);
- };
+private:
+ SVGFEFuncGElement(const QualifiedName&, Document*);
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncRElement.h b/WebCore/svg/SVGFEFuncRElement.h
index 601095f..b3e651c 100644
--- a/WebCore/svg/SVGFEFuncRElement.h
+++ b/WebCore/svg/SVGFEFuncRElement.h
@@ -26,13 +26,13 @@
namespace WebCore {
- class SVGFEFuncRElement : public SVGComponentTransferFunctionElement {
- public:
- static PassRefPtr<SVGFEFuncRElement> create(const QualifiedName&, Document*);
+class SVGFEFuncRElement : public SVGComponentTransferFunctionElement {
+public:
+ static PassRefPtr<SVGFEFuncRElement> create(const QualifiedName&, Document*);
- private:
- SVGFEFuncRElement(const QualifiedName&, Document*);
- };
+private:
+ SVGFEFuncRElement(const QualifiedName&, Document*);
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEMergeElement.cpp b/WebCore/svg/SVGFEMergeElement.cpp
index 4499001..92f2346 100644
--- a/WebCore/svg/SVGFEMergeElement.cpp
+++ b/WebCore/svg/SVGFEMergeElement.cpp
@@ -42,9 +42,9 @@ PassRefPtr<FilterEffect> SVGFEMergeElement::build(SVGFilterBuilder* filterBuilde
{
RefPtr<FilterEffect> effect = FEMerge::create(filter);
FilterEffectVector& mergeInputs = effect->inputEffects();
- for (Node* n = firstChild(); n != 0; n = n->nextSibling()) {
- if (n->hasTagName(SVGNames::feMergeNodeTag)) {
- FilterEffect* mergeEffect = filterBuilder->getEffectById(static_cast<SVGFEMergeNodeElement*>(n)->in1());
+ for (Node* node = firstChild(); node; node = node->nextSibling()) {
+ if (node->hasTagName(SVGNames::feMergeNodeTag)) {
+ FilterEffect* mergeEffect = filterBuilder->getEffectById(static_cast<SVGFEMergeNodeElement*>(node)->in1());
if (!mergeEffect)
return 0;
mergeInputs.append(mergeEffect);
diff --git a/WebCore/svg/SVGFEMorphologyElement.cpp b/WebCore/svg/SVGFEMorphologyElement.cpp
index 077759a..282c495 100644
--- a/WebCore/svg/SVGFEMorphologyElement.cpp
+++ b/WebCore/svg/SVGFEMorphologyElement.cpp
@@ -133,6 +133,6 @@ PassRefPtr<FilterEffect> SVGFEMorphologyElement::build(SVGFilterBuilder* filterB
return effect.release();
}
-} //namespace WebCore
+} // namespace WebCore
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGFEPointLightElement.h b/WebCore/svg/SVGFEPointLightElement.h
index 270d36d..a3f47e8 100644
--- a/WebCore/svg/SVGFEPointLightElement.h
+++ b/WebCore/svg/SVGFEPointLightElement.h
@@ -25,15 +25,15 @@
namespace WebCore {
- class SVGFEPointLightElement : public SVGFELightElement {
- public:
- static PassRefPtr<SVGFEPointLightElement> create(const QualifiedName&, Document*);
+class SVGFEPointLightElement : public SVGFELightElement {
+public:
+ static PassRefPtr<SVGFEPointLightElement> create(const QualifiedName&, Document*);
- private:
- SVGFEPointLightElement(const QualifiedName&, Document*);
+private:
+ SVGFEPointLightElement(const QualifiedName&, Document*);
- virtual PassRefPtr<LightSource> lightSource() const;
- };
+ virtual PassRefPtr<LightSource> lightSource() const;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFESpecularLightingElement.cpp b/WebCore/svg/SVGFESpecularLightingElement.cpp
index b25b022..806d0cd 100644
--- a/WebCore/svg/SVGFESpecularLightingElement.cpp
+++ b/WebCore/svg/SVGFESpecularLightingElement.cpp
@@ -117,11 +117,11 @@ void SVGFESpecularLightingElement::synchronizeProperty(const QualifiedName& attr
PassRefPtr<LightSource> SVGFESpecularLightingElement::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/SVGFESpotLightElement.h b/WebCore/svg/SVGFESpotLightElement.h
index 79fc5fc..fe1e73e 100644
--- a/WebCore/svg/SVGFESpotLightElement.h
+++ b/WebCore/svg/SVGFESpotLightElement.h
@@ -25,15 +25,15 @@
namespace WebCore {
- class SVGFESpotLightElement : public SVGFELightElement {
- public:
- static PassRefPtr<SVGFESpotLightElement> create(const QualifiedName&, Document*);
+class SVGFESpotLightElement : public SVGFELightElement {
+public:
+ static PassRefPtr<SVGFESpotLightElement> create(const QualifiedName&, Document*);
- private:
- SVGFESpotLightElement(const QualifiedName&, Document*);
+private:
+ SVGFESpotLightElement(const QualifiedName&, Document*);
- virtual PassRefPtr<LightSource> lightSource() const;
- };
+ virtual PassRefPtr<LightSource> lightSource() const;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFitToViewBox.cpp b/WebCore/svg/SVGFitToViewBox.cpp
index e5bd5db..fadb982 100644
--- a/WebCore/svg/SVGFitToViewBox.cpp
+++ b/WebCore/svg/SVGFitToViewBox.cpp
@@ -52,8 +52,7 @@ bool SVGFitToViewBox::parseViewBox(Document* doc, const UChar*& c, const UChar*
float y = 0.0f;
float width = 0.0f;
float height = 0.0f;
- bool valid = (parseNumber(c, end, x) && parseNumber(c, end, y) &&
- parseNumber(c, end, width) && parseNumber(c, end, height, false));
+ bool valid = parseNumber(c, end, x) && parseNumber(c, end, y) && parseNumber(c, end, width) && parseNumber(c, end, height, false);
if (!validate) {
viewBox = FloatRect(x, y, width, height);
return true;
@@ -108,8 +107,7 @@ bool SVGFitToViewBox::parseMappedAttribute(Document* document, Attribute* attr)
bool SVGFitToViewBox::isKnownAttribute(const QualifiedName& attrName)
{
- return (attrName == SVGNames::viewBoxAttr ||
- attrName == SVGNames::preserveAspectRatioAttr);
+ return attrName == SVGNames::viewBoxAttr || attrName == SVGNames::preserveAspectRatioAttr;
}
}
diff --git a/WebCore/svg/SVGFontFaceElement.cpp b/WebCore/svg/SVGFontFaceElement.cpp
index 515ce04..892d54d 100644
--- a/WebCore/svg/SVGFontFaceElement.cpp
+++ b/WebCore/svg/SVGFontFaceElement.cpp
@@ -71,39 +71,39 @@ static int cssPropertyIdForSVGAttributeName(const QualifiedName& attrName)
propertyNameToIdMap = new HashMap<AtomicStringImpl*, int>;
// This is a list of all @font-face CSS properties which are exposed as SVG XML attributes
// Those commented out are not yet supported by WebCore's style system
- //mapAttributeToCSSProperty(propertyNameToIdMap, accent_heightAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, alphabeticAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, ascentAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, bboxAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, cap_heightAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, descentAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, accent_heightAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, alphabeticAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, ascentAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, bboxAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, cap_heightAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, descentAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_familyAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_sizeAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_stretchAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_styleAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_variantAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_weightAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, hangingAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, ideographicAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, mathematicalAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, overline_positionAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, overline_thicknessAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, panose_1Attr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, slopeAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, stemhAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, stemvAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, strikethrough_positionAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, strikethrough_thicknessAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, underline_positionAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, underline_thicknessAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, unicode_rangeAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, units_per_emAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, v_alphabeticAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, v_hangingAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, v_ideographicAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, v_mathematicalAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, widthsAttr);
- //mapAttributeToCSSProperty(propertyNameToIdMap, x_heightAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, hangingAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, ideographicAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, mathematicalAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, overline_positionAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, overline_thicknessAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, panose_1Attr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, slopeAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, stemhAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, stemvAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, strikethrough_positionAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, strikethrough_thicknessAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, underline_positionAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, underline_thicknessAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, unicode_rangeAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, units_per_emAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, v_alphabeticAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, v_hangingAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, v_ideographicAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, v_mathematicalAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, widthsAttr);
+ // mapAttributeToCSSProperty(propertyNameToIdMap, x_heightAttr);
}
return propertyNameToIdMap->get(attrName.localName().impl());
diff --git a/WebCore/svg/SVGFontFaceElement.h b/WebCore/svg/SVGFontFaceElement.h
index 3ee71d8..5e974a7 100644
--- a/WebCore/svg/SVGFontFaceElement.h
+++ b/WebCore/svg/SVGFontFaceElement.h
@@ -27,44 +27,44 @@
namespace WebCore {
- class CSSFontFaceRule;
- class CSSMutableStyleDeclaration;
- class SVGFontElement;
+class CSSFontFaceRule;
+class CSSMutableStyleDeclaration;
+class SVGFontElement;
- class SVGFontFaceElement : public SVGElement {
- public:
- static PassRefPtr<SVGFontFaceElement> create(const QualifiedName&, Document*);
+class SVGFontFaceElement : public SVGElement {
+public:
+ static PassRefPtr<SVGFontFaceElement> create(const QualifiedName&, Document*);
- unsigned unitsPerEm() const;
- int xHeight() const;
- float horizontalOriginX() const;
- float horizontalOriginY() const;
- float horizontalAdvanceX() const;
- float verticalOriginX() const;
- float verticalOriginY() const;
- float verticalAdvanceY() const;
- int ascent() const;
- int descent() const;
- String fontFamily() const;
+ unsigned unitsPerEm() const;
+ int xHeight() const;
+ float horizontalOriginX() const;
+ float horizontalOriginY() const;
+ float horizontalAdvanceX() const;
+ float verticalOriginX() const;
+ float verticalOriginY() const;
+ float verticalAdvanceY() const;
+ int ascent() const;
+ int descent() const;
+ String fontFamily() const;
- SVGFontElement* associatedFontElement() const { return m_fontElement; }
- void rebuildFontFace();
- void removeFromMappedElementSheet();
+ SVGFontElement* associatedFontElement() const { return m_fontElement; }
+ void rebuildFontFace();
+ void removeFromMappedElementSheet();
- private:
- SVGFontFaceElement(const QualifiedName&, Document*);
+private:
+ SVGFontFaceElement(const QualifiedName&, Document*);
- virtual void parseMappedAttribute(Attribute*);
+ virtual void parseMappedAttribute(Attribute*);
- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
+ virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
- RefPtr<CSSFontFaceRule> m_fontFaceRule;
- RefPtr<CSSMutableStyleDeclaration> m_styleDeclaration;
+ RefPtr<CSSFontFaceRule> m_fontFaceRule;
+ RefPtr<CSSMutableStyleDeclaration> m_styleDeclaration;
- SVGFontElement* m_fontElement;
- };
+ SVGFontElement* m_fontElement;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFontFaceNameElement.h b/WebCore/svg/SVGFontFaceNameElement.h
index 462d7a8..e99d2d5 100644
--- a/WebCore/svg/SVGFontFaceNameElement.h
+++ b/WebCore/svg/SVGFontFaceNameElement.h
@@ -25,17 +25,17 @@
namespace WebCore {
- class CSSFontFaceSrcValue;
+class CSSFontFaceSrcValue;
- class SVGFontFaceNameElement : public SVGElement {
- public:
- static PassRefPtr<SVGFontFaceNameElement> create(const QualifiedName&, Document*);
-
- PassRefPtr<CSSFontFaceSrcValue> srcValue() const;
+class SVGFontFaceNameElement : public SVGElement {
+public:
+ static PassRefPtr<SVGFontFaceNameElement> create(const QualifiedName&, Document*);
+
+ PassRefPtr<CSSFontFaceSrcValue> srcValue() const;
- private:
- SVGFontFaceNameElement(const QualifiedName&, Document*);
- };
+private:
+ SVGFontFaceNameElement(const QualifiedName&, Document*);
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFontFaceSrcElement.cpp b/WebCore/svg/SVGFontFaceSrcElement.cpp
index e003944..ce75872 100644
--- a/WebCore/svg/SVGFontFaceSrcElement.cpp
+++ b/WebCore/svg/SVGFontFaceSrcElement.cpp
@@ -22,8 +22,8 @@
#if ENABLE(SVG_FONTS)
#include "SVGFontFaceSrcElement.h"
-#include "CSSValueList.h"
#include "CSSFontFaceSrcValue.h"
+#include "CSSValueList.h"
#include "SVGFontFaceElement.h"
#include "SVGFontFaceNameElement.h"
#include "SVGFontFaceUriElement.h"
diff --git a/WebCore/svg/SVGFontFaceSrcElement.h b/WebCore/svg/SVGFontFaceSrcElement.h
index e6f8d30..5e27625 100644
--- a/WebCore/svg/SVGFontFaceSrcElement.h
+++ b/WebCore/svg/SVGFontFaceSrcElement.h
@@ -25,19 +25,19 @@
namespace WebCore {
- class CSSValueList;
-
- class SVGFontFaceSrcElement : public SVGElement {
- public:
- static PassRefPtr<SVGFontFaceSrcElement> create(const QualifiedName&, Document*);
-
- PassRefPtr<CSSValueList> srcValue() const;
-
- private:
- SVGFontFaceSrcElement(const QualifiedName&, Document*);
-
- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- };
+class CSSValueList;
+
+class SVGFontFaceSrcElement : public SVGElement {
+public:
+ static PassRefPtr<SVGFontFaceSrcElement> create(const QualifiedName&, Document*);
+
+ PassRefPtr<CSSValueList> srcValue() const;
+
+private:
+ SVGFontFaceSrcElement(const QualifiedName&, Document*);
+
+ virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFontFaceUriElement.h b/WebCore/svg/SVGFontFaceUriElement.h
index 043a20a..3806315 100644
--- a/WebCore/svg/SVGFontFaceUriElement.h
+++ b/WebCore/svg/SVGFontFaceUriElement.h
@@ -27,28 +27,28 @@
namespace WebCore {
- class CSSFontFaceSrcValue;
- class CachedFont;
+class CSSFontFaceSrcValue;
+class CachedFont;
- class SVGFontFaceUriElement : public SVGElement, public CachedResourceClient {
- public:
- static PassRefPtr<SVGFontFaceUriElement> create(const QualifiedName&, Document*);
+class SVGFontFaceUriElement : public SVGElement, public CachedResourceClient {
+public:
+ static PassRefPtr<SVGFontFaceUriElement> create(const QualifiedName&, Document*);
- virtual ~SVGFontFaceUriElement();
+ virtual ~SVGFontFaceUriElement();
- PassRefPtr<CSSFontFaceSrcValue> srcValue() const;
+ PassRefPtr<CSSFontFaceSrcValue> srcValue() const;
- private:
- SVGFontFaceUriElement(const QualifiedName&, Document*);
-
- virtual void parseMappedAttribute(Attribute*);
- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- virtual void insertedIntoDocument();
+private:
+ SVGFontFaceUriElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+ virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ virtual void insertedIntoDocument();
- void loadFont();
+ void loadFont();
- CachedResourceHandle<CachedFont> m_cachedFont;
- };
+ CachedResourceHandle<CachedFont> m_cachedFont;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGForeignObjectElement.h b/WebCore/svg/SVGForeignObjectElement.h
index 5263eeb..687d089 100644
--- a/WebCore/svg/SVGForeignObjectElement.h
+++ b/WebCore/svg/SVGForeignObjectElement.h
@@ -23,11 +23,11 @@
#if ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT)
#include "SVGAnimatedBoolean.h"
#include "SVGAnimatedLength.h"
-#include "SVGTests.h"
+#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
-#include "SVGURIReference.h"
#include "SVGStyledTransformableElement.h"
-#include "SVGExternalResourcesRequired.h"
+#include "SVGTests.h"
+#include "SVGURIReference.h"
namespace WebCore {
diff --git a/WebCore/svg/SVGGlyphElement.cpp b/WebCore/svg/SVGGlyphElement.cpp
index baa9966..a64d833 100644
--- a/WebCore/svg/SVGGlyphElement.cpp
+++ b/WebCore/svg/SVGGlyphElement.cpp
@@ -80,11 +80,11 @@ static inline SVGGlyphIdentifier::ArabicForm parseArabicForm(const AtomicString&
{
if (value == "medial")
return SVGGlyphIdentifier::Medial;
- else if (value == "terminal")
+ if (value == "terminal")
return SVGGlyphIdentifier::Terminal;
- else if (value == "isolated")
+ if (value == "isolated")
return SVGGlyphIdentifier::Isolated;
- else if (value == "initial")
+ if (value == "initial")
return SVGGlyphIdentifier::Initial;
return SVGGlyphIdentifier::None;
@@ -94,7 +94,7 @@ static inline SVGGlyphIdentifier::Orientation parseOrientation(const AtomicStrin
{
if (value == "h")
return SVGGlyphIdentifier::Horizontal;
- else if (value == "v")
+ if (value == "v")
return SVGGlyphIdentifier::Vertical;
return SVGGlyphIdentifier::Both;
diff --git a/WebCore/svg/SVGGlyphElement.h b/WebCore/svg/SVGGlyphElement.h
index 7dc7430..4ac5d9b 100644
--- a/WebCore/svg/SVGGlyphElement.h
+++ b/WebCore/svg/SVGGlyphElement.h
@@ -23,109 +23,109 @@
#define SVGGlyphElement_h
#if ENABLE(SVG_FONTS)
+#include "Path.h"
#include "SVGStyledElement.h"
-#include <wtf/Forward.h>
#include <limits>
-#include "Path.h"
+#include <wtf/Forward.h>
namespace WebCore {
- class SVGFontData;
-
- // Describe a SVG <glyph> element
- struct SVGGlyphIdentifier {
- enum Orientation {
- Vertical,
- Horizontal,
- Both
- };
-
- // SVG Font depends on exactly this order.
- enum ArabicForm {
- None = 0,
- Isolated,
- Terminal,
- Initial,
- Medial
- };
-
- SVGGlyphIdentifier()
- : isValid(false)
- , orientation(Both)
- , arabicForm(None)
- , priority(0)
- , nameLength(0)
- , horizontalAdvanceX(0.0f)
- , verticalOriginX(0.0f)
- , verticalOriginY(0.0f)
- , verticalAdvanceY(0.0f)
- {
- }
-
- // Used to mark our float properties as "to be inherited from SVGFontData"
- static float inheritedValue()
- {
- static float s_inheritedValue = std::numeric_limits<float>::infinity();
- return s_inheritedValue;
- }
-
- bool operator==(const SVGGlyphIdentifier& other) const
- {
- return isValid == other.isValid
- && orientation == other.orientation
- && arabicForm == other.arabicForm
- && glyphName == other.glyphName
- && horizontalAdvanceX == other.horizontalAdvanceX
- && verticalOriginX == other.verticalOriginX
- && verticalOriginY == other.verticalOriginY
- && verticalAdvanceY == other.verticalAdvanceY
- && languages == other.languages;
- }
-
- bool isValid : 1;
-
- unsigned orientation : 2; // Orientation
- unsigned arabicForm : 3; // ArabicForm
- int priority;
- size_t nameLength;
- String glyphName;
-
- float horizontalAdvanceX;
- float verticalOriginX;
- float verticalOriginY;
- float verticalAdvanceY;
-
- Path pathData;
- Vector<String> languages;
- };
-
- class SVGGlyphElement : public SVGStyledElement {
- public:
- static PassRefPtr<SVGGlyphElement> create(const QualifiedName&, Document*);
-
- SVGGlyphIdentifier buildGlyphIdentifier() const;
+class SVGFontData;
- // Helper function used by SVGFont
- static void inheritUnspecifiedAttributes(SVGGlyphIdentifier&, const SVGFontData*);
- static String querySVGFontLanguage(const SVGElement*);
-
- // Helper function shared between SVGGlyphElement & SVGMissingGlyphElement
- static SVGGlyphIdentifier buildGenericGlyphIdentifier(const SVGElement*);
-
- private:
- SVGGlyphElement(const QualifiedName&, Document*);
-
- virtual void parseMappedAttribute(Attribute*);
-
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
-
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+// Describe a SVG <glyph> element
+struct SVGGlyphIdentifier {
+ enum Orientation {
+ Vertical,
+ Horizontal,
+ Both
+ };
- void invalidateGlyphCache();
+ // SVG Font depends on exactly this order.
+ enum ArabicForm {
+ None = 0,
+ Isolated,
+ Terminal,
+ Initial,
+ Medial
};
+ SVGGlyphIdentifier()
+ : isValid(false)
+ , orientation(Both)
+ , arabicForm(None)
+ , priority(0)
+ , nameLength(0)
+ , horizontalAdvanceX(0.0f)
+ , verticalOriginX(0.0f)
+ , verticalOriginY(0.0f)
+ , verticalAdvanceY(0.0f)
+ {
+ }
+
+ // Used to mark our float properties as "to be inherited from SVGFontData"
+ static float inheritedValue()
+ {
+ static float s_inheritedValue = std::numeric_limits<float>::infinity();
+ return s_inheritedValue;
+ }
+
+ bool operator==(const SVGGlyphIdentifier& other) const
+ {
+ return isValid == other.isValid
+ && orientation == other.orientation
+ && arabicForm == other.arabicForm
+ && glyphName == other.glyphName
+ && horizontalAdvanceX == other.horizontalAdvanceX
+ && verticalOriginX == other.verticalOriginX
+ && verticalOriginY == other.verticalOriginY
+ && verticalAdvanceY == other.verticalAdvanceY
+ && languages == other.languages;
+ }
+
+ bool isValid : 1;
+
+ unsigned orientation : 2; // Orientation
+ unsigned arabicForm : 3; // ArabicForm
+ int priority;
+ size_t nameLength;
+ String glyphName;
+
+ float horizontalAdvanceX;
+ float verticalOriginX;
+ float verticalOriginY;
+ float verticalAdvanceY;
+
+ Path pathData;
+ Vector<String> languages;
+};
+
+class SVGGlyphElement : public SVGStyledElement {
+public:
+ static PassRefPtr<SVGGlyphElement> create(const QualifiedName&, Document*);
+
+ SVGGlyphIdentifier buildGlyphIdentifier() const;
+
+ // Helper function used by SVGFont
+ static void inheritUnspecifiedAttributes(SVGGlyphIdentifier&, const SVGFontData*);
+ static String querySVGFontLanguage(const SVGElement*);
+
+ // Helper function shared between SVGGlyphElement & SVGMissingGlyphElement
+ static SVGGlyphIdentifier buildGenericGlyphIdentifier(const SVGElement*);
+
+private:
+ SVGGlyphElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
+
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+
+ void invalidateGlyphCache();
+};
+
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
diff --git a/WebCore/svg/SVGGlyphMap.h b/WebCore/svg/SVGGlyphMap.h
index aba0c86..5241b2e 100644
--- a/WebCore/svg/SVGGlyphMap.h
+++ b/WebCore/svg/SVGGlyphMap.h
@@ -23,87 +23,86 @@
#if ENABLE(SVG_FONTS)
#include "SVGGlyphElement.h"
-
namespace WebCore {
- struct GlyphMapNode;
-
- typedef HashMap<UChar, RefPtr<GlyphMapNode> > GlyphMapLayer;
+struct GlyphMapNode;
- struct GlyphMapNode : public RefCounted<GlyphMapNode> {
- private:
- GlyphMapNode() { }
- public:
- static PassRefPtr<GlyphMapNode> create() { return adoptRef(new GlyphMapNode); }
+typedef HashMap<UChar, RefPtr<GlyphMapNode> > GlyphMapLayer;
- Vector<SVGGlyphIdentifier> glyphs;
+struct GlyphMapNode : public RefCounted<GlyphMapNode> {
+private:
+ GlyphMapNode() { }
+public:
+ static PassRefPtr<GlyphMapNode> create() { return adoptRef(new GlyphMapNode); }
- GlyphMapLayer children;
- };
+ Vector<SVGGlyphIdentifier> glyphs;
- class SVGGlyphMap {
+ GlyphMapLayer children;
+};
- public:
- SVGGlyphMap() : m_currentPriority(0) { }
+class SVGGlyphMap {
- void add(const String& string, const SVGGlyphIdentifier& glyph)
- {
- size_t len = string.length();
- GlyphMapLayer* currentLayer = &m_rootLayer;
+public:
+ SVGGlyphMap() : m_currentPriority(0) { }
- RefPtr<GlyphMapNode> node;
- for (size_t i = 0; i < len; i++) {
- UChar curChar = string[i];
- node = currentLayer->get(curChar);
- if (!node) {
- node = GlyphMapNode::create();
- currentLayer->set(curChar, node);
- }
- currentLayer = &node->children;
- }
+ void add(const String& string, const SVGGlyphIdentifier& glyph)
+ {
+ size_t len = string.length();
+ GlyphMapLayer* currentLayer = &m_rootLayer;
- if (node) {
- node->glyphs.append(glyph);
- node->glyphs.last().priority = m_currentPriority++;
- node->glyphs.last().nameLength = len;
- node->glyphs.last().isValid = true;
+ RefPtr<GlyphMapNode> node;
+ for (size_t i = 0; i < len; ++i) {
+ UChar curChar = string[i];
+ node = currentLayer->get(curChar);
+ if (!node) {
+ node = GlyphMapNode::create();
+ currentLayer->set(curChar, node);
}
+ currentLayer = &node->children;
}
- static inline bool compareGlyphPriority(const SVGGlyphIdentifier& first, const SVGGlyphIdentifier& second)
- {
- return first.priority < second.priority;
+ if (node) {
+ node->glyphs.append(glyph);
+ node->glyphs.last().priority = m_currentPriority++;
+ node->glyphs.last().nameLength = len;
+ node->glyphs.last().isValid = true;
}
-
- void get(const String& string, Vector<SVGGlyphIdentifier>& glyphs)
- {
- GlyphMapLayer* currentLayer = &m_rootLayer;
-
- for (size_t i = 0; i < string.length(); i++) {
- UChar curChar = string[i];
- RefPtr<GlyphMapNode> node = currentLayer->get(curChar);
- if (!node)
- break;
- glyphs.append(node->glyphs);
- currentLayer = &node->children;
- }
- std::sort(glyphs.begin(), glyphs.end(), compareGlyphPriority);
+ }
+
+ static inline bool compareGlyphPriority(const SVGGlyphIdentifier& first, const SVGGlyphIdentifier& second)
+ {
+ return first.priority < second.priority;
+ }
+
+ void get(const String& string, Vector<SVGGlyphIdentifier>& glyphs)
+ {
+ GlyphMapLayer* currentLayer = &m_rootLayer;
+
+ for (size_t i = 0; i < string.length(); ++i) {
+ UChar curChar = string[i];
+ RefPtr<GlyphMapNode> node = currentLayer->get(curChar);
+ if (!node)
+ break;
+ glyphs.append(node->glyphs);
+ currentLayer = &node->children;
}
+ std::sort(glyphs.begin(), glyphs.end(), compareGlyphPriority);
+ }
- void clear()
- {
- m_rootLayer.clear();
- m_currentPriority = 0;
- }
+ void clear()
+ {
+ m_rootLayer.clear();
+ m_currentPriority = 0;
+ }
- private:
- GlyphMapLayer m_rootLayer;
- int m_currentPriority;
- };
+private:
+ GlyphMapLayer m_rootLayer;
+ int m_currentPriority;
+};
}
#endif // ENABLE(SVG_FONTS)
-#endif //SVGGlyphMap_h
+#endif // SVGGlyphMap_h
diff --git a/WebCore/svg/SVGGradientElement.cpp b/WebCore/svg/SVGGradientElement.cpp
index 4f9bc16..f36fea5 100644
--- a/WebCore/svg/SVGGradientElement.cpp
+++ b/WebCore/svg/SVGGradientElement.cpp
@@ -26,8 +26,8 @@
#include "Attribute.h"
#include "CSSStyleSelector.h"
-#include "RenderSVGPath.h"
#include "RenderSVGHiddenContainer.h"
+#include "RenderSVGPath.h"
#include "RenderSVGResourceLinearGradient.h"
#include "RenderSVGResourceRadialGradient.h"
#include "SVGNames.h"
diff --git a/WebCore/svg/SVGHKernElement.cpp b/WebCore/svg/SVGHKernElement.cpp
index 7f83241..4632378 100644
--- a/WebCore/svg/SVGHKernElement.cpp
+++ b/WebCore/svg/SVGHKernElement.cpp
@@ -24,9 +24,9 @@
#if ENABLE(SVG_FONTS)
#include "SVGHKernElement.h"
+#include "SVGFontData.h"
#include "SVGFontElement.h"
#include "SVGFontFaceElement.h"
-#include "SVGFontData.h"
#include "SVGNames.h"
#include "SimpleFontData.h"
#include "XMLNames.h"
diff --git a/WebCore/svg/SVGHKernElement.h b/WebCore/svg/SVGHKernElement.h
index 7249fac..0defcbb 100644
--- a/WebCore/svg/SVGHKernElement.h
+++ b/WebCore/svg/SVGHKernElement.h
@@ -27,20 +27,20 @@
namespace WebCore {
- class SVGHKernElement : public SVGElement {
- public:
- static PassRefPtr<SVGHKernElement> create(const QualifiedName&, Document*);
+class SVGHKernElement : public SVGElement {
+public:
+ static PassRefPtr<SVGHKernElement> create(const QualifiedName&, Document*);
- void buildHorizontalKerningPair(KerningPairVector&);
+ void buildHorizontalKerningPair(KerningPairVector&);
- private:
- SVGHKernElement(const QualifiedName&, Document*);
+private:
+ SVGHKernElement(const QualifiedName&, Document*);
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- };
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGImageElement.h b/WebCore/svg/SVGImageElement.h
index 6b8bb65..06e6490 100644
--- a/WebCore/svg/SVGImageElement.h
+++ b/WebCore/svg/SVGImageElement.h
@@ -26,8 +26,8 @@
#include "SVGAnimatedLength.h"
#include "SVGAnimatedPreserveAspectRatio.h"
#include "SVGExternalResourcesRequired.h"
-#include "SVGLangSpace.h"
#include "SVGImageLoader.h"
+#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
#include "SVGTests.h"
#include "SVGURIReference.h"
diff --git a/WebCore/svg/SVGImageLoader.cpp b/WebCore/svg/SVGImageLoader.cpp
index 8f1c1b5..17e9004 100644
--- a/WebCore/svg/SVGImageLoader.cpp
+++ b/WebCore/svg/SVGImageLoader.cpp
@@ -26,8 +26,8 @@
#include "Event.h"
#include "EventNames.h"
#include "HTMLParserIdioms.h"
-#include "SVGImageElement.h"
#include "RenderImage.h"
+#include "SVGImageElement.h"
namespace WebCore {
diff --git a/WebCore/svg/SVGImageLoader.h b/WebCore/svg/SVGImageLoader.h
index 98dcffc..b7a1617 100644
--- a/WebCore/svg/SVGImageLoader.h
+++ b/WebCore/svg/SVGImageLoader.h
@@ -25,16 +25,16 @@
namespace WebCore {
- class SVGImageElement;
+class SVGImageElement;
- class SVGImageLoader : public ImageLoader {
- public:
- SVGImageLoader(SVGImageElement*);
+class SVGImageLoader : public ImageLoader {
+public:
+ SVGImageLoader(SVGImageElement*);
- private:
- virtual void dispatchLoadEvent();
- virtual String sourceURI(const AtomicString&) const;
- };
+private:
+ virtual void dispatchLoadEvent();
+ virtual String sourceURI(const AtomicString&) const;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGLangSpace.cpp b/WebCore/svg/SVGLangSpace.cpp
index ad6458c..73a52e9 100644
--- a/WebCore/svg/SVGLangSpace.cpp
+++ b/WebCore/svg/SVGLangSpace.cpp
@@ -55,7 +55,8 @@ bool SVGLangSpace::parseMappedAttribute(Attribute* attr)
if (attr->name().matches(XMLNames::langAttr)) {
setXmllang(attr->value());
return true;
- } else if (attr->name().matches(XMLNames::spaceAttr)) {
+ }
+ if (attr->name().matches(XMLNames::spaceAttr)) {
setXmlspace(attr->value());
return true;
}
@@ -65,8 +66,7 @@ bool SVGLangSpace::parseMappedAttribute(Attribute* attr)
bool SVGLangSpace::isKnownAttribute(const QualifiedName& attrName)
{
- return (attrName.matches(XMLNames::langAttr) ||
- attrName.matches(XMLNames::spaceAttr));
+ return attrName.matches(XMLNames::langAttr) || attrName.matches(XMLNames::spaceAttr);
}
}
diff --git a/WebCore/svg/SVGLangSpace.h b/WebCore/svg/SVGLangSpace.h
index 723fa7a..61c6edf 100644
--- a/WebCore/svg/SVGLangSpace.h
+++ b/WebCore/svg/SVGLangSpace.h
@@ -26,24 +26,24 @@
namespace WebCore {
- class Attribute;
- class QualifiedName;
+class Attribute;
+class QualifiedName;
- class SVGLangSpace {
- public:
- const AtomicString& xmllang() const { return m_lang; }
- void setXmllang(const AtomicString& xmlLang);
+class SVGLangSpace {
+public:
+ const AtomicString& xmllang() const { return m_lang; }
+ void setXmllang(const AtomicString& xmlLang);
- const AtomicString& xmlspace() const;
- void setXmlspace(const AtomicString& xmlSpace);
+ const AtomicString& xmlspace() const;
+ void setXmlspace(const AtomicString& xmlSpace);
- bool parseMappedAttribute(Attribute*);
- bool isKnownAttribute(const QualifiedName&);
+ bool parseMappedAttribute(Attribute*);
+ bool isKnownAttribute(const QualifiedName&);
- private:
- AtomicString m_lang;
- AtomicString m_space;
- };
+private:
+ AtomicString m_lang;
+ AtomicString m_space;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGMetadataElement.h b/WebCore/svg/SVGMetadataElement.h
index 4cac5bc..8fdbfb4 100644
--- a/WebCore/svg/SVGMetadataElement.h
+++ b/WebCore/svg/SVGMetadataElement.h
@@ -26,13 +26,13 @@
namespace WebCore {
- class SVGMetadataElement : public SVGElement {
- public:
- static PassRefPtr<SVGMetadataElement> create(const QualifiedName&, Document*);
+class SVGMetadataElement : public SVGElement {
+public:
+ static PassRefPtr<SVGMetadataElement> create(const QualifiedName&, Document*);
- private:
- SVGMetadataElement(const QualifiedName&, Document*);
- };
+private:
+ SVGMetadataElement(const QualifiedName&, Document*);
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGMissingGlyphElement.h b/WebCore/svg/SVGMissingGlyphElement.h
index ecae295..a133d6d 100644
--- a/WebCore/svg/SVGMissingGlyphElement.h
+++ b/WebCore/svg/SVGMissingGlyphElement.h
@@ -25,15 +25,15 @@
namespace WebCore {
- class SVGMissingGlyphElement : public SVGStyledElement {
- public:
- static PassRefPtr<SVGMissingGlyphElement> create(const QualifiedName&, Document*);
+class SVGMissingGlyphElement : public SVGStyledElement {
+public:
+ static PassRefPtr<SVGMissingGlyphElement> create(const QualifiedName&, Document*);
- private:
- SVGMissingGlyphElement(const QualifiedName&, Document*);
+private:
+ SVGMissingGlyphElement(const QualifiedName&, Document*);
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- };
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPaint.cpp b/WebCore/svg/SVGPaint.cpp
index b36e97d..76c13d5 100644
--- a/WebCore/svg/SVGPaint.cpp
+++ b/WebCore/svg/SVGPaint.cpp
@@ -23,6 +23,7 @@
#if ENABLE(SVG)
#include "SVGPaint.h"
+
#include "SVGURIReference.h"
namespace WebCore {
@@ -99,9 +100,9 @@ String SVGPaint::cssText() const
{
if (m_paintType == SVG_PAINTTYPE_NONE)
return "none";
- else if (m_paintType == SVG_PAINTTYPE_CURRENTCOLOR)
+ if (m_paintType == SVG_PAINTTYPE_CURRENTCOLOR)
return "currentColor";
- else if (m_paintType == SVG_PAINTTYPE_URI)
+ if (m_paintType == SVG_PAINTTYPE_URI)
return "url(" + m_uri + ")";
return SVGColor::cssText();
diff --git a/WebCore/svg/SVGPaint.h b/WebCore/svg/SVGPaint.h
index f0ceb4c..9b66295 100644
--- a/WebCore/svg/SVGPaint.h
+++ b/WebCore/svg/SVGPaint.h
@@ -22,75 +22,74 @@
#ifndef SVGPaint_h
#define SVGPaint_h
#if ENABLE(SVG)
-
-#include "SVGColor.h"
#include "PlatformString.h"
+#include "SVGColor.h"
namespace WebCore {
- class SVGPaint : public SVGColor {
- public:
- enum SVGPaintType {
- SVG_PAINTTYPE_UNKNOWN = 0,
- SVG_PAINTTYPE_RGBCOLOR = 1,
- SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2,
- SVG_PAINTTYPE_NONE = 101,
- SVG_PAINTTYPE_CURRENTCOLOR = 102,
- SVG_PAINTTYPE_URI_NONE = 103,
- SVG_PAINTTYPE_URI_CURRENTCOLOR = 104,
- SVG_PAINTTYPE_URI_RGBCOLOR = 105,
- SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
- SVG_PAINTTYPE_URI = 107
- };
+class SVGPaint : public SVGColor {
+public:
+ enum SVGPaintType {
+ SVG_PAINTTYPE_UNKNOWN = 0,
+ SVG_PAINTTYPE_RGBCOLOR = 1,
+ SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2,
+ SVG_PAINTTYPE_NONE = 101,
+ SVG_PAINTTYPE_CURRENTCOLOR = 102,
+ SVG_PAINTTYPE_URI_NONE = 103,
+ SVG_PAINTTYPE_URI_CURRENTCOLOR = 104,
+ SVG_PAINTTYPE_URI_RGBCOLOR = 105,
+ SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
+ SVG_PAINTTYPE_URI = 107
+ };
- static PassRefPtr<SVGPaint> create()
- {
- return adoptRef(new SVGPaint);
- }
- static PassRefPtr<SVGPaint> create(SVGPaintType type)
- {
- return adoptRef(new SVGPaint(type));
- }
- static PassRefPtr<SVGPaint> create(const Color& color)
- {
- return adoptRef(new SVGPaint(color));
- }
- static PassRefPtr<SVGPaint> create(SVGPaintType type, const String& uri)
- {
- return adoptRef(new SVGPaint(type, uri, String(), String()));
- }
- static PassRefPtr<SVGPaint> create(const String& uri, const Color& color)
- {
- return adoptRef(new SVGPaint(uri, color));
- }
+ static PassRefPtr<SVGPaint> create()
+ {
+ return adoptRef(new SVGPaint);
+ }
+ static PassRefPtr<SVGPaint> create(SVGPaintType type)
+ {
+ return adoptRef(new SVGPaint(type));
+ }
+ static PassRefPtr<SVGPaint> create(const Color& color)
+ {
+ return adoptRef(new SVGPaint(color));
+ }
+ static PassRefPtr<SVGPaint> create(SVGPaintType type, const String& uri)
+ {
+ return adoptRef(new SVGPaint(type, uri, String(), String()));
+ }
+ static PassRefPtr<SVGPaint> create(const String& uri, const Color& color)
+ {
+ return adoptRef(new SVGPaint(uri, color));
+ }
- // 'SVGPaint' functions
- SVGPaintType paintType() const { return m_paintType; }
- String uri() const;
+ // 'SVGPaint' functions
+ SVGPaintType paintType() const { return m_paintType; }
+ String uri() const;
- void setUri(const String&);
- void setPaint(SVGPaintType, const String& uri, const String& rgbPaint, const String& iccPaint, ExceptionCode&);
-
- static SVGPaint* defaultFill();
- static SVGPaint* defaultStroke();
+ void setUri(const String&);
+ void setPaint(SVGPaintType, const String& uri, const String& rgbPaint, const String& iccPaint, ExceptionCode&);
+
+ static SVGPaint* defaultFill();
+ static SVGPaint* defaultStroke();
- bool matchesTargetURI(const String& referenceId);
+ bool matchesTargetURI(const String& referenceId);
- private:
- SVGPaint();
- SVGPaint(const String& uri);
- SVGPaint(SVGPaintType);
- SVGPaint(SVGPaintType, const String& uri, const String& rgbPaint, const String& iccPaint);
- SVGPaint(const Color& c);
- SVGPaint(const String& uri, const Color& c);
+private:
+ SVGPaint();
+ SVGPaint(const String& uri);
+ SVGPaint(SVGPaintType);
+ SVGPaint(SVGPaintType, const String& uri, const String& rgbPaint, const String& iccPaint);
+ SVGPaint(const Color& c);
+ SVGPaint(const String& uri, const Color& c);
- virtual bool isSVGPaint() const { return true; }
+ virtual bool isSVGPaint() const { return true; }
- virtual String cssText() const;
+ virtual String cssText() const;
- SVGPaintType m_paintType;
- String m_uri;
- };
+ SVGPaintType m_paintType;
+ String m_uri;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGParserUtilities.cpp b/WebCore/svg/SVGParserUtilities.cpp
index 63bc5bb..0405230 100644
--- a/WebCore/svg/SVGParserUtilities.cpp
+++ b/WebCore/svg/SVGParserUtilities.cpp
@@ -27,8 +27,9 @@
#include "Document.h"
#include "FloatPoint.h"
-#include <limits>
#include "SVGPointList.h"
+
+#include <limits>
#include <wtf/ASCIICType.h>
namespace WebCore {
diff --git a/WebCore/svg/SVGParserUtilities.h b/WebCore/svg/SVGParserUtilities.h
index 0718d50..da8ac1f 100644
--- a/WebCore/svg/SVGParserUtilities.h
+++ b/WebCore/svg/SVGParserUtilities.h
@@ -30,43 +30,43 @@ typedef Vector<UnicodeRange> UnicodeRanges;
namespace WebCore {
- class SVGPointList;
+class SVGPointList;
- bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip = true);
- bool parseNumberOptionalNumber(const String& s, float& h, float& v);
- bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag);
+bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip = true);
+bool parseNumberOptionalNumber(const String& s, float& h, float& v);
+bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag);
- // SVG allows several different whitespace characters:
- // http://www.w3.org/TR/SVG/paths.html#PathDataBNF
- inline bool isWhitespace(const UChar& c)
- {
- return (c == ' ' || c == '\t' || c == '\n' || c == '\r');
- }
+// SVG allows several different whitespace characters:
+// http://www.w3.org/TR/SVG/paths.html#PathDataBNF
+inline bool isWhitespace(const UChar& c)
+{
+ return c == ' ' || c == '\t' || c == '\n' || c == '\r';
+}
- inline bool skipOptionalSpaces(const UChar*& ptr, const UChar* end)
- {
- while (ptr < end && isWhitespace(*ptr))
- ptr++;
- return ptr < end;
- }
+inline bool skipOptionalSpaces(const UChar*& ptr, const UChar* end)
+{
+ while (ptr < end && isWhitespace(*ptr))
+ ptr++;
+ return ptr < end;
+}
- inline bool skipOptionalSpacesOrDelimiter(const UChar*& ptr, const UChar* end, UChar delimiter = ',')
- {
- if (ptr < end && !isWhitespace(*ptr) && *ptr != delimiter)
- return false;
- if (skipOptionalSpaces(ptr, end)) {
- if (ptr < end && *ptr == delimiter) {
- ptr++;
- skipOptionalSpaces(ptr, end);
- }
+inline bool skipOptionalSpacesOrDelimiter(const UChar*& ptr, const UChar* end, UChar delimiter = ',')
+{
+ if (ptr < end && !isWhitespace(*ptr) && *ptr != delimiter)
+ return false;
+ if (skipOptionalSpaces(ptr, end)) {
+ if (ptr < end && *ptr == delimiter) {
+ ptr++;
+ skipOptionalSpaces(ptr, end);
}
- return ptr < end;
}
+ return ptr < end;
+}
- bool pointsListFromSVGData(SVGPointList& pointsList, const String& points);
- Vector<String> parseDelimitedString(const String& input, const char seperator);
- bool parseKerningUnicodeString(const String& input, UnicodeRanges&, HashSet<String>& stringList);
- bool parseGlyphName(const String& input, HashSet<String>& values);
+bool pointsListFromSVGData(SVGPointList& pointsList, const String& points);
+Vector<String> parseDelimitedString(const String& input, const char seperator);
+bool parseKerningUnicodeString(const String& input, UnicodeRanges&, HashSet<String>& stringList);
+bool parseGlyphName(const String& input, HashSet<String>& values);
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathElement.cpp b/WebCore/svg/SVGPathElement.cpp
index 75665c1..77b543f 100644
--- a/WebCore/svg/SVGPathElement.cpp
+++ b/WebCore/svg/SVGPathElement.cpp
@@ -38,8 +38,8 @@
#include "SVGPathSegLinetoHorizontal.h"
#include "SVGPathSegLinetoVertical.h"
#include "SVGPathSegList.h"
-#include "SVGPathSegListPropertyTearOff.h"
#include "SVGPathSegListBuilder.h"
+#include "SVGPathSegListPropertyTearOff.h"
#include "SVGPathSegMoveto.h"
#include "SVGSVGElement.h"
diff --git a/WebCore/svg/SVGPathParserFactory.h b/WebCore/svg/SVGPathParserFactory.h
index 5ae5e8a..895e65a 100644
--- a/WebCore/svg/SVGPathParserFactory.h
+++ b/WebCore/svg/SVGPathParserFactory.h
@@ -23,9 +23,10 @@
#if ENABLE(SVG)
#include "Path.h"
#include "PlatformString.h"
+#include "SVGPathByteStream.h"
#include "SVGPathConsumer.h"
#include "SVGPathSegList.h"
-#include "SVGPathByteStream.h"
+
#include <wtf/OwnPtr.h>
namespace WebCore {
diff --git a/WebCore/svg/SVGPathSegList.h b/WebCore/svg/SVGPathSegList.h
index 48a1845..5013b9f 100644
--- a/WebCore/svg/SVGPathSegList.h
+++ b/WebCore/svg/SVGPathSegList.h
@@ -21,12 +21,12 @@
#define SVGPathSegList_h
#if ENABLE(SVG)
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
-
#include "SVGPathSeg.h"
#include "SVGPropertyTraits.h"
+#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
+
namespace WebCore {
class SVGElement;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list