Changeset 88989 in webkit
- Timestamp:
- Jun 15, 2011 6:54:11 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88987 r88989 1 2011-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 1 79 2011-06-15 Abhishek Arya <inferno@chromium.org> 2 80 -
trunk/Source/WebCore/svg/SVGAElement.cpp
r87518 r88989 68 68 { 69 69 // 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); 71 71 if (!title.isEmpty()) 72 72 return title; … … 228 228 // helpful. 229 229 if (target.isEmpty()) 230 target = ( getAttribute(XLinkNames::showAttr) == "new") ? "_blank" : "_self";230 target = (fastGetAttribute(XLinkNames::showAttr) == "new") ? "_blank" : "_self"; 231 231 232 232 handleLinkClick(event, document(), url, target); -
trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp
r86050 r88989 77 77 const AtomicString& SVGAltGlyphElement::glyphRef() const 78 78 { 79 return getAttribute(SVGNames::glyphRefAttr);79 return fastGetAttribute(SVGNames::glyphRefAttr); 80 80 } 81 81 … … 87 87 const AtomicString& SVGAltGlyphElement::format() const 88 88 { 89 return getAttribute(SVGNames::formatAttr);89 return fastGetAttribute(SVGNames::formatAttr); 90 90 } 91 91 … … 104 104 SVGGlyphElement* SVGAltGlyphElement::glyphElement() const 105 105 { 106 Element* elt = treeScope()->getElementById(getTarget( getAttribute(XLinkNames::hrefAttr)));106 Element* elt = treeScope()->getElementById(getTarget(fastGetAttribute(XLinkNames::hrefAttr))); 107 107 if (!elt || !elt->hasTagName(SVGNames::glyphTag)) 108 108 return 0; -
trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp
r87010 r88989 119 119 DEFINE_STATIC_LOCAL(const AtomicString, autoVal, ("auto")); 120 120 DEFINE_STATIC_LOCAL(const AtomicString, autoReverse, ("auto-reverse")); 121 String rotate = getAttribute(SVGNames::rotateAttr);121 String rotate = fastGetAttribute(SVGNames::rotateAttr); 122 122 if (rotate == autoVal) 123 123 return RotateAuto; … … 139 139 } 140 140 } 141 if ( hasAttribute(SVGNames::pathAttr))141 if (fastHasAttribute(SVGNames::pathAttr)) 142 142 return m_path; 143 143 return Path(); -
trunk/Source/WebCore/svg/SVGAnimationElement.cpp
r88663 r88989 261 261 if (!animationPath().isEmpty()) 262 262 return PathAnimation; 263 if ( hasAttribute(SVGNames::valuesAttr))263 if (fastHasAttribute(SVGNames::valuesAttr)) 264 264 return ValuesAnimation; 265 265 if (!toValue().isEmpty()) … … 276 276 DEFINE_STATIC_LOCAL(const AtomicString, paced, ("paced")); 277 277 DEFINE_STATIC_LOCAL(const AtomicString, spline, ("spline")); 278 const AtomicString& value = getAttribute(SVGNames::calcModeAttr);278 const AtomicString& value = fastGetAttribute(SVGNames::calcModeAttr); 279 279 if (value == discrete) 280 280 return CalcModeDiscrete; … … 292 292 DEFINE_STATIC_LOCAL(const AtomicString, css, ("CSS")); 293 293 DEFINE_STATIC_LOCAL(const AtomicString, xml, ("XML")); 294 const AtomicString& value = getAttribute(SVGNames::attributeTypeAttr);294 const AtomicString& value = fastGetAttribute(SVGNames::attributeTypeAttr); 295 295 if (value == css) 296 296 return AttributeTypeCSS; … … 302 302 String SVGAnimationElement::toValue() const 303 303 { 304 return getAttribute(SVGNames::toAttr);304 return fastGetAttribute(SVGNames::toAttr); 305 305 } 306 306 307 307 String SVGAnimationElement::byValue() const 308 308 { 309 return getAttribute(SVGNames::byAttr);309 return fastGetAttribute(SVGNames::byAttr); 310 310 } 311 311 312 312 String SVGAnimationElement::fromValue() const 313 313 { 314 return getAttribute(SVGNames::fromAttr);314 return fastGetAttribute(SVGNames::fromAttr); 315 315 } 316 316 … … 318 318 { 319 319 DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum")); 320 const AtomicString& value = getAttribute(SVGNames::additiveAttr);320 const AtomicString& value = fastGetAttribute(SVGNames::additiveAttr); 321 321 return value == sum || animationMode() == ByAnimation; 322 322 } … … 325 325 { 326 326 DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum")); 327 const AtomicString& value = getAttribute(SVGNames::accumulateAttr);327 const AtomicString& value = fastGetAttribute(SVGNames::accumulateAttr); 328 328 return value == sum && animationMode() != ToAnimation; 329 329 } … … 531 531 532 532 // 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()) 534 534 return; 535 535 … … 538 538 if (calcMode == CalcModeSpline) { 539 539 unsigned splinesCount = m_keySplines.size() + 1; 540 if (( hasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != splinesCount)540 if ((fastHasAttribute(SVGNames::keyPointsAttr) && m_keyPoints.size() != splinesCount) 541 541 || (animationMode == ValuesAnimation && m_values.size() != splinesCount)) 542 542 return; … … 560 560 else if (animationMode == ValuesAnimation) { 561 561 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())) 563 563 && (calcMode == CalcModeDiscrete || !m_keyTimes.size() || m_keyTimes.last() == 1) 564 564 && (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())); 566 566 if (calcMode == CalcModePaced && m_animationValid) 567 567 calculateKeyTimesForCalcModePaced(); 568 568 } 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()); 570 570 } 571 571 -
trunk/Source/WebCore/svg/SVGElement.cpp
r85413 r88989 111 111 String SVGElement::xmlbase() const 112 112 { 113 return getAttribute(XMLNames::baseAttr);113 return fastGetAttribute(XMLNames::baseAttr); 114 114 } 115 115 -
trunk/Source/WebCore/svg/SVGFontElement.cpp
r88557 r88989 130 130 if (child->hasTagName(SVGNames::glyphTag)) { 131 131 SVGGlyphElement* glyph = static_cast<SVGGlyphElement*>(child); 132 String unicode = glyph-> getAttribute(SVGNames::unicodeAttr);132 String unicode = glyph->fastGetAttribute(SVGNames::unicodeAttr); 133 133 SVGGlyph svgGlyph = glyph->buildGlyphIdentifier(); 134 134 unsigned unicodeLength = unicode.length(); -
trunk/Source/WebCore/svg/SVGFontFaceElement.cpp
r86050 r88989 125 125 unsigned SVGFontFaceElement::unitsPerEm() const 126 126 { 127 const AtomicString& value = getAttribute(units_per_emAttr);127 const AtomicString& value = fastGetAttribute(units_per_emAttr); 128 128 if (value.isEmpty()) 129 129 return gDefaultUnitsPerEm; … … 134 134 int SVGFontFaceElement::xHeight() const 135 135 { 136 return static_cast<int>(ceilf( getAttribute(x_heightAttr).toFloat()));136 return static_cast<int>(ceilf(fastGetAttribute(x_heightAttr).toFloat())); 137 137 } 138 138 … … 145 145 // drawing horizontally oriented text. (Note that the origin applies to all glyphs in the font.) 146 146 // 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(); 148 148 } 149 149 … … 156 156 // drawing horizontally oriented text. (Note that the origin applies to all glyphs in the font.) 157 157 // 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(); 159 159 } 160 160 … … 167 167 // widths are required to be non-negative, even if the glyph is typically rendered right-to-left, 168 168 // as in Hebrew and Arabic scripts. 169 return m_fontElement-> getAttribute(horiz_adv_xAttr).toFloat();169 return m_fontElement->fastGetAttribute(horiz_adv_xAttr).toFloat(); 170 170 } 171 171 … … 178 178 // drawing vertically oriented text. If the attribute is not specified, the effect is as if the attribute 179 179 // 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); 181 181 if (value.isEmpty()) 182 182 return horizontalAdvanceX() / 2.0f; … … 193 193 // drawing vertically oriented text. If the attribute is not specified, the effect is as if the attribute 194 194 // 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); 196 196 if (value.isEmpty()) 197 197 return ascent(); … … 207 207 // Spec: The default vertical advance after rendering a glyph in vertical orientation. If the attribute is 208 208 // 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); 210 210 if (value.isEmpty()) 211 211 return 1.0f; … … 220 220 // the effect is as if the attribute were set to the difference between the units-per-em value and the 221 221 // vert-origin-y value for the corresponding font. 222 const AtomicString& ascentValue = getAttribute(ascentAttr);222 const AtomicString& ascentValue = fastGetAttribute(ascentAttr); 223 223 if (!ascentValue.isEmpty()) 224 224 return static_cast<int>(ceilf(ascentValue.toFloat())); 225 225 226 226 if (m_fontElement) { 227 const AtomicString& vertOriginY = m_fontElement-> getAttribute(vert_origin_yAttr);227 const AtomicString& vertOriginY = m_fontElement->fastGetAttribute(vert_origin_yAttr); 228 228 if (!vertOriginY.isEmpty()) 229 229 return static_cast<int>(unitsPerEm()) - static_cast<int>(ceilf(vertOriginY.toFloat())); … … 239 239 // unaccented depth of the font within the font coordinate system. If the attribute is not specified, 240 240 // 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); 242 242 if (!descentValue.isEmpty()) { 243 243 // 14 different W3C SVG 1.1 testcases use a negative descent value, … … 249 249 250 250 if (m_fontElement) { 251 const AtomicString& vertOriginY = m_fontElement-> getAttribute(vert_origin_yAttr);251 const AtomicString& vertOriginY = m_fontElement->fastGetAttribute(vert_origin_yAttr); 252 252 if (!vertOriginY.isEmpty()) 253 253 return static_cast<int>(ceilf(vertOriginY.toFloat())); -
trunk/Source/WebCore/svg/SVGFontFaceNameElement.cpp
r86050 r88989 41 41 PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceNameElement::srcValue() const 42 42 { 43 return CSSFontFaceSrcValue::createLocal( getAttribute(SVGNames::nameAttr));43 return CSSFontFaceSrcValue::createLocal(fastGetAttribute(SVGNames::nameAttr)); 44 44 } 45 45 -
trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp
r87239 r88989 56 56 PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceUriElement::srcValue() const 57 57 { 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)); 60 60 src->setFormat(value.isEmpty() ? "svg" : value); // Default format 61 61 return src.release(); … … 94 94 m_cachedFont->removeClient(this); 95 95 96 String href = getAttribute(XLinkNames::hrefAttr);96 String href = fastGetAttribute(XLinkNames::hrefAttr); 97 97 if (!href.isNull()) { 98 98 CachedResourceLoader* cachedResourceLoader = document()->cachedResourceLoader(); -
trunk/Source/WebCore/svg/SVGGlyphElement.cpp
r87152 r88989 123 123 static inline float parseSVGGlyphAttribute(const SVGElement* element, const WebCore::QualifiedName& name) 124 124 { 125 AtomicString value(element-> getAttribute(name));125 AtomicString value(element->fastGetAttribute(name)); 126 126 if (value.isEmpty()) 127 127 return SVGGlyph::inheritedValue(); … … 147 147 { 148 148 SVGGlyph identifier; 149 identifier.pathData = parsePathData(element-> getAttribute(SVGNames::dAttr));149 identifier.pathData = parsePathData(element->fastGetAttribute(SVGNames::dAttr)); 150 150 151 151 // Spec: The horizontal advance after rendering the glyph in horizontal orientation. … … 176 176 { 177 177 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)); 181 181 182 String language = getAttribute(SVGNames::langAttr);182 String language = fastGetAttribute(SVGNames::langAttr); 183 183 if (!language.isEmpty()) 184 184 identifier.languages = parseDelimitedString(language, ','); -
trunk/Source/WebCore/svg/SVGHKernElement.cpp
r87152 r88989 64 64 void SVGHKernElement::buildHorizontalKerningPair(KerningPairVector& kerningPairs) 65 65 { 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); 70 70 if ((u1.isEmpty() && g1.isEmpty()) || (u2.isEmpty() && g2.isEmpty())) 71 71 return; … … 76 76 && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.unicodeName1) 77 77 && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.unicodeName2)) { 78 kerningPair.kerning = getAttribute(SVGNames::kAttr).string().toFloat();78 kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat(); 79 79 kerningPairs.append(kerningPair); 80 80 } -
trunk/Source/WebCore/svg/SVGSVGElement.cpp
r88007 r88989 109 109 { 110 110 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/ecmascript")); 111 const AtomicString& n = getAttribute(SVGNames::contentScriptTypeAttr);111 const AtomicString& n = fastGetAttribute(SVGNames::contentScriptTypeAttr); 112 112 return n.isNull() ? defaultValue : n; 113 113 } … … 121 121 { 122 122 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css")); 123 const AtomicString& n = getAttribute(SVGNames::contentStyleTypeAttr);123 const AtomicString& n = fastGetAttribute(SVGNames::contentStyleTypeAttr); 124 124 return n.isNull() ? defaultValue : n; 125 125 } -
trunk/Source/WebCore/svg/SVGStyleElement.cpp
r87010 r88989 56 56 { 57 57 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css")); 58 const AtomicString& n = getAttribute(SVGNames::typeAttr);58 const AtomicString& n = fastGetAttribute(SVGNames::typeAttr); 59 59 return n.isNull() ? defaultValue : n; 60 60 } … … 68 68 { 69 69 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("all")); 70 const AtomicString& n = getAttribute(SVGNames::mediaAttr);70 const AtomicString& n = fastGetAttribute(SVGNames::mediaAttr); 71 71 return n.isNull() ? defaultValue : n; 72 72 } … … 79 79 String SVGStyleElement::title() const 80 80 { 81 return getAttribute(SVGNames::titleAttr);81 return fastGetAttribute(SVGNames::titleAttr); 82 82 } 83 83 -
trunk/Source/WebCore/svg/SVGVKernElement.cpp
r87152 r88989 62 62 void SVGVKernElement::buildVerticalKerningPair(KerningPairVector& kerningPairs) 63 63 { 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); 68 68 if ((u1.isEmpty() && g1.isEmpty()) || (u2.isEmpty() && g2.isEmpty())) 69 69 return; … … 74 74 && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.unicodeName1) 75 75 && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.unicodeName2)) { 76 kerningPair.kerning = getAttribute(SVGNames::kAttr).string().toFloat();76 kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat(); 77 77 kerningPairs.append(kerningPair); 78 78 } -
trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp
r88234 r88989 176 176 ASSERT(!n->isSVGShadowRoot()); 177 177 #endif 178 m_attributeName = constructQualifiedName(this, getAttribute(SVGNames::attributeNameAttr));178 m_attributeName = constructQualifiedName(this, fastGetAttribute(SVGNames::attributeNameAttr)); 179 179 SVGSVGElement* owner = ownerSVGElement(); 180 180 if (!owner) … … 185 185 186 186 // "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)) 188 188 m_beginTimes.append(0); 189 189 … … 374 374 disconnectConditions(); 375 375 m_conditions.clear(); 376 parseBeginOrEnd( getAttribute(SVGNames::endAttr), End);376 parseBeginOrEnd(fastGetAttribute(SVGNames::endAttr), End); 377 377 } 378 378 parseBeginOrEnd(attr->value().string(), Begin); … … 383 383 disconnectConditions(); 384 384 m_conditions.clear(); 385 parseBeginOrEnd( getAttribute(SVGNames::beginAttr), Begin);385 parseBeginOrEnd(fastGetAttribute(SVGNames::beginAttr), Begin); 386 386 } 387 387 parseBeginOrEnd(attr->value().string(), End); … … 524 524 DEFINE_STATIC_LOCAL(const AtomicString, never, ("never")); 525 525 DEFINE_STATIC_LOCAL(const AtomicString, whenNotActive, ("whenNotActive")); 526 const AtomicString& value = getAttribute(SVGNames::restartAttr);526 const AtomicString& value = fastGetAttribute(SVGNames::restartAttr); 527 527 if (value == never) 528 528 return RestartNever; … … 535 535 { 536 536 DEFINE_STATIC_LOCAL(const AtomicString, freeze, ("freeze")); 537 const AtomicString& value = getAttribute(SVGNames::fillAttr);537 const AtomicString& value = fastGetAttribute(SVGNames::fillAttr); 538 538 return value == freeze ? FillFreeze : FillRemove; 539 539 } … … 541 541 String SVGSMILElement::xlinkHref() const 542 542 { 543 return getAttribute(XLinkNames::hrefAttr);543 return fastGetAttribute(XLinkNames::hrefAttr); 544 544 } 545 545 … … 548 548 if (m_cachedDur != invalidCachedTime) 549 549 return m_cachedDur; 550 const AtomicString& value = getAttribute(SVGNames::durAttr);550 const AtomicString& value = fastGetAttribute(SVGNames::durAttr); 551 551 SMILTime clockValue = parseClockValue(value); 552 552 return m_cachedDur = clockValue <= 0 ? SMILTime::unresolved() : clockValue; … … 557 557 if (m_cachedRepeatDur != invalidCachedTime) 558 558 return m_cachedRepeatDur; 559 const AtomicString& value = getAttribute(SVGNames::repeatDurAttr);559 const AtomicString& value = fastGetAttribute(SVGNames::repeatDurAttr); 560 560 SMILTime clockValue = parseClockValue(value); 561 561 m_cachedRepeatDur = clockValue <= 0 ? SMILTime::unresolved() : clockValue; … … 568 568 if (m_cachedRepeatCount != invalidCachedTime) 569 569 return m_cachedRepeatCount; 570 const AtomicString& value = getAttribute(SVGNames::repeatCountAttr);570 const AtomicString& value = fastGetAttribute(SVGNames::repeatCountAttr); 571 571 if (value.isNull()) 572 572 return SMILTime::unresolved(); … … 584 584 if (m_cachedMax != invalidCachedTime) 585 585 return m_cachedMax; 586 const AtomicString& value = getAttribute(SVGNames::maxAttr);586 const AtomicString& value = fastGetAttribute(SVGNames::maxAttr); 587 587 SMILTime result = parseClockValue(value); 588 588 return m_cachedMax = (result.isUnresolved() || result < 0) ? SMILTime::indefinite() : result; … … 593 593 if (m_cachedMin != invalidCachedTime) 594 594 return m_cachedMin; 595 const AtomicString& value = getAttribute(SVGNames::minAttr);595 const AtomicString& value = fastGetAttribute(SVGNames::minAttr); 596 596 SMILTime result = parseClockValue(value); 597 597 return m_cachedMin = (result.isUnresolved() || result < 0) ? 0 : result;
Note: See TracChangeset
for help on using the changeset viewer.