Changeset 88989 in webkit


Ignore:
Timestamp:
Jun 15, 2011 6:54:11 PM (13 years ago)
Author:
rwlbuis@webkit.org
Message:

2011-06-15 Rob Buis <rbuis@rim.com>

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):
Location:
trunk/Source/WebCore
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88987 r88989  
     12011-06-15  Rob Buis  <rbuis@rim.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Try to use fastGetAttribute where possible
     6        https://bugs.webkit.org/show_bug.cgi?id=62747
     7
     8        Use the fast versions of get/hasAttribute where we can.
     9
     10        No new tests since this is a simple cleanup.
     11
     12        * svg/SVGAElement.cpp:
     13        (WebCore::SVGAElement::title):
     14        (WebCore::SVGAElement::defaultEventHandler):
     15        * svg/SVGAltGlyphElement.cpp:
     16        (WebCore::SVGAltGlyphElement::glyphRef):
     17        (WebCore::SVGAltGlyphElement::format):
     18        (WebCore::SVGAltGlyphElement::glyphElement):
     19        * svg/SVGAnimateMotionElement.cpp:
     20        (WebCore::SVGAnimateMotionElement::rotateMode):
     21        (WebCore::SVGAnimateMotionElement::animationPath):
     22        * svg/SVGAnimationElement.cpp:
     23        (WebCore::SVGAnimationElement::animationMode):
     24        (WebCore::SVGAnimationElement::calcMode):
     25        (WebCore::SVGAnimationElement::attributeType):
     26        (WebCore::SVGAnimationElement::toValue):
     27        (WebCore::SVGAnimationElement::byValue):
     28        (WebCore::SVGAnimationElement::fromValue):
     29        (WebCore::SVGAnimationElement::isAdditive):
     30        (WebCore::SVGAnimationElement::isAccumulated):
     31        (WebCore::SVGAnimationElement::startedActiveInterval):
     32        * svg/SVGElement.cpp:
     33        (WebCore::SVGElement::xmlbase):
     34        * svg/SVGFontElement.cpp:
     35        (WebCore::SVGFontElement::ensureGlyphCache):
     36        * svg/SVGFontFaceElement.cpp:
     37        (WebCore::SVGFontFaceElement::unitsPerEm):
     38        (WebCore::SVGFontFaceElement::xHeight):
     39        (WebCore::SVGFontFaceElement::horizontalOriginX):
     40        (WebCore::SVGFontFaceElement::horizontalOriginY):
     41        (WebCore::SVGFontFaceElement::horizontalAdvanceX):
     42        (WebCore::SVGFontFaceElement::verticalOriginX):
     43        (WebCore::SVGFontFaceElement::verticalOriginY):
     44        (WebCore::SVGFontFaceElement::verticalAdvanceY):
     45        (WebCore::SVGFontFaceElement::ascent):
     46        (WebCore::SVGFontFaceElement::descent):
     47        * svg/SVGFontFaceNameElement.cpp:
     48        (WebCore::SVGFontFaceNameElement::srcValue):
     49        * svg/SVGFontFaceUriElement.cpp:
     50        (WebCore::SVGFontFaceUriElement::srcValue):
     51        (WebCore::SVGFontFaceUriElement::loadFont):
     52        * svg/SVGGlyphElement.cpp:
     53        (WebCore::parseSVGGlyphAttribute):
     54        (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
     55        (WebCore::SVGGlyphElement::buildGlyphIdentifier):
     56        * svg/SVGHKernElement.cpp:
     57        (WebCore::SVGHKernElement::buildHorizontalKerningPair):
     58        * svg/SVGSVGElement.cpp:
     59        (WebCore::SVGSVGElement::contentScriptType):
     60        (WebCore::SVGSVGElement::contentStyleType):
     61        * svg/SVGStyleElement.cpp:
     62        (WebCore::SVGStyleElement::type):
     63        (WebCore::SVGStyleElement::media):
     64        (WebCore::SVGStyleElement::title):
     65        * svg/SVGVKernElement.cpp:
     66        (WebCore::SVGVKernElement::buildVerticalKerningPair):
     67        * svg/animation/SVGSMILElement.cpp:
     68        (WebCore::SVGSMILElement::insertedIntoDocument):
     69        (WebCore::SVGSMILElement::parseMappedAttribute):
     70        (WebCore::SVGSMILElement::restart):
     71        (WebCore::SVGSMILElement::fill):
     72        (WebCore::SVGSMILElement::xlinkHref):
     73        (WebCore::SVGSMILElement::dur):
     74        (WebCore::SVGSMILElement::repeatDur):
     75        (WebCore::SVGSMILElement::repeatCount):
     76        (WebCore::SVGSMILElement::maxValue):
     77        (WebCore::SVGSMILElement::minValue):
     78
    1792011-06-15  Abhishek Arya  <inferno@chromium.org>
    280
  • trunk/Source/WebCore/svg/SVGAElement.cpp

    r87518 r88989  
    6868{
    6969    // If the xlink:title is set (non-empty string), use it.
    70     const AtomicString& title = getAttribute(XLinkNames::titleAttr);
     70    const AtomicString& title = fastGetAttribute(XLinkNames::titleAttr);
    7171    if (!title.isEmpty())
    7272        return title;
     
    228228            // helpful.
    229229            if (target.isEmpty())
    230                 target = (getAttribute(XLinkNames::showAttr) == "new") ? "_blank" : "_self";
     230                target = (fastGetAttribute(XLinkNames::showAttr) == "new") ? "_blank" : "_self";
    231231
    232232            handleLinkClick(event, document(), url, target);
  • trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp

    r86050 r88989  
    7777const AtomicString& SVGAltGlyphElement::glyphRef() const
    7878{
    79     return getAttribute(SVGNames::glyphRefAttr);
     79    return fastGetAttribute(SVGNames::glyphRefAttr);
    8080}
    8181
     
    8787const AtomicString& SVGAltGlyphElement::format() const
    8888{
    89     return getAttribute(SVGNames::formatAttr);
     89    return fastGetAttribute(SVGNames::formatAttr);
    9090}
    9191
     
    104104SVGGlyphElement* SVGAltGlyphElement::glyphElement() const
    105105{
    106     Element* elt = treeScope()->getElementById(getTarget(getAttribute(XLinkNames::hrefAttr)));
     106    Element* elt = treeScope()->getElementById(getTarget(fastGetAttribute(XLinkNames::hrefAttr)));
    107107    if (!elt || !elt->hasTagName(SVGNames::glyphTag))
    108108        return 0;
  • trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp

    r87010 r88989  
    119119    DEFINE_STATIC_LOCAL(const AtomicString, autoVal, ("auto"));
    120120    DEFINE_STATIC_LOCAL(const AtomicString, autoReverse, ("auto-reverse"));
    121     String rotate = getAttribute(SVGNames::rotateAttr);
     121    String rotate = fastGetAttribute(SVGNames::rotateAttr);
    122122    if (rotate == autoVal)
    123123        return RotateAuto;
     
    139139        }
    140140    }
    141     if (hasAttribute(SVGNames::pathAttr))
     141    if (fastHasAttribute(SVGNames::pathAttr))
    142142        return m_path;
    143143    return Path();
  • trunk/Source/WebCore/svg/SVGAnimationElement.cpp

    r88663 r88989  
    261261    if (!animationPath().isEmpty())
    262262        return PathAnimation;
    263     if (hasAttribute(SVGNames::valuesAttr))
     263    if (fastHasAttribute(SVGNames::valuesAttr))
    264264        return ValuesAnimation;
    265265    if (!toValue().isEmpty())
     
    276276    DEFINE_STATIC_LOCAL(const AtomicString, paced, ("paced"));
    277277    DEFINE_STATIC_LOCAL(const AtomicString, spline, ("spline"));
    278     const AtomicString& value = getAttribute(SVGNames::calcModeAttr);
     278    const AtomicString& value = fastGetAttribute(SVGNames::calcModeAttr);
    279279    if (value == discrete)
    280280        return CalcModeDiscrete;
     
    292292    DEFINE_STATIC_LOCAL(const AtomicString, css, ("CSS"));
    293293    DEFINE_STATIC_LOCAL(const AtomicString, xml, ("XML"));
    294     const AtomicString& value = getAttribute(SVGNames::attributeTypeAttr);
     294    const AtomicString& value = fastGetAttribute(SVGNames::attributeTypeAttr);
    295295    if (value == css)
    296296        return AttributeTypeCSS;
     
    302302String SVGAnimationElement::toValue() const
    303303{   
    304     return getAttribute(SVGNames::toAttr);
     304    return fastGetAttribute(SVGNames::toAttr);
    305305}
    306306
    307307String SVGAnimationElement::byValue() const
    308308{   
    309     return getAttribute(SVGNames::byAttr);
     309    return fastGetAttribute(SVGNames::byAttr);
    310310}
    311311
    312312String SVGAnimationElement::fromValue() const
    313313{   
    314     return getAttribute(SVGNames::fromAttr);
     314    return fastGetAttribute(SVGNames::fromAttr);
    315315}
    316316
     
    318318{
    319319    DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum"));
    320     const AtomicString& value = getAttribute(SVGNames::additiveAttr);
     320    const AtomicString& value = fastGetAttribute(SVGNames::additiveAttr);
    321321    return value == sum || animationMode() == ByAnimation;
    322322}
     
    325325{
    326326    DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum"));
    327     const AtomicString& value = getAttribute(SVGNames::accumulateAttr);
     327    const AtomicString& value = fastGetAttribute(SVGNames::accumulateAttr);
    328328    return value == sum && animationMode() != ToAnimation;
    329329}
     
    531531
    532532    // These validations are appropriate for all animation modes.
    533     if (hasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != m_keyTimes.size())
     533    if (fastHasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != m_keyTimes.size())
    534534        return;
    535535
     
    538538    if (calcMode == CalcModeSpline) {
    539539        unsigned splinesCount = m_keySplines.size() + 1;
    540         if ((hasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != splinesCount)
     540        if ((fastHasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != splinesCount)
    541541            || (animationMode == ValuesAnimation && m_values.size() != splinesCount))
    542542            return;
     
    560560    else if (animationMode == ValuesAnimation) {
    561561        m_animationValid = m_values.size() > 1
    562             && (calcMode == CalcModePaced || !hasAttribute(SVGNames::keyTimesAttr) || hasAttribute(SVGNames::keyPointsAttr) || (m_values.size() == m_keyTimes.size()))
     562            && (calcMode == CalcModePaced || !fastHasAttribute(SVGNames::keyTimesAttr) || fastHasAttribute(SVGNames::keyPointsAttr) || (m_values.size() == m_keyTimes.size()))
    563563            && (calcMode == CalcModeDiscrete || !m_keyTimes.size() || m_keyTimes.last() == 1)
    564564            && (calcMode != CalcModeSpline || ((m_keySplines.size() && (m_keySplines.size() == m_values.size() - 1)) || m_keySplines.size() == m_keyPoints.size() - 1))
    565             && (!hasAttribute(SVGNames::keyPointsAttr) || (m_keyTimes.size() > 1 && m_keyTimes.size() == m_keyPoints.size()));
     565            && (!fastHasAttribute(SVGNames::keyPointsAttr) || (m_keyTimes.size() > 1 && m_keyTimes.size() == m_keyPoints.size()));
    566566        if (calcMode == CalcModePaced && m_animationValid)
    567567            calculateKeyTimesForCalcModePaced();
    568568    } else if (animationMode == PathAnimation)
    569         m_animationValid = calcMode == CalcModePaced || !hasAttribute(SVGNames::keyPointsAttr) || (m_keyTimes.size() > 1 && m_keyTimes.size() == m_keyPoints.size());
     569        m_animationValid = calcMode == CalcModePaced || !fastHasAttribute(SVGNames::keyPointsAttr) || (m_keyTimes.size() > 1 && m_keyTimes.size() == m_keyPoints.size());
    570570}
    571571   
  • trunk/Source/WebCore/svg/SVGElement.cpp

    r85413 r88989  
    111111String SVGElement::xmlbase() const
    112112{
    113     return getAttribute(XMLNames::baseAttr);
     113    return fastGetAttribute(XMLNames::baseAttr);
    114114}
    115115
  • trunk/Source/WebCore/svg/SVGFontElement.cpp

    r88557 r88989  
    130130        if (child->hasTagName(SVGNames::glyphTag)) {
    131131            SVGGlyphElement* glyph = static_cast<SVGGlyphElement*>(child);
    132             String unicode = glyph->getAttribute(SVGNames::unicodeAttr);
     132            String unicode = glyph->fastGetAttribute(SVGNames::unicodeAttr);
    133133            SVGGlyph svgGlyph = glyph->buildGlyphIdentifier();
    134134            unsigned unicodeLength = unicode.length();
  • trunk/Source/WebCore/svg/SVGFontFaceElement.cpp

    r86050 r88989  
    125125unsigned SVGFontFaceElement::unitsPerEm() const
    126126{
    127     const AtomicString& value = getAttribute(units_per_emAttr);
     127    const AtomicString& value = fastGetAttribute(units_per_emAttr);
    128128    if (value.isEmpty())
    129129        return gDefaultUnitsPerEm;
     
    134134int SVGFontFaceElement::xHeight() const
    135135{
    136     return static_cast<int>(ceilf(getAttribute(x_heightAttr).toFloat()));
     136    return static_cast<int>(ceilf(fastGetAttribute(x_heightAttr).toFloat()));
    137137}
    138138
     
    145145    // drawing horizontally oriented text. (Note that the origin applies to all glyphs in the font.)
    146146    // If the attribute is not specified, the effect is as if a value of "0" were specified.
    147     return m_fontElement->getAttribute(horiz_origin_xAttr).toFloat();
     147    return m_fontElement->fastGetAttribute(horiz_origin_xAttr).toFloat();
    148148}
    149149
     
    156156    // drawing horizontally oriented text. (Note that the origin applies to all glyphs in the font.)
    157157    // If the attribute is not specified, the effect is as if a value of "0" were specified.
    158     return m_fontElement->getAttribute(horiz_origin_yAttr).toFloat();
     158    return m_fontElement->fastGetAttribute(horiz_origin_yAttr).toFloat();
    159159}
    160160
     
    167167    // widths are required to be non-negative, even if the glyph is typically rendered right-to-left,
    168168    // as in Hebrew and Arabic scripts.
    169     return m_fontElement->getAttribute(horiz_adv_xAttr).toFloat();
     169    return m_fontElement->fastGetAttribute(horiz_adv_xAttr).toFloat();
    170170}
    171171
     
    178178    // drawing vertically oriented text. If the attribute is not specified, the effect is as if the attribute
    179179    // were set to half of the effective value of attribute horiz-adv-x.
    180     const AtomicString& value = m_fontElement->getAttribute(vert_origin_xAttr);
     180    const AtomicString& value = m_fontElement->fastGetAttribute(vert_origin_xAttr);
    181181    if (value.isEmpty())
    182182        return horizontalAdvanceX() / 2.0f;
     
    193193    // drawing vertically oriented text. If the attribute is not specified, the effect is as if the attribute
    194194    // were set to the position specified by the font's ascent attribute.             
    195     const AtomicString& value = m_fontElement->getAttribute(vert_origin_yAttr);
     195    const AtomicString& value = m_fontElement->fastGetAttribute(vert_origin_yAttr);
    196196    if (value.isEmpty())
    197197        return ascent();
     
    207207    // Spec: The default vertical advance after rendering a glyph in vertical orientation. If the attribute is
    208208    // not specified, the effect is as if a value equivalent of one em were specified (see units-per-em).                   
    209     const AtomicString& value = m_fontElement->getAttribute(vert_adv_yAttr);
     209    const AtomicString& value = m_fontElement->fastGetAttribute(vert_adv_yAttr);
    210210       if (value.isEmpty())
    211211        return 1.0f;
     
    220220    // the effect is as if the attribute were set to the difference between the units-per-em value and the
    221221    // vert-origin-y value for the corresponding font.
    222     const AtomicString& ascentValue = getAttribute(ascentAttr);
     222    const AtomicString& ascentValue = fastGetAttribute(ascentAttr);
    223223    if (!ascentValue.isEmpty())
    224224        return static_cast<int>(ceilf(ascentValue.toFloat()));
    225225
    226226    if (m_fontElement) {
    227         const AtomicString& vertOriginY = m_fontElement->getAttribute(vert_origin_yAttr);
     227        const AtomicString& vertOriginY = m_fontElement->fastGetAttribute(vert_origin_yAttr);
    228228        if (!vertOriginY.isEmpty())
    229229            return static_cast<int>(unitsPerEm()) - static_cast<int>(ceilf(vertOriginY.toFloat()));
     
    239239    // unaccented depth of the font within the font coordinate system. If the attribute is not specified,
    240240    // the effect is as if the attribute were set to the vert-origin-y value for the corresponding font.
    241     const AtomicString& descentValue = getAttribute(descentAttr);
     241    const AtomicString& descentValue = fastGetAttribute(descentAttr);
    242242    if (!descentValue.isEmpty()) {
    243243        // 14 different W3C SVG 1.1 testcases use a negative descent value,
     
    249249
    250250    if (m_fontElement) {
    251         const AtomicString& vertOriginY = m_fontElement->getAttribute(vert_origin_yAttr);
     251        const AtomicString& vertOriginY = m_fontElement->fastGetAttribute(vert_origin_yAttr);
    252252        if (!vertOriginY.isEmpty())
    253253            return static_cast<int>(ceilf(vertOriginY.toFloat()));
  • trunk/Source/WebCore/svg/SVGFontFaceNameElement.cpp

    r86050 r88989  
    4141PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceNameElement::srcValue() const
    4242{
    43     return CSSFontFaceSrcValue::createLocal(getAttribute(SVGNames::nameAttr));
     43    return CSSFontFaceSrcValue::createLocal(fastGetAttribute(SVGNames::nameAttr));
    4444}
    4545
  • trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp

    r87239 r88989  
    5656PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceUriElement::srcValue() const
    5757{
    58     RefPtr<CSSFontFaceSrcValue> src = CSSFontFaceSrcValue::create(getAttribute(XLinkNames::hrefAttr));
    59     AtomicString value(getAttribute(formatAttr));
     58    RefPtr<CSSFontFaceSrcValue> src = CSSFontFaceSrcValue::create(fastGetAttribute(XLinkNames::hrefAttr));
     59    AtomicString value(fastGetAttribute(formatAttr));
    6060    src->setFormat(value.isEmpty() ? "svg" : value); // Default format
    6161    return src.release();
     
    9494        m_cachedFont->removeClient(this);
    9595
    96     String href = getAttribute(XLinkNames::hrefAttr);
     96    String href = fastGetAttribute(XLinkNames::hrefAttr);
    9797    if (!href.isNull()) {       
    9898        CachedResourceLoader* cachedResourceLoader = document()->cachedResourceLoader();
  • trunk/Source/WebCore/svg/SVGGlyphElement.cpp

    r87152 r88989  
    123123static inline float parseSVGGlyphAttribute(const SVGElement* element, const WebCore::QualifiedName& name)
    124124{
    125     AtomicString value(element->getAttribute(name));
     125    AtomicString value(element->fastGetAttribute(name));
    126126    if (value.isEmpty())
    127127        return SVGGlyph::inheritedValue();
     
    147147{
    148148    SVGGlyph identifier;
    149     identifier.pathData = parsePathData(element->getAttribute(SVGNames::dAttr));
     149    identifier.pathData = parsePathData(element->fastGetAttribute(SVGNames::dAttr));
    150150 
    151151    // Spec: The horizontal advance after rendering the glyph in horizontal orientation.
     
    176176{
    177177    SVGGlyph identifier(buildGenericGlyphIdentifier(this));
    178     identifier.glyphName = getAttribute(SVGNames::glyph_nameAttr);
    179     identifier.orientation = parseOrientation(getAttribute(SVGNames::orientationAttr));
    180     identifier.arabicForm = parseArabicForm(getAttribute(SVGNames::arabic_formAttr));
     178    identifier.glyphName = fastGetAttribute(SVGNames::glyph_nameAttr);
     179    identifier.orientation = parseOrientation(fastGetAttribute(SVGNames::orientationAttr));
     180    identifier.arabicForm = parseArabicForm(fastGetAttribute(SVGNames::arabic_formAttr));
    181181
    182     String language = getAttribute(SVGNames::langAttr);
     182    String language = fastGetAttribute(SVGNames::langAttr);
    183183    if (!language.isEmpty())
    184184        identifier.languages = parseDelimitedString(language, ',');
  • trunk/Source/WebCore/svg/SVGHKernElement.cpp

    r87152 r88989  
    6464void SVGHKernElement::buildHorizontalKerningPair(KerningPairVector& kerningPairs)
    6565{
    66     String u1 = getAttribute(SVGNames::u1Attr);
    67     String g1 = getAttribute(SVGNames::g1Attr);
    68     String u2 = getAttribute(SVGNames::u2Attr);
    69     String g2 = getAttribute(SVGNames::g2Attr);
     66    String u1 = fastGetAttribute(SVGNames::u1Attr);
     67    String g1 = fastGetAttribute(SVGNames::g1Attr);
     68    String u2 = fastGetAttribute(SVGNames::u2Attr);
     69    String g2 = fastGetAttribute(SVGNames::g2Attr);
    7070    if ((u1.isEmpty() && g1.isEmpty()) || (u2.isEmpty() && g2.isEmpty()))
    7171        return;
     
    7676        && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.unicodeName1)
    7777        && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.unicodeName2)) {
    78         kerningPair.kerning = getAttribute(SVGNames::kAttr).string().toFloat();
     78        kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat();
    7979        kerningPairs.append(kerningPair);
    8080    }
  • trunk/Source/WebCore/svg/SVGSVGElement.cpp

    r88007 r88989  
    109109{
    110110    DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/ecmascript"));
    111     const AtomicString& n = getAttribute(SVGNames::contentScriptTypeAttr);
     111    const AtomicString& n = fastGetAttribute(SVGNames::contentScriptTypeAttr);
    112112    return n.isNull() ? defaultValue : n;
    113113}
     
    121121{
    122122    DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css"));
    123     const AtomicString& n = getAttribute(SVGNames::contentStyleTypeAttr);
     123    const AtomicString& n = fastGetAttribute(SVGNames::contentStyleTypeAttr);
    124124    return n.isNull() ? defaultValue : n;
    125125}
  • trunk/Source/WebCore/svg/SVGStyleElement.cpp

    r87010 r88989  
    5656{
    5757    DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css"));
    58     const AtomicString& n = getAttribute(SVGNames::typeAttr);
     58    const AtomicString& n = fastGetAttribute(SVGNames::typeAttr);
    5959    return n.isNull() ? defaultValue : n;
    6060}
     
    6868{
    6969    DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("all"));
    70     const AtomicString& n = getAttribute(SVGNames::mediaAttr);
     70    const AtomicString& n = fastGetAttribute(SVGNames::mediaAttr);
    7171    return n.isNull() ? defaultValue : n;
    7272}
     
    7979String SVGStyleElement::title() const
    8080{
    81     return getAttribute(SVGNames::titleAttr);
     81    return fastGetAttribute(SVGNames::titleAttr);
    8282}
    8383
  • trunk/Source/WebCore/svg/SVGVKernElement.cpp

    r87152 r88989  
    6262void SVGVKernElement::buildVerticalKerningPair(KerningPairVector& kerningPairs)
    6363{
    64     String u1 = getAttribute(SVGNames::u1Attr);
    65     String g1 = getAttribute(SVGNames::g1Attr);
    66     String u2 = getAttribute(SVGNames::u2Attr);
    67     String g2 = getAttribute(SVGNames::g2Attr);
     64    String u1 = fastGetAttribute(SVGNames::u1Attr);
     65    String g1 = fastGetAttribute(SVGNames::g1Attr);
     66    String u2 = fastGetAttribute(SVGNames::u2Attr);
     67    String g2 = fastGetAttribute(SVGNames::g2Attr);
    6868    if ((u1.isEmpty() && g1.isEmpty()) || (u2.isEmpty() && g2.isEmpty()))
    6969        return;
     
    7474        && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.unicodeName1)
    7575        && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.unicodeName2)) {
    76         kerningPair.kerning = getAttribute(SVGNames::kAttr).string().toFloat();
     76        kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat();
    7777        kerningPairs.append(kerningPair);
    7878    }
  • trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp

    r88234 r88989  
    176176        ASSERT(!n->isSVGShadowRoot());
    177177#endif
    178     m_attributeName = constructQualifiedName(this, getAttribute(SVGNames::attributeNameAttr));
     178    m_attributeName = constructQualifiedName(this, fastGetAttribute(SVGNames::attributeNameAttr));
    179179    SVGSVGElement* owner = ownerSVGElement();
    180180    if (!owner)
     
    185185
    186186    // "If no attribute is present, the default begin value (an offset-value of 0) must be evaluated."
    187     if (!hasAttribute(SVGNames::beginAttr))
     187    if (!fastHasAttribute(SVGNames::beginAttr))
    188188        m_beginTimes.append(0);
    189189
     
    374374            disconnectConditions();
    375375            m_conditions.clear();
    376             parseBeginOrEnd(getAttribute(SVGNames::endAttr), End);
     376            parseBeginOrEnd(fastGetAttribute(SVGNames::endAttr), End);
    377377        }
    378378        parseBeginOrEnd(attr->value().string(), Begin);
     
    383383            disconnectConditions();
    384384            m_conditions.clear();
    385             parseBeginOrEnd(getAttribute(SVGNames::beginAttr), Begin);
     385            parseBeginOrEnd(fastGetAttribute(SVGNames::beginAttr), Begin);
    386386        }
    387387        parseBeginOrEnd(attr->value().string(), End);
     
    524524    DEFINE_STATIC_LOCAL(const AtomicString, never, ("never"));
    525525    DEFINE_STATIC_LOCAL(const AtomicString, whenNotActive, ("whenNotActive"));
    526     const AtomicString& value = getAttribute(SVGNames::restartAttr);
     526    const AtomicString& value = fastGetAttribute(SVGNames::restartAttr);
    527527    if (value == never)
    528528        return RestartNever;
     
    535535{   
    536536    DEFINE_STATIC_LOCAL(const AtomicString, freeze, ("freeze"));
    537     const AtomicString& value = getAttribute(SVGNames::fillAttr);
     537    const AtomicString& value = fastGetAttribute(SVGNames::fillAttr);
    538538    return value == freeze ? FillFreeze : FillRemove;
    539539}
     
    541541String SVGSMILElement::xlinkHref() const
    542542{   
    543     return getAttribute(XLinkNames::hrefAttr);
     543    return fastGetAttribute(XLinkNames::hrefAttr);
    544544}
    545545   
     
    548548    if (m_cachedDur != invalidCachedTime)
    549549        return m_cachedDur;
    550     const AtomicString& value = getAttribute(SVGNames::durAttr);
     550    const AtomicString& value = fastGetAttribute(SVGNames::durAttr);
    551551    SMILTime clockValue = parseClockValue(value);
    552552    return m_cachedDur = clockValue <= 0 ? SMILTime::unresolved() : clockValue;
     
    557557    if (m_cachedRepeatDur != invalidCachedTime)
    558558        return m_cachedRepeatDur;
    559     const AtomicString& value = getAttribute(SVGNames::repeatDurAttr);
     559    const AtomicString& value = fastGetAttribute(SVGNames::repeatDurAttr);
    560560    SMILTime clockValue = parseClockValue(value);
    561561    m_cachedRepeatDur = clockValue <= 0 ? SMILTime::unresolved() : clockValue;
     
    568568    if (m_cachedRepeatCount != invalidCachedTime)
    569569        return m_cachedRepeatCount;
    570     const AtomicString& value = getAttribute(SVGNames::repeatCountAttr);
     570    const AtomicString& value = fastGetAttribute(SVGNames::repeatCountAttr);
    571571    if (value.isNull())
    572572        return SMILTime::unresolved();
     
    584584    if (m_cachedMax != invalidCachedTime)
    585585        return m_cachedMax;
    586     const AtomicString& value = getAttribute(SVGNames::maxAttr);
     586    const AtomicString& value = fastGetAttribute(SVGNames::maxAttr);
    587587    SMILTime result = parseClockValue(value);
    588588    return m_cachedMax = (result.isUnresolved() || result < 0) ? SMILTime::indefinite() : result;
     
    593593    if (m_cachedMin != invalidCachedTime)
    594594        return m_cachedMin;
    595     const AtomicString& value = getAttribute(SVGNames::minAttr);
     595    const AtomicString& value = fastGetAttribute(SVGNames::minAttr);
    596596    SMILTime result = parseClockValue(value);
    597597    return m_cachedMin = (result.isUnresolved() || result < 0) ? 0 : result;
Note: See TracChangeset for help on using the changeset viewer.