Diff
Modified: trunk/Source/WebCore/ChangeLog (88988 => 88989)
--- trunk/Source/WebCore/ChangeLog 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/ChangeLog 2011-06-16 01:54:11 UTC (rev 88989)
@@ -1,3 +1,81 @@
+2011-06-15 Rob Buis <[email protected]>
+
+ Reviewed by Darin Adler.
+
+ Try to use fastGetAttribute where possible
+ https://bugs.webkit.org/show_bug.cgi?id=62747
+
+ Use the fast versions of get/hasAttribute where we can.
+
+ No new tests since this is a simple cleanup.
+
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::title):
+ (WebCore::SVGAElement::defaultEventHandler):
+ * svg/SVGAltGlyphElement.cpp:
+ (WebCore::SVGAltGlyphElement::glyphRef):
+ (WebCore::SVGAltGlyphElement::format):
+ (WebCore::SVGAltGlyphElement::glyphElement):
+ * svg/SVGAnimateMotionElement.cpp:
+ (WebCore::SVGAnimateMotionElement::rotateMode):
+ (WebCore::SVGAnimateMotionElement::animationPath):
+ * svg/SVGAnimationElement.cpp:
+ (WebCore::SVGAnimationElement::animationMode):
+ (WebCore::SVGAnimationElement::calcMode):
+ (WebCore::SVGAnimationElement::attributeType):
+ (WebCore::SVGAnimationElement::toValue):
+ (WebCore::SVGAnimationElement::byValue):
+ (WebCore::SVGAnimationElement::fromValue):
+ (WebCore::SVGAnimationElement::isAdditive):
+ (WebCore::SVGAnimationElement::isAccumulated):
+ (WebCore::SVGAnimationElement::startedActiveInterval):
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::xmlbase):
+ * svg/SVGFontElement.cpp:
+ (WebCore::SVGFontElement::ensureGlyphCache):
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::unitsPerEm):
+ (WebCore::SVGFontFaceElement::xHeight):
+ (WebCore::SVGFontFaceElement::horizontalOriginX):
+ (WebCore::SVGFontFaceElement::horizontalOriginY):
+ (WebCore::SVGFontFaceElement::horizontalAdvanceX):
+ (WebCore::SVGFontFaceElement::verticalOriginX):
+ (WebCore::SVGFontFaceElement::verticalOriginY):
+ (WebCore::SVGFontFaceElement::verticalAdvanceY):
+ (WebCore::SVGFontFaceElement::ascent):
+ (WebCore::SVGFontFaceElement::descent):
+ * svg/SVGFontFaceNameElement.cpp:
+ (WebCore::SVGFontFaceNameElement::srcValue):
+ * svg/SVGFontFaceUriElement.cpp:
+ (WebCore::SVGFontFaceUriElement::srcValue):
+ (WebCore::SVGFontFaceUriElement::loadFont):
+ * svg/SVGGlyphElement.cpp:
+ (WebCore::parseSVGGlyphAttribute):
+ (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
+ (WebCore::SVGGlyphElement::buildGlyphIdentifier):
+ * svg/SVGHKernElement.cpp:
+ (WebCore::SVGHKernElement::buildHorizontalKerningPair):
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::contentScriptType):
+ (WebCore::SVGSVGElement::contentStyleType):
+ * svg/SVGStyleElement.cpp:
+ (WebCore::SVGStyleElement::type):
+ (WebCore::SVGStyleElement::media):
+ (WebCore::SVGStyleElement::title):
+ * svg/SVGVKernElement.cpp:
+ (WebCore::SVGVKernElement::buildVerticalKerningPair):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::SVGSMILElement::insertedIntoDocument):
+ (WebCore::SVGSMILElement::parseMappedAttribute):
+ (WebCore::SVGSMILElement::restart):
+ (WebCore::SVGSMILElement::fill):
+ (WebCore::SVGSMILElement::xlinkHref):
+ (WebCore::SVGSMILElement::dur):
+ (WebCore::SVGSMILElement::repeatDur):
+ (WebCore::SVGSMILElement::repeatCount):
+ (WebCore::SVGSMILElement::maxValue):
+ (WebCore::SVGSMILElement::minValue):
+
2011-06-15 Abhishek Arya <[email protected]>
Reviewed by Antti Koivisto.
Modified: trunk/Source/WebCore/svg/SVGAElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGAElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGAElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -67,7 +67,7 @@
String SVGAElement::title() const
{
// If the xlink:title is set (non-empty string), use it.
- const AtomicString& title = getAttribute(XLinkNames::titleAttr);
+ const AtomicString& title = fastGetAttribute(XLinkNames::titleAttr);
if (!title.isEmpty())
return title;
@@ -227,7 +227,7 @@
// FIXME: It's not clear why setting target to "_self" is ever
// helpful.
if (target.isEmpty())
- target = (getAttribute(XLinkNames::showAttr) == "new") ? "_blank" : "_self";
+ target = (fastGetAttribute(XLinkNames::showAttr) == "new") ? "_blank" : "_self";
handleLinkClick(event, document(), url, target);
return;
Modified: trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -76,7 +76,7 @@
const AtomicString& SVGAltGlyphElement::glyphRef() const
{
- return getAttribute(SVGNames::glyphRefAttr);
+ return fastGetAttribute(SVGNames::glyphRefAttr);
}
void SVGAltGlyphElement::setFormat(const AtomicString&, ExceptionCode& ec)
@@ -86,7 +86,7 @@
const AtomicString& SVGAltGlyphElement::format() const
{
- return getAttribute(SVGNames::formatAttr);
+ return fastGetAttribute(SVGNames::formatAttr);
}
bool SVGAltGlyphElement::childShouldCreateRenderer(Node* child) const
@@ -103,7 +103,7 @@
SVGGlyphElement* SVGAltGlyphElement::glyphElement() const
{
- Element* elt = treeScope()->getElementById(getTarget(getAttribute(XLinkNames::hrefAttr)));
+ Element* elt = treeScope()->getElementById(getTarget(fastGetAttribute(XLinkNames::hrefAttr)));
if (!elt || !elt->hasTagName(SVGNames::glyphTag))
return 0;
return static_cast<SVGGlyphElement*>(elt);
Modified: trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -118,7 +118,7 @@
{
DEFINE_STATIC_LOCAL(const AtomicString, autoVal, ("auto"));
DEFINE_STATIC_LOCAL(const AtomicString, autoReverse, ("auto-reverse"));
- String rotate = getAttribute(SVGNames::rotateAttr);
+ String rotate = fastGetAttribute(SVGNames::rotateAttr);
if (rotate == autoVal)
return RotateAuto;
if (rotate == autoReverse)
@@ -138,7 +138,7 @@
return path;
}
}
- if (hasAttribute(SVGNames::pathAttr))
+ if (fastHasAttribute(SVGNames::pathAttr))
return m_path;
return Path();
}
Modified: trunk/Source/WebCore/svg/SVGAnimationElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGAnimationElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -260,7 +260,7 @@
return ToAnimation;
if (!animationPath().isEmpty())
return PathAnimation;
- if (hasAttribute(SVGNames::valuesAttr))
+ if (fastHasAttribute(SVGNames::valuesAttr))
return ValuesAnimation;
if (!toValue().isEmpty())
return fromValue().isEmpty() ? ToAnimation : FromToAnimation;
@@ -275,7 +275,7 @@
DEFINE_STATIC_LOCAL(const AtomicString, linear, ("linear"));
DEFINE_STATIC_LOCAL(const AtomicString, paced, ("paced"));
DEFINE_STATIC_LOCAL(const AtomicString, spline, ("spline"));
- const AtomicString& value = getAttribute(SVGNames::calcModeAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::calcModeAttr);
if (value == discrete)
return CalcModeDiscrete;
if (value == linear)
@@ -291,7 +291,7 @@
{
DEFINE_STATIC_LOCAL(const AtomicString, css, ("CSS"));
DEFINE_STATIC_LOCAL(const AtomicString, xml, ("XML"));
- const AtomicString& value = getAttribute(SVGNames::attributeTypeAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::attributeTypeAttr);
if (value == css)
return AttributeTypeCSS;
if (value == xml)
@@ -301,30 +301,30 @@
String SVGAnimationElement::toValue() const
{
- return getAttribute(SVGNames::toAttr);
+ return fastGetAttribute(SVGNames::toAttr);
}
String SVGAnimationElement::byValue() const
{
- return getAttribute(SVGNames::byAttr);
+ return fastGetAttribute(SVGNames::byAttr);
}
String SVGAnimationElement::fromValue() const
{
- return getAttribute(SVGNames::fromAttr);
+ return fastGetAttribute(SVGNames::fromAttr);
}
bool SVGAnimationElement::isAdditive() const
{
DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum"));
- const AtomicString& value = getAttribute(SVGNames::additiveAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::additiveAttr);
return value == sum || animationMode() == ByAnimation;
}
bool SVGAnimationElement::isAccumulated() const
{
DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum"));
- const AtomicString& value = getAttribute(SVGNames::accumulateAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::accumulateAttr);
return value == sum && animationMode() != ToAnimation;
}
@@ -530,14 +530,14 @@
return;
// These validations are appropriate for all animation modes.
- if (hasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != m_keyTimes.size())
+ if (fastHasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != m_keyTimes.size())
return;
AnimationMode animationMode = this->animationMode();
CalcMode calcMode = this->calcMode();
if (calcMode == CalcModeSpline) {
unsigned splinesCount = m_keySplines.size() + 1;
- if ((hasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != splinesCount)
+ if ((fastHasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != splinesCount)
|| (animationMode == ValuesAnimation && m_values.size() != splinesCount))
return;
}
@@ -559,14 +559,14 @@
m_animationValid = calculateFromAndByValues(String(), by);
else if (animationMode == ValuesAnimation) {
m_animationValid = m_values.size() > 1
- && (calcMode == CalcModePaced || !hasAttribute(SVGNames::keyTimesAttr) || hasAttribute(SVGNames::keyPointsAttr) || (m_values.size() == m_keyTimes.size()))
+ && (calcMode == CalcModePaced || !fastHasAttribute(SVGNames::keyTimesAttr) || fastHasAttribute(SVGNames::keyPointsAttr) || (m_values.size() == m_keyTimes.size()))
&& (calcMode == CalcModeDiscrete || !m_keyTimes.size() || m_keyTimes.last() == 1)
&& (calcMode != CalcModeSpline || ((m_keySplines.size() && (m_keySplines.size() == m_values.size() - 1)) || m_keySplines.size() == m_keyPoints.size() - 1))
- && (!hasAttribute(SVGNames::keyPointsAttr) || (m_keyTimes.size() > 1 && m_keyTimes.size() == m_keyPoints.size()));
+ && (!fastHasAttribute(SVGNames::keyPointsAttr) || (m_keyTimes.size() > 1 && m_keyTimes.size() == m_keyPoints.size()));
if (calcMode == CalcModePaced && m_animationValid)
calculateKeyTimesForCalcModePaced();
} else if (animationMode == PathAnimation)
- m_animationValid = calcMode == CalcModePaced || !hasAttribute(SVGNames::keyPointsAttr) || (m_keyTimes.size() > 1 && m_keyTimes.size() == m_keyPoints.size());
+ m_animationValid = calcMode == CalcModePaced || !fastHasAttribute(SVGNames::keyPointsAttr) || (m_keyTimes.size() > 1 && m_keyTimes.size() == m_keyPoints.size());
}
void SVGAnimationElement::updateAnimation(float percent, unsigned repeat, SVGSMILElement* resultElement)
Modified: trunk/Source/WebCore/svg/SVGElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -110,7 +110,7 @@
String SVGElement::xmlbase() const
{
- return getAttribute(XMLNames::baseAttr);
+ return fastGetAttribute(XMLNames::baseAttr);
}
void SVGElement::setXmlbase(const String& value, ExceptionCode&)
Modified: trunk/Source/WebCore/svg/SVGFontElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGFontElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGFontElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -129,7 +129,7 @@
for (Node* child = firstChild(); child; child = child->nextSibling()) {
if (child->hasTagName(SVGNames::glyphTag)) {
SVGGlyphElement* glyph = static_cast<SVGGlyphElement*>(child);
- String unicode = glyph->getAttribute(SVGNames::unicodeAttr);
+ String unicode = glyph->fastGetAttribute(SVGNames::unicodeAttr);
SVGGlyph svgGlyph = glyph->buildGlyphIdentifier();
unsigned unicodeLength = unicode.length();
Modified: trunk/Source/WebCore/svg/SVGFontFaceElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGFontFaceElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGFontFaceElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -124,7 +124,7 @@
unsigned SVGFontFaceElement::unitsPerEm() const
{
- const AtomicString& value = getAttribute(units_per_emAttr);
+ const AtomicString& value = fastGetAttribute(units_per_emAttr);
if (value.isEmpty())
return gDefaultUnitsPerEm;
@@ -133,7 +133,7 @@
int SVGFontFaceElement::xHeight() const
{
- return static_cast<int>(ceilf(getAttribute(x_heightAttr).toFloat()));
+ return static_cast<int>(ceilf(fastGetAttribute(x_heightAttr).toFloat()));
}
float SVGFontFaceElement::horizontalOriginX() const
@@ -144,7 +144,7 @@
// Spec: The X-coordinate in the font coordinate system of the origin of a glyph to be used when
// drawing horizontally oriented text. (Note that the origin applies to all glyphs in the font.)
// If the attribute is not specified, the effect is as if a value of "0" were specified.
- return m_fontElement->getAttribute(horiz_origin_xAttr).toFloat();
+ return m_fontElement->fastGetAttribute(horiz_origin_xAttr).toFloat();
}
float SVGFontFaceElement::horizontalOriginY() const
@@ -155,7 +155,7 @@
// Spec: The Y-coordinate in the font coordinate system of the origin of a glyph to be used when
// drawing horizontally oriented text. (Note that the origin applies to all glyphs in the font.)
// If the attribute is not specified, the effect is as if a value of "0" were specified.
- return m_fontElement->getAttribute(horiz_origin_yAttr).toFloat();
+ return m_fontElement->fastGetAttribute(horiz_origin_yAttr).toFloat();
}
float SVGFontFaceElement::horizontalAdvanceX() const
@@ -166,7 +166,7 @@
// Spec: The default horizontal advance after rendering a glyph in horizontal orientation. Glyph
// widths are required to be non-negative, even if the glyph is typically rendered right-to-left,
// as in Hebrew and Arabic scripts.
- return m_fontElement->getAttribute(horiz_adv_xAttr).toFloat();
+ return m_fontElement->fastGetAttribute(horiz_adv_xAttr).toFloat();
}
float SVGFontFaceElement::verticalOriginX() const
@@ -177,7 +177,7 @@
// Spec: The default X-coordinate in the font coordinate system of the origin of a glyph to be used when
// drawing vertically oriented text. If the attribute is not specified, the effect is as if the attribute
// were set to half of the effective value of attribute horiz-adv-x.
- const AtomicString& value = m_fontElement->getAttribute(vert_origin_xAttr);
+ const AtomicString& value = m_fontElement->fastGetAttribute(vert_origin_xAttr);
if (value.isEmpty())
return horizontalAdvanceX() / 2.0f;
@@ -192,7 +192,7 @@
// Spec: The default Y-coordinate in the font coordinate system of the origin of a glyph to be used when
// drawing vertically oriented text. If the attribute is not specified, the effect is as if the attribute
// were set to the position specified by the font's ascent attribute.
- const AtomicString& value = m_fontElement->getAttribute(vert_origin_yAttr);
+ const AtomicString& value = m_fontElement->fastGetAttribute(vert_origin_yAttr);
if (value.isEmpty())
return ascent();
@@ -206,7 +206,7 @@
// Spec: The default vertical advance after rendering a glyph in vertical orientation. If the attribute is
// not specified, the effect is as if a value equivalent of one em were specified (see units-per-em).
- const AtomicString& value = m_fontElement->getAttribute(vert_adv_yAttr);
+ const AtomicString& value = m_fontElement->fastGetAttribute(vert_adv_yAttr);
if (value.isEmpty())
return 1.0f;
@@ -219,12 +219,12 @@
// unaccented height of the font within the font coordinate system. If the attribute is not specified,
// the effect is as if the attribute were set to the difference between the units-per-em value and the
// vert-origin-y value for the corresponding font.
- const AtomicString& ascentValue = getAttribute(ascentAttr);
+ const AtomicString& ascentValue = fastGetAttribute(ascentAttr);
if (!ascentValue.isEmpty())
return static_cast<int>(ceilf(ascentValue.toFloat()));
if (m_fontElement) {
- const AtomicString& vertOriginY = m_fontElement->getAttribute(vert_origin_yAttr);
+ const AtomicString& vertOriginY = m_fontElement->fastGetAttribute(vert_origin_yAttr);
if (!vertOriginY.isEmpty())
return static_cast<int>(unitsPerEm()) - static_cast<int>(ceilf(vertOriginY.toFloat()));
}
@@ -238,7 +238,7 @@
// Spec: Same syntax and semantics as the 'descent' descriptor within an @font-face rule. The maximum
// unaccented depth of the font within the font coordinate system. If the attribute is not specified,
// the effect is as if the attribute were set to the vert-origin-y value for the corresponding font.
- const AtomicString& descentValue = getAttribute(descentAttr);
+ const AtomicString& descentValue = fastGetAttribute(descentAttr);
if (!descentValue.isEmpty()) {
// 14 different W3C SVG 1.1 testcases use a negative descent value,
// where a positive was meant to be used Including:
@@ -248,7 +248,7 @@
}
if (m_fontElement) {
- const AtomicString& vertOriginY = m_fontElement->getAttribute(vert_origin_yAttr);
+ const AtomicString& vertOriginY = m_fontElement->fastGetAttribute(vert_origin_yAttr);
if (!vertOriginY.isEmpty())
return static_cast<int>(ceilf(vertOriginY.toFloat()));
}
Modified: trunk/Source/WebCore/svg/SVGFontFaceNameElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGFontFaceNameElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGFontFaceNameElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -40,7 +40,7 @@
PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceNameElement::srcValue() const
{
- return CSSFontFaceSrcValue::createLocal(getAttribute(SVGNames::nameAttr));
+ return CSSFontFaceSrcValue::createLocal(fastGetAttribute(SVGNames::nameAttr));
}
}
Modified: trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -55,8 +55,8 @@
PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceUriElement::srcValue() const
{
- RefPtr<CSSFontFaceSrcValue> src = ""
- AtomicString value(getAttribute(formatAttr));
+ RefPtr<CSSFontFaceSrcValue> src = ""
+ AtomicString value(fastGetAttribute(formatAttr));
src->setFormat(value.isEmpty() ? "svg" : value); // Default format
return src.release();
}
@@ -93,7 +93,7 @@
if (m_cachedFont)
m_cachedFont->removeClient(this);
- String href = ""
+ String href = ""
if (!href.isNull()) {
CachedResourceLoader* cachedResourceLoader = document()->cachedResourceLoader();
ResourceRequest request(document()->completeURL(href));
Modified: trunk/Source/WebCore/svg/SVGGlyphElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGGlyphElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGGlyphElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -122,7 +122,7 @@
static inline float parseSVGGlyphAttribute(const SVGElement* element, const WebCore::QualifiedName& name)
{
- AtomicString value(element->getAttribute(name));
+ AtomicString value(element->fastGetAttribute(name));
if (value.isEmpty())
return SVGGlyph::inheritedValue();
@@ -146,7 +146,7 @@
SVGGlyph SVGGlyphElement::buildGenericGlyphIdentifier(const SVGElement* element)
{
SVGGlyph identifier;
- identifier.pathData = parsePathData(element->getAttribute(SVGNames::dAttr));
+ identifier.pathData = parsePathData(element->fastGetAttribute(SVGNames::dAttr));
// Spec: The horizontal advance after rendering the glyph in horizontal orientation.
// If the attribute is not specified, the effect is as if the attribute were set to the
@@ -175,11 +175,11 @@
SVGGlyph SVGGlyphElement::buildGlyphIdentifier() const
{
SVGGlyph identifier(buildGenericGlyphIdentifier(this));
- identifier.glyphName = getAttribute(SVGNames::glyph_nameAttr);
- identifier.orientation = parseOrientation(getAttribute(SVGNames::orientationAttr));
- identifier.arabicForm = parseArabicForm(getAttribute(SVGNames::arabic_formAttr));
+ identifier.glyphName = fastGetAttribute(SVGNames::glyph_nameAttr);
+ identifier.orientation = parseOrientation(fastGetAttribute(SVGNames::orientationAttr));
+ identifier.arabicForm = parseArabicForm(fastGetAttribute(SVGNames::arabic_formAttr));
- String language = getAttribute(SVGNames::langAttr);
+ String language = fastGetAttribute(SVGNames::langAttr);
if (!language.isEmpty())
identifier.languages = parseDelimitedString(language, ',');
Modified: trunk/Source/WebCore/svg/SVGHKernElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGHKernElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGHKernElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -63,10 +63,10 @@
void SVGHKernElement::buildHorizontalKerningPair(KerningPairVector& kerningPairs)
{
- String u1 = getAttribute(SVGNames::u1Attr);
- String g1 = getAttribute(SVGNames::g1Attr);
- String u2 = getAttribute(SVGNames::u2Attr);
- String g2 = getAttribute(SVGNames::g2Attr);
+ String u1 = fastGetAttribute(SVGNames::u1Attr);
+ String g1 = fastGetAttribute(SVGNames::g1Attr);
+ String u2 = fastGetAttribute(SVGNames::u2Attr);
+ String g2 = fastGetAttribute(SVGNames::g2Attr);
if ((u1.isEmpty() && g1.isEmpty()) || (u2.isEmpty() && g2.isEmpty()))
return;
@@ -75,7 +75,7 @@
&& parseGlyphName(g2, kerningPair.glyphName2)
&& parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.unicodeName1)
&& parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.unicodeName2)) {
- kerningPair.kerning = getAttribute(SVGNames::kAttr).string().toFloat();
+ kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat();
kerningPairs.append(kerningPair);
}
}
Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGSVGElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -108,7 +108,7 @@
const AtomicString& SVGSVGElement::contentScriptType() const
{
DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/ecmascript"));
- const AtomicString& n = getAttribute(SVGNames::contentScriptTypeAttr);
+ const AtomicString& n = fastGetAttribute(SVGNames::contentScriptTypeAttr);
return n.isNull() ? defaultValue : n;
}
@@ -120,7 +120,7 @@
const AtomicString& SVGSVGElement::contentStyleType() const
{
DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css"));
- const AtomicString& n = getAttribute(SVGNames::contentStyleTypeAttr);
+ const AtomicString& n = fastGetAttribute(SVGNames::contentStyleTypeAttr);
return n.isNull() ? defaultValue : n;
}
Modified: trunk/Source/WebCore/svg/SVGStyleElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGStyleElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGStyleElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -55,7 +55,7 @@
const AtomicString& SVGStyleElement::type() const
{
DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css"));
- const AtomicString& n = getAttribute(SVGNames::typeAttr);
+ const AtomicString& n = fastGetAttribute(SVGNames::typeAttr);
return n.isNull() ? defaultValue : n;
}
@@ -67,7 +67,7 @@
const AtomicString& SVGStyleElement::media() const
{
DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("all"));
- const AtomicString& n = getAttribute(SVGNames::mediaAttr);
+ const AtomicString& n = fastGetAttribute(SVGNames::mediaAttr);
return n.isNull() ? defaultValue : n;
}
@@ -78,7 +78,7 @@
String SVGStyleElement::title() const
{
- return getAttribute(SVGNames::titleAttr);
+ return fastGetAttribute(SVGNames::titleAttr);
}
void SVGStyleElement::setTitle(const AtomicString& title, ExceptionCode& ec)
Modified: trunk/Source/WebCore/svg/SVGVKernElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/SVGVKernElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/SVGVKernElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -61,10 +61,10 @@
void SVGVKernElement::buildVerticalKerningPair(KerningPairVector& kerningPairs)
{
- String u1 = getAttribute(SVGNames::u1Attr);
- String g1 = getAttribute(SVGNames::g1Attr);
- String u2 = getAttribute(SVGNames::u2Attr);
- String g2 = getAttribute(SVGNames::g2Attr);
+ String u1 = fastGetAttribute(SVGNames::u1Attr);
+ String g1 = fastGetAttribute(SVGNames::g1Attr);
+ String u2 = fastGetAttribute(SVGNames::u2Attr);
+ String g2 = fastGetAttribute(SVGNames::g2Attr);
if ((u1.isEmpty() && g1.isEmpty()) || (u2.isEmpty() && g2.isEmpty()))
return;
@@ -73,7 +73,7 @@
&& parseGlyphName(g2, kerningPair.glyphName2)
&& parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.unicodeName1)
&& parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.unicodeName2)) {
- kerningPair.kerning = getAttribute(SVGNames::kAttr).string().toFloat();
+ kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat();
kerningPairs.append(kerningPair);
}
}
Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (88988 => 88989)
--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2011-06-16 01:17:46 UTC (rev 88988)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2011-06-16 01:54:11 UTC (rev 88989)
@@ -175,7 +175,7 @@
for (ContainerNode* n = this; n; n = n->parentNode())
ASSERT(!n->isSVGShadowRoot());
#endif
- m_attributeName = constructQualifiedName(this, getAttribute(SVGNames::attributeNameAttr));
+ m_attributeName = constructQualifiedName(this, fastGetAttribute(SVGNames::attributeNameAttr));
SVGSVGElement* owner = ownerSVGElement();
if (!owner)
return;
@@ -184,7 +184,7 @@
m_timeContainer->setDocumentOrderIndexesDirty();
// "If no attribute is present, the default begin value (an offset-value of 0) must be evaluated."
- if (!hasAttribute(SVGNames::beginAttr))
+ if (!fastHasAttribute(SVGNames::beginAttr))
m_beginTimes.append(0);
if (m_isWaitingForFirstInterval) {
@@ -373,7 +373,7 @@
if (!m_conditions.isEmpty()) {
disconnectConditions();
m_conditions.clear();
- parseBeginOrEnd(getAttribute(SVGNames::endAttr), End);
+ parseBeginOrEnd(fastGetAttribute(SVGNames::endAttr), End);
}
parseBeginOrEnd(attr->value().string(), Begin);
if (inDocument())
@@ -382,7 +382,7 @@
if (!m_conditions.isEmpty()) {
disconnectConditions();
m_conditions.clear();
- parseBeginOrEnd(getAttribute(SVGNames::beginAttr), Begin);
+ parseBeginOrEnd(fastGetAttribute(SVGNames::beginAttr), Begin);
}
parseBeginOrEnd(attr->value().string(), End);
if (inDocument())
@@ -523,7 +523,7 @@
{
DEFINE_STATIC_LOCAL(const AtomicString, never, ("never"));
DEFINE_STATIC_LOCAL(const AtomicString, whenNotActive, ("whenNotActive"));
- const AtomicString& value = getAttribute(SVGNames::restartAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::restartAttr);
if (value == never)
return RestartNever;
if (value == whenNotActive)
@@ -534,20 +534,20 @@
SVGSMILElement::FillMode SVGSMILElement::fill() const
{
DEFINE_STATIC_LOCAL(const AtomicString, freeze, ("freeze"));
- const AtomicString& value = getAttribute(SVGNames::fillAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::fillAttr);
return value == freeze ? FillFreeze : FillRemove;
}
String SVGSMILElement::xlinkHref() const
{
- return getAttribute(XLinkNames::hrefAttr);
+ return fastGetAttribute(XLinkNames::hrefAttr);
}
SMILTime SVGSMILElement::dur() const
{
if (m_cachedDur != invalidCachedTime)
return m_cachedDur;
- const AtomicString& value = getAttribute(SVGNames::durAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::durAttr);
SMILTime clockValue = parseClockValue(value);
return m_cachedDur = clockValue <= 0 ? SMILTime::unresolved() : clockValue;
}
@@ -556,7 +556,7 @@
{
if (m_cachedRepeatDur != invalidCachedTime)
return m_cachedRepeatDur;
- const AtomicString& value = getAttribute(SVGNames::repeatDurAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::repeatDurAttr);
SMILTime clockValue = parseClockValue(value);
m_cachedRepeatDur = clockValue <= 0 ? SMILTime::unresolved() : clockValue;
return m_cachedRepeatDur;
@@ -567,7 +567,7 @@
{
if (m_cachedRepeatCount != invalidCachedTime)
return m_cachedRepeatCount;
- const AtomicString& value = getAttribute(SVGNames::repeatCountAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::repeatCountAttr);
if (value.isNull())
return SMILTime::unresolved();
@@ -583,7 +583,7 @@
{
if (m_cachedMax != invalidCachedTime)
return m_cachedMax;
- const AtomicString& value = getAttribute(SVGNames::maxAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::maxAttr);
SMILTime result = parseClockValue(value);
return m_cachedMax = (result.isUnresolved() || result < 0) ? SMILTime::indefinite() : result;
}
@@ -592,7 +592,7 @@
{
if (m_cachedMin != invalidCachedTime)
return m_cachedMin;
- const AtomicString& value = getAttribute(SVGNames::minAttr);
+ const AtomicString& value = fastGetAttribute(SVGNames::minAttr);
SMILTime result = parseClockValue(value);
return m_cachedMin = (result.isUnresolved() || result < 0) ? 0 : result;
}