| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 void SVGElement::childrenChanged(const ChildrenChange& change) | 281 void SVGElement::childrenChanged(const ChildrenChange& change) |
| 282 { | 282 { |
| 283 Element::childrenChanged(change); | 283 Element::childrenChanged(change); |
| 284 | 284 |
| 285 // Invalidate all instances associated with us. | 285 // Invalidate all instances associated with us. |
| 286 if (!change.byParser) | 286 if (!change.byParser) |
| 287 invalidateInstances(); | 287 invalidateInstances(); |
| 288 } | 288 } |
| 289 | 289 |
| 290 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName
ToIdMap, const QualifiedName& attrName) | |
| 291 { | |
| 292 CSSPropertyID propertyId = cssPropertyID(attrName.localName()); | |
| 293 ASSERT(propertyId > 0); | |
| 294 propertyNameToIdMap->set(attrName.localName().impl(), propertyId); | |
| 295 } | |
| 296 | |
| 297 CSSPropertyID SVGElement::cssPropertyIdForSVGAttributeName(const QualifiedName&
attrName) | 290 CSSPropertyID SVGElement::cssPropertyIdForSVGAttributeName(const QualifiedName&
attrName) |
| 298 { | 291 { |
| 299 if (!attrName.namespaceURI().isNull()) | 292 if (!attrName.namespaceURI().isNull()) |
| 300 return CSSPropertyInvalid; | 293 return CSSPropertyInvalid; |
| 301 | 294 |
| 302 static HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap = 0; | 295 static HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap = 0; |
| 303 if (!propertyNameToIdMap) { | 296 if (!propertyNameToIdMap) { |
| 304 propertyNameToIdMap = new HashMap<StringImpl*, CSSPropertyID>; | 297 propertyNameToIdMap = new HashMap<StringImpl*, CSSPropertyID>; |
| 305 // This is a list of all base CSS and SVG CSS properties which are expos
ed as SVG XML attributes | 298 // This is a list of all base CSS and SVG CSS properties which are expos
ed as SVG XML attributes |
| 306 mapAttributeToCSSProperty(propertyNameToIdMap, alignment_baselineAttr); | 299 const QualifiedName* const attrNames[] = { |
| 307 mapAttributeToCSSProperty(propertyNameToIdMap, baseline_shiftAttr); | 300 &alignment_baselineAttr, |
| 308 mapAttributeToCSSProperty(propertyNameToIdMap, buffered_renderingAttr); | 301 &baseline_shiftAttr, |
| 309 mapAttributeToCSSProperty(propertyNameToIdMap, clipAttr); | 302 &buffered_renderingAttr, |
| 310 mapAttributeToCSSProperty(propertyNameToIdMap, clip_pathAttr); | 303 &clipAttr, |
| 311 mapAttributeToCSSProperty(propertyNameToIdMap, clip_ruleAttr); | 304 &clip_pathAttr, |
| 312 mapAttributeToCSSProperty(propertyNameToIdMap, SVGNames::colorAttr); | 305 &clip_ruleAttr, |
| 313 mapAttributeToCSSProperty(propertyNameToIdMap, color_interpolationAttr); | 306 &SVGNames::colorAttr, |
| 314 mapAttributeToCSSProperty(propertyNameToIdMap, color_interpolation_filte
rsAttr); | 307 &color_interpolationAttr, |
| 315 mapAttributeToCSSProperty(propertyNameToIdMap, color_renderingAttr); | 308 &color_interpolation_filtersAttr, |
| 316 mapAttributeToCSSProperty(propertyNameToIdMap, cursorAttr); | 309 &color_renderingAttr, |
| 317 mapAttributeToCSSProperty(propertyNameToIdMap, SVGNames::directionAttr); | 310 &cursorAttr, |
| 318 mapAttributeToCSSProperty(propertyNameToIdMap, displayAttr); | 311 &SVGNames::directionAttr, |
| 319 mapAttributeToCSSProperty(propertyNameToIdMap, dominant_baselineAttr); | 312 &displayAttr, |
| 320 mapAttributeToCSSProperty(propertyNameToIdMap, enable_backgroundAttr); | 313 &dominant_baselineAttr, |
| 321 mapAttributeToCSSProperty(propertyNameToIdMap, fillAttr); | 314 &enable_backgroundAttr, |
| 322 mapAttributeToCSSProperty(propertyNameToIdMap, fill_opacityAttr); | 315 &fillAttr, |
| 323 mapAttributeToCSSProperty(propertyNameToIdMap, fill_ruleAttr); | 316 &fill_opacityAttr, |
| 324 mapAttributeToCSSProperty(propertyNameToIdMap, filterAttr); | 317 &fill_ruleAttr, |
| 325 mapAttributeToCSSProperty(propertyNameToIdMap, flood_colorAttr); | 318 &filterAttr, |
| 326 mapAttributeToCSSProperty(propertyNameToIdMap, flood_opacityAttr); | 319 &flood_colorAttr, |
| 327 mapAttributeToCSSProperty(propertyNameToIdMap, font_familyAttr); | 320 &flood_opacityAttr, |
| 328 mapAttributeToCSSProperty(propertyNameToIdMap, font_sizeAttr); | 321 &font_familyAttr, |
| 329 mapAttributeToCSSProperty(propertyNameToIdMap, font_stretchAttr); | 322 &font_sizeAttr, |
| 330 mapAttributeToCSSProperty(propertyNameToIdMap, font_styleAttr); | 323 &font_stretchAttr, |
| 331 mapAttributeToCSSProperty(propertyNameToIdMap, font_variantAttr); | 324 &font_styleAttr, |
| 332 mapAttributeToCSSProperty(propertyNameToIdMap, font_weightAttr); | 325 &font_variantAttr, |
| 333 mapAttributeToCSSProperty(propertyNameToIdMap, glyph_orientation_horizon
talAttr); | 326 &font_weightAttr, |
| 334 mapAttributeToCSSProperty(propertyNameToIdMap, glyph_orientation_vertica
lAttr); | 327 &glyph_orientation_horizontalAttr, |
| 335 mapAttributeToCSSProperty(propertyNameToIdMap, image_renderingAttr); | 328 &glyph_orientation_verticalAttr, |
| 336 mapAttributeToCSSProperty(propertyNameToIdMap, letter_spacingAttr); | 329 &image_renderingAttr, |
| 337 mapAttributeToCSSProperty(propertyNameToIdMap, lighting_colorAttr); | 330 &letter_spacingAttr, |
| 338 mapAttributeToCSSProperty(propertyNameToIdMap, marker_endAttr); | 331 &lighting_colorAttr, |
| 339 mapAttributeToCSSProperty(propertyNameToIdMap, marker_midAttr); | 332 &marker_endAttr, |
| 340 mapAttributeToCSSProperty(propertyNameToIdMap, marker_startAttr); | 333 &marker_midAttr, |
| 341 mapAttributeToCSSProperty(propertyNameToIdMap, maskAttr); | 334 &marker_startAttr, |
| 342 mapAttributeToCSSProperty(propertyNameToIdMap, mask_typeAttr); | 335 &maskAttr, |
| 343 mapAttributeToCSSProperty(propertyNameToIdMap, opacityAttr); | 336 &mask_typeAttr, |
| 344 mapAttributeToCSSProperty(propertyNameToIdMap, overflowAttr); | 337 &opacityAttr, |
| 345 mapAttributeToCSSProperty(propertyNameToIdMap, paint_orderAttr); | 338 &overflowAttr, |
| 346 mapAttributeToCSSProperty(propertyNameToIdMap, pointer_eventsAttr); | 339 &paint_orderAttr, |
| 347 mapAttributeToCSSProperty(propertyNameToIdMap, shape_renderingAttr); | 340 &pointer_eventsAttr, |
| 348 mapAttributeToCSSProperty(propertyNameToIdMap, stop_colorAttr); | 341 &shape_renderingAttr, |
| 349 mapAttributeToCSSProperty(propertyNameToIdMap, stop_opacityAttr); | 342 &stop_colorAttr, |
| 350 mapAttributeToCSSProperty(propertyNameToIdMap, strokeAttr); | 343 &stop_opacityAttr, |
| 351 mapAttributeToCSSProperty(propertyNameToIdMap, stroke_dasharrayAttr); | 344 &strokeAttr, |
| 352 mapAttributeToCSSProperty(propertyNameToIdMap, stroke_dashoffsetAttr); | 345 &stroke_dasharrayAttr, |
| 353 mapAttributeToCSSProperty(propertyNameToIdMap, stroke_linecapAttr); | 346 &stroke_dashoffsetAttr, |
| 354 mapAttributeToCSSProperty(propertyNameToIdMap, stroke_linejoinAttr); | 347 &stroke_linecapAttr, |
| 355 mapAttributeToCSSProperty(propertyNameToIdMap, stroke_miterlimitAttr); | 348 &stroke_linejoinAttr, |
| 356 mapAttributeToCSSProperty(propertyNameToIdMap, stroke_opacityAttr); | 349 &stroke_miterlimitAttr, |
| 357 mapAttributeToCSSProperty(propertyNameToIdMap, stroke_widthAttr); | 350 &stroke_opacityAttr, |
| 358 mapAttributeToCSSProperty(propertyNameToIdMap, text_anchorAttr); | 351 &stroke_widthAttr, |
| 359 mapAttributeToCSSProperty(propertyNameToIdMap, text_decorationAttr); | 352 &text_anchorAttr, |
| 360 mapAttributeToCSSProperty(propertyNameToIdMap, text_renderingAttr); | 353 &text_decorationAttr, |
| 361 mapAttributeToCSSProperty(propertyNameToIdMap, transform_originAttr); | 354 &text_renderingAttr, |
| 362 mapAttributeToCSSProperty(propertyNameToIdMap, unicode_bidiAttr); | 355 &transform_originAttr, |
| 363 mapAttributeToCSSProperty(propertyNameToIdMap, vector_effectAttr); | 356 &unicode_bidiAttr, |
| 364 mapAttributeToCSSProperty(propertyNameToIdMap, visibilityAttr); | 357 &vector_effectAttr, |
| 365 mapAttributeToCSSProperty(propertyNameToIdMap, word_spacingAttr); | 358 &visibilityAttr, |
| 366 mapAttributeToCSSProperty(propertyNameToIdMap, writing_modeAttr); | 359 &word_spacingAttr, |
| 360 &writing_modeAttr, |
| 361 }; |
| 362 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attrNames); i++) { |
| 363 CSSPropertyID propertyId = cssPropertyID(attrNames[i]->localName()); |
| 364 ASSERT(propertyId > 0); |
| 365 propertyNameToIdMap->set(attrNames[i]->localName().impl(), propertyI
d); |
| 366 } |
| 367 } | 367 } |
| 368 | 368 |
| 369 return propertyNameToIdMap->get(attrName.localName().impl()); | 369 return propertyNameToIdMap->get(attrName.localName().impl()); |
| 370 } | 370 } |
| 371 | 371 |
| 372 void SVGElement::updateRelativeLengthsInformation(bool clientHasRelativeLengths,
SVGElement* clientElement) | 372 void SVGElement::updateRelativeLengthsInformation(bool clientHasRelativeLengths,
SVGElement* clientElement) |
| 373 { | 373 { |
| 374 ASSERT(clientElement); | 374 ASSERT(clientElement); |
| 375 | 375 |
| 376 // If we're not yet in a document, this function will be called again from i
nsertedInto(). Do nothing now. | 376 // If we're not yet in a document, this function will be called again from i
nsertedInto(). Do nothing now. |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 SVGElement::parseAttribute(name, value); | 614 SVGElement::parseAttribute(name, value); |
| 615 } | 615 } |
| 616 | 616 |
| 617 typedef HashMap<QualifiedName, AnimatedPropertyType> AttributeToPropertyTypeMap; | 617 typedef HashMap<QualifiedName, AnimatedPropertyType> AttributeToPropertyTypeMap; |
| 618 AnimatedPropertyType SVGElement::animatedPropertyTypeForCSSAttribute(const Quali
fiedName& attributeName) | 618 AnimatedPropertyType SVGElement::animatedPropertyTypeForCSSAttribute(const Quali
fiedName& attributeName) |
| 619 { | 619 { |
| 620 DEFINE_STATIC_LOCAL(AttributeToPropertyTypeMap, cssPropertyMap, ()); | 620 DEFINE_STATIC_LOCAL(AttributeToPropertyTypeMap, cssPropertyMap, ()); |
| 621 | 621 |
| 622 if (cssPropertyMap.isEmpty()) { | 622 if (cssPropertyMap.isEmpty()) { |
| 623 // Fill the map for the first use. | 623 // Fill the map for the first use. |
| 624 cssPropertyMap.set(alignment_baselineAttr, AnimatedString); | 624 struct AttrToTypeEntry { |
| 625 cssPropertyMap.set(baseline_shiftAttr, AnimatedString); | 625 const QualifiedName& attr; |
| 626 cssPropertyMap.set(buffered_renderingAttr, AnimatedString); | 626 const AnimatedPropertyType propType; |
| 627 cssPropertyMap.set(clipAttr, AnimatedRect); | 627 }; |
| 628 cssPropertyMap.set(clip_pathAttr, AnimatedString); | 628 const AttrToTypeEntry attrToTypes[] = { |
| 629 cssPropertyMap.set(clip_ruleAttr, AnimatedString); | 629 { alignment_baselineAttr, AnimatedString }, |
| 630 cssPropertyMap.set(SVGNames::colorAttr, AnimatedColor); | 630 { baseline_shiftAttr, AnimatedString }, |
| 631 cssPropertyMap.set(color_interpolationAttr, AnimatedString); | 631 { buffered_renderingAttr, AnimatedString }, |
| 632 cssPropertyMap.set(color_interpolation_filtersAttr, AnimatedString); | 632 { clipAttr, AnimatedRect }, |
| 633 cssPropertyMap.set(color_renderingAttr, AnimatedString); | 633 { clip_pathAttr, AnimatedString }, |
| 634 cssPropertyMap.set(cursorAttr, AnimatedString); | 634 { clip_ruleAttr, AnimatedString }, |
| 635 cssPropertyMap.set(displayAttr, AnimatedString); | 635 { SVGNames::colorAttr, AnimatedColor }, |
| 636 cssPropertyMap.set(dominant_baselineAttr, AnimatedString); | 636 { color_interpolationAttr, AnimatedString }, |
| 637 cssPropertyMap.set(fillAttr, AnimatedColor); | 637 { color_interpolation_filtersAttr, AnimatedString }, |
| 638 cssPropertyMap.set(fill_opacityAttr, AnimatedNumber); | 638 { color_renderingAttr, AnimatedString }, |
| 639 cssPropertyMap.set(fill_ruleAttr, AnimatedString); | 639 { cursorAttr, AnimatedString }, |
| 640 cssPropertyMap.set(filterAttr, AnimatedString); | 640 { displayAttr, AnimatedString }, |
| 641 cssPropertyMap.set(flood_colorAttr, AnimatedColor); | 641 { dominant_baselineAttr, AnimatedString }, |
| 642 cssPropertyMap.set(flood_opacityAttr, AnimatedNumber); | 642 { fillAttr, AnimatedColor }, |
| 643 cssPropertyMap.set(font_familyAttr, AnimatedString); | 643 { fill_opacityAttr, AnimatedNumber }, |
| 644 cssPropertyMap.set(font_sizeAttr, AnimatedLength); | 644 { fill_ruleAttr, AnimatedString }, |
| 645 cssPropertyMap.set(font_stretchAttr, AnimatedString); | 645 { filterAttr, AnimatedString }, |
| 646 cssPropertyMap.set(font_styleAttr, AnimatedString); | 646 { flood_colorAttr, AnimatedColor }, |
| 647 cssPropertyMap.set(font_variantAttr, AnimatedString); | 647 { flood_opacityAttr, AnimatedNumber }, |
| 648 cssPropertyMap.set(font_weightAttr, AnimatedString); | 648 { font_familyAttr, AnimatedString }, |
| 649 cssPropertyMap.set(image_renderingAttr, AnimatedString); | 649 { font_sizeAttr, AnimatedLength }, |
| 650 cssPropertyMap.set(letter_spacingAttr, AnimatedLength); | 650 { font_stretchAttr, AnimatedString }, |
| 651 cssPropertyMap.set(lighting_colorAttr, AnimatedColor); | 651 { font_styleAttr, AnimatedString }, |
| 652 cssPropertyMap.set(marker_endAttr, AnimatedString); | 652 { font_variantAttr, AnimatedString }, |
| 653 cssPropertyMap.set(marker_midAttr, AnimatedString); | 653 { font_weightAttr, AnimatedString }, |
| 654 cssPropertyMap.set(marker_startAttr, AnimatedString); | 654 { image_renderingAttr, AnimatedString }, |
| 655 cssPropertyMap.set(maskAttr, AnimatedString); | 655 { letter_spacingAttr, AnimatedLength }, |
| 656 cssPropertyMap.set(mask_typeAttr, AnimatedString); | 656 { lighting_colorAttr, AnimatedColor }, |
| 657 cssPropertyMap.set(opacityAttr, AnimatedNumber); | 657 { marker_endAttr, AnimatedString }, |
| 658 cssPropertyMap.set(overflowAttr, AnimatedString); | 658 { marker_midAttr, AnimatedString }, |
| 659 cssPropertyMap.set(paint_orderAttr, AnimatedString); | 659 { marker_startAttr, AnimatedString }, |
| 660 cssPropertyMap.set(pointer_eventsAttr, AnimatedString); | 660 { maskAttr, AnimatedString }, |
| 661 cssPropertyMap.set(shape_renderingAttr, AnimatedString); | 661 { mask_typeAttr, AnimatedString }, |
| 662 cssPropertyMap.set(stop_colorAttr, AnimatedColor); | 662 { opacityAttr, AnimatedNumber }, |
| 663 cssPropertyMap.set(stop_opacityAttr, AnimatedNumber); | 663 { overflowAttr, AnimatedString }, |
| 664 cssPropertyMap.set(strokeAttr, AnimatedColor); | 664 { paint_orderAttr, AnimatedString }, |
| 665 cssPropertyMap.set(stroke_dasharrayAttr, AnimatedLengthList); | 665 { pointer_eventsAttr, AnimatedString }, |
| 666 cssPropertyMap.set(stroke_dashoffsetAttr, AnimatedLength); | 666 { shape_renderingAttr, AnimatedString }, |
| 667 cssPropertyMap.set(stroke_linecapAttr, AnimatedString); | 667 { stop_colorAttr, AnimatedColor }, |
| 668 cssPropertyMap.set(stroke_linejoinAttr, AnimatedString); | 668 { stop_opacityAttr, AnimatedNumber }, |
| 669 cssPropertyMap.set(stroke_miterlimitAttr, AnimatedNumber); | 669 { strokeAttr, AnimatedColor }, |
| 670 cssPropertyMap.set(stroke_opacityAttr, AnimatedNumber); | 670 { stroke_dasharrayAttr, AnimatedLengthList }, |
| 671 cssPropertyMap.set(stroke_widthAttr, AnimatedLength); | 671 { stroke_dashoffsetAttr, AnimatedLength }, |
| 672 cssPropertyMap.set(text_anchorAttr, AnimatedString); | 672 { stroke_linecapAttr, AnimatedString }, |
| 673 cssPropertyMap.set(text_decorationAttr, AnimatedString); | 673 { stroke_linejoinAttr, AnimatedString }, |
| 674 cssPropertyMap.set(text_renderingAttr, AnimatedString); | 674 { stroke_miterlimitAttr, AnimatedNumber }, |
| 675 cssPropertyMap.set(vector_effectAttr, AnimatedString); | 675 { stroke_opacityAttr, AnimatedNumber }, |
| 676 cssPropertyMap.set(visibilityAttr, AnimatedString); | 676 { stroke_widthAttr, AnimatedLength }, |
| 677 cssPropertyMap.set(word_spacingAttr, AnimatedLength); | 677 { text_anchorAttr, AnimatedString }, |
| 678 { text_decorationAttr, AnimatedString }, |
| 679 { text_renderingAttr, AnimatedString }, |
| 680 { vector_effectAttr, AnimatedString }, |
| 681 { visibilityAttr, AnimatedString }, |
| 682 { word_spacingAttr, AnimatedLength }, |
| 683 }; |
| 684 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attrToTypes); i++) |
| 685 cssPropertyMap.set(attrToTypes[i].attr, attrToTypes[i].propType); |
| 678 } | 686 } |
| 679 | 687 |
| 680 if (cssPropertyMap.contains(attributeName)) | 688 if (cssPropertyMap.contains(attributeName)) |
| 681 return cssPropertyMap.get(attributeName); | 689 return cssPropertyMap.get(attributeName); |
| 682 | 690 |
| 683 return AnimatedUnknown; | 691 return AnimatedUnknown; |
| 684 } | 692 } |
| 685 | 693 |
| 686 void SVGElement::addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase> passProper
ty) | 694 void SVGElement::addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase> passProper
ty) |
| 687 { | 695 { |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 if (m_targetElement) | 1001 if (m_targetElement) |
| 994 m_targetElement->setInstanceUpdatesBlocked(false); | 1002 m_targetElement->setInstanceUpdatesBlocked(false); |
| 995 } | 1003 } |
| 996 | 1004 |
| 997 #if ENABLE(ASSERT) | 1005 #if ENABLE(ASSERT) |
| 998 bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const | 1006 bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const |
| 999 { | 1007 { |
| 1000 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, animatableAttributes, ()); | 1008 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, animatableAttributes, ()); |
| 1001 | 1009 |
| 1002 if (animatableAttributes.isEmpty()) { | 1010 if (animatableAttributes.isEmpty()) { |
| 1003 animatableAttributes.add(XLinkNames::hrefAttr); | 1011 const QualifiedName* const animatableAttrs[] = { |
| 1004 animatableAttributes.add(SVGNames::amplitudeAttr); | 1012 &XLinkNames::hrefAttr, |
| 1005 animatableAttributes.add(SVGNames::azimuthAttr); | 1013 &SVGNames::amplitudeAttr, |
| 1006 animatableAttributes.add(SVGNames::baseFrequencyAttr); | 1014 &SVGNames::azimuthAttr, |
| 1007 animatableAttributes.add(SVGNames::biasAttr); | 1015 &SVGNames::baseFrequencyAttr, |
| 1008 animatableAttributes.add(SVGNames::clipPathUnitsAttr); | 1016 &SVGNames::biasAttr, |
| 1009 animatableAttributes.add(SVGNames::cxAttr); | 1017 &SVGNames::clipPathUnitsAttr, |
| 1010 animatableAttributes.add(SVGNames::cyAttr); | 1018 &SVGNames::cxAttr, |
| 1011 animatableAttributes.add(SVGNames::diffuseConstantAttr); | 1019 &SVGNames::cyAttr, |
| 1012 animatableAttributes.add(SVGNames::divisorAttr); | 1020 &SVGNames::diffuseConstantAttr, |
| 1013 animatableAttributes.add(SVGNames::dxAttr); | 1021 &SVGNames::divisorAttr, |
| 1014 animatableAttributes.add(SVGNames::dyAttr); | 1022 &SVGNames::dxAttr, |
| 1015 animatableAttributes.add(SVGNames::edgeModeAttr); | 1023 &SVGNames::dyAttr, |
| 1016 animatableAttributes.add(SVGNames::elevationAttr); | 1024 &SVGNames::edgeModeAttr, |
| 1017 animatableAttributes.add(SVGNames::exponentAttr); | 1025 &SVGNames::elevationAttr, |
| 1018 animatableAttributes.add(SVGNames::filterResAttr); | 1026 &SVGNames::exponentAttr, |
| 1019 animatableAttributes.add(SVGNames::filterUnitsAttr); | 1027 &SVGNames::filterResAttr, |
| 1020 animatableAttributes.add(SVGNames::fxAttr); | 1028 &SVGNames::filterUnitsAttr, |
| 1021 animatableAttributes.add(SVGNames::fyAttr); | 1029 &SVGNames::fxAttr, |
| 1022 animatableAttributes.add(SVGNames::gradientTransformAttr); | 1030 &SVGNames::fyAttr, |
| 1023 animatableAttributes.add(SVGNames::gradientUnitsAttr); | 1031 &SVGNames::gradientTransformAttr, |
| 1024 animatableAttributes.add(SVGNames::heightAttr); | 1032 &SVGNames::gradientUnitsAttr, |
| 1025 animatableAttributes.add(SVGNames::in2Attr); | 1033 &SVGNames::heightAttr, |
| 1026 animatableAttributes.add(SVGNames::inAttr); | 1034 &SVGNames::in2Attr, |
| 1027 animatableAttributes.add(SVGNames::interceptAttr); | 1035 &SVGNames::inAttr, |
| 1028 animatableAttributes.add(SVGNames::k1Attr); | 1036 &SVGNames::interceptAttr, |
| 1029 animatableAttributes.add(SVGNames::k2Attr); | 1037 &SVGNames::k1Attr, |
| 1030 animatableAttributes.add(SVGNames::k3Attr); | 1038 &SVGNames::k2Attr, |
| 1031 animatableAttributes.add(SVGNames::k4Attr); | 1039 &SVGNames::k3Attr, |
| 1032 animatableAttributes.add(SVGNames::kernelMatrixAttr); | 1040 &SVGNames::k4Attr, |
| 1033 animatableAttributes.add(SVGNames::kernelUnitLengthAttr); | 1041 &SVGNames::kernelMatrixAttr, |
| 1034 animatableAttributes.add(SVGNames::lengthAdjustAttr); | 1042 &SVGNames::kernelUnitLengthAttr, |
| 1035 animatableAttributes.add(SVGNames::limitingConeAngleAttr); | 1043 &SVGNames::lengthAdjustAttr, |
| 1036 animatableAttributes.add(SVGNames::markerHeightAttr); | 1044 &SVGNames::limitingConeAngleAttr, |
| 1037 animatableAttributes.add(SVGNames::markerUnitsAttr); | 1045 &SVGNames::markerHeightAttr, |
| 1038 animatableAttributes.add(SVGNames::markerWidthAttr); | 1046 &SVGNames::markerUnitsAttr, |
| 1039 animatableAttributes.add(SVGNames::maskContentUnitsAttr); | 1047 &SVGNames::markerWidthAttr, |
| 1040 animatableAttributes.add(SVGNames::maskUnitsAttr); | 1048 &SVGNames::maskContentUnitsAttr, |
| 1041 animatableAttributes.add(SVGNames::methodAttr); | 1049 &SVGNames::maskUnitsAttr, |
| 1042 animatableAttributes.add(SVGNames::modeAttr); | 1050 &SVGNames::methodAttr, |
| 1043 animatableAttributes.add(SVGNames::numOctavesAttr); | 1051 &SVGNames::modeAttr, |
| 1044 animatableAttributes.add(SVGNames::offsetAttr); | 1052 &SVGNames::numOctavesAttr, |
| 1045 animatableAttributes.add(SVGNames::operatorAttr); | 1053 &SVGNames::offsetAttr, |
| 1046 animatableAttributes.add(SVGNames::orderAttr); | 1054 &SVGNames::operatorAttr, |
| 1047 animatableAttributes.add(SVGNames::orientAttr); | 1055 &SVGNames::orderAttr, |
| 1048 animatableAttributes.add(SVGNames::pathLengthAttr); | 1056 &SVGNames::orientAttr, |
| 1049 animatableAttributes.add(SVGNames::patternContentUnitsAttr); | 1057 &SVGNames::pathLengthAttr, |
| 1050 animatableAttributes.add(SVGNames::patternTransformAttr); | 1058 &SVGNames::patternContentUnitsAttr, |
| 1051 animatableAttributes.add(SVGNames::patternUnitsAttr); | 1059 &SVGNames::patternTransformAttr, |
| 1052 animatableAttributes.add(SVGNames::pointsAtXAttr); | 1060 &SVGNames::patternUnitsAttr, |
| 1053 animatableAttributes.add(SVGNames::pointsAtYAttr); | 1061 &SVGNames::pointsAtXAttr, |
| 1054 animatableAttributes.add(SVGNames::pointsAtZAttr); | 1062 &SVGNames::pointsAtYAttr, |
| 1055 animatableAttributes.add(SVGNames::preserveAlphaAttr); | 1063 &SVGNames::pointsAtZAttr, |
| 1056 animatableAttributes.add(SVGNames::preserveAspectRatioAttr); | 1064 &SVGNames::preserveAlphaAttr, |
| 1057 animatableAttributes.add(SVGNames::primitiveUnitsAttr); | 1065 &SVGNames::preserveAspectRatioAttr, |
| 1058 animatableAttributes.add(SVGNames::radiusAttr); | 1066 &SVGNames::primitiveUnitsAttr, |
| 1059 animatableAttributes.add(SVGNames::rAttr); | 1067 &SVGNames::radiusAttr, |
| 1060 animatableAttributes.add(SVGNames::refXAttr); | 1068 &SVGNames::rAttr, |
| 1061 animatableAttributes.add(SVGNames::refYAttr); | 1069 &SVGNames::refXAttr, |
| 1062 animatableAttributes.add(SVGNames::resultAttr); | 1070 &SVGNames::refYAttr, |
| 1063 animatableAttributes.add(SVGNames::rotateAttr); | 1071 &SVGNames::resultAttr, |
| 1064 animatableAttributes.add(SVGNames::rxAttr); | 1072 &SVGNames::rotateAttr, |
| 1065 animatableAttributes.add(SVGNames::ryAttr); | 1073 &SVGNames::rxAttr, |
| 1066 animatableAttributes.add(SVGNames::scaleAttr); | 1074 &SVGNames::ryAttr, |
| 1067 animatableAttributes.add(SVGNames::seedAttr); | 1075 &SVGNames::scaleAttr, |
| 1068 animatableAttributes.add(SVGNames::slopeAttr); | 1076 &SVGNames::seedAttr, |
| 1069 animatableAttributes.add(SVGNames::spacingAttr); | 1077 &SVGNames::slopeAttr, |
| 1070 animatableAttributes.add(SVGNames::specularConstantAttr); | 1078 &SVGNames::spacingAttr, |
| 1071 animatableAttributes.add(SVGNames::specularExponentAttr); | 1079 &SVGNames::specularConstantAttr, |
| 1072 animatableAttributes.add(SVGNames::spreadMethodAttr); | 1080 &SVGNames::specularExponentAttr, |
| 1073 animatableAttributes.add(SVGNames::startOffsetAttr); | 1081 &SVGNames::spreadMethodAttr, |
| 1074 animatableAttributes.add(SVGNames::stdDeviationAttr); | 1082 &SVGNames::startOffsetAttr, |
| 1075 animatableAttributes.add(SVGNames::stitchTilesAttr); | 1083 &SVGNames::stdDeviationAttr, |
| 1076 animatableAttributes.add(SVGNames::surfaceScaleAttr); | 1084 &SVGNames::stitchTilesAttr, |
| 1077 animatableAttributes.add(SVGNames::tableValuesAttr); | 1085 &SVGNames::surfaceScaleAttr, |
| 1078 animatableAttributes.add(SVGNames::targetAttr); | 1086 &SVGNames::tableValuesAttr, |
| 1079 animatableAttributes.add(SVGNames::targetXAttr); | 1087 &SVGNames::targetAttr, |
| 1080 animatableAttributes.add(SVGNames::targetYAttr); | 1088 &SVGNames::targetXAttr, |
| 1081 animatableAttributes.add(SVGNames::transformAttr); | 1089 &SVGNames::targetYAttr, |
| 1082 animatableAttributes.add(SVGNames::typeAttr); | 1090 &SVGNames::transformAttr, |
| 1083 animatableAttributes.add(SVGNames::valuesAttr); | 1091 &SVGNames::typeAttr, |
| 1084 animatableAttributes.add(SVGNames::viewBoxAttr); | 1092 &SVGNames::valuesAttr, |
| 1085 animatableAttributes.add(SVGNames::widthAttr); | 1093 &SVGNames::viewBoxAttr, |
| 1086 animatableAttributes.add(SVGNames::x1Attr); | 1094 &SVGNames::widthAttr, |
| 1087 animatableAttributes.add(SVGNames::x2Attr); | 1095 &SVGNames::x1Attr, |
| 1088 animatableAttributes.add(SVGNames::xAttr); | 1096 &SVGNames::x2Attr, |
| 1089 animatableAttributes.add(SVGNames::xChannelSelectorAttr); | 1097 &SVGNames::xAttr, |
| 1090 animatableAttributes.add(SVGNames::y1Attr); | 1098 &SVGNames::xChannelSelectorAttr, |
| 1091 animatableAttributes.add(SVGNames::y2Attr); | 1099 &SVGNames::y1Attr, |
| 1092 animatableAttributes.add(SVGNames::yAttr); | 1100 &SVGNames::y2Attr, |
| 1093 animatableAttributes.add(SVGNames::yChannelSelectorAttr); | 1101 &SVGNames::yAttr, |
| 1094 animatableAttributes.add(SVGNames::zAttr); | 1102 &SVGNames::yChannelSelectorAttr, |
| 1103 &SVGNames::zAttr, |
| 1104 }; |
| 1105 for (size_t i = 0; i < WTF_ARRAY_LENGTH(animatableAttrs); i++) |
| 1106 animatableAttributes.add(*animatableAttrs[i]); |
| 1095 } | 1107 } |
| 1096 | 1108 |
| 1097 if (name == classAttr) | 1109 if (name == classAttr) |
| 1098 return true; | 1110 return true; |
| 1099 | 1111 |
| 1100 return animatableAttributes.contains(name); | 1112 return animatableAttributes.contains(name); |
| 1101 } | 1113 } |
| 1102 #endif | 1114 #endif |
| 1103 | 1115 |
| 1104 SVGElementSet* SVGElement::setOfIncomingReferences() const | 1116 SVGElementSet* SVGElement::setOfIncomingReferences() const |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 Element::trace(visitor); | 1186 Element::trace(visitor); |
| 1175 } | 1187 } |
| 1176 | 1188 |
| 1177 const AtomicString& SVGElement::eventParameterName() | 1189 const AtomicString& SVGElement::eventParameterName() |
| 1178 { | 1190 { |
| 1179 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); | 1191 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); |
| 1180 return evtString; | 1192 return evtString; |
| 1181 } | 1193 } |
| 1182 | 1194 |
| 1183 } // namespace blink | 1195 } // namespace blink |
| OLD | NEW |