Changeset 70979 in webkit
- Timestamp:
- Oct 30, 2010 6:23:55 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 10 added
- 50 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r70978 r70979 1 2010-10-30 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Rob Buis. 4 5 Convert SVGAnimatedNumber/SVGAnimatedNumberList to the new SVGAnimatedPropertyTearOff concept 6 https://bugs.webkit.org/show_bug.cgi?id=48686 7 8 Fix invalid tests in svg/dynamic-updates, that relied on a bug in our SVGNumberList implementation. If an item was already 9 inserted in a list, and we tried to insert it somewhere else, we didn't remove it from the old list. Now that SVGNumberList 10 has been switched to SVGAnimatedListPropertyTearOff, the bug is fixed, and it behaves exactly like SVGLengthList. 11 12 Side effect: svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop.html now works as expected (dynamic update is executed) 13 14 * platform/mac-leopard/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.checksum: 15 * platform/mac-leopard/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png: 16 * svg/dom/SVGAnimatedNumber-expected.txt: Added. 17 * svg/dom/SVGAnimatedNumber.html: Added. 18 * svg/dom/SVGAnimatedNumberList-expected.txt: Added. 19 * svg/dom/SVGAnimatedNumberList.html: Added. 20 * svg/dom/SVGNumber-expected.txt: Added. 21 * svg/dom/SVGNumber.html: Added. 22 * svg/dom/script-tests/SVGAnimatedNumber.js: Added. 23 * svg/dom/script-tests/SVGAnimatedNumberList.js: Added. 24 * svg/dom/script-tests/SVGNumber.js: Added. 25 * svg/dynamic-updates/script-tests/SVGFEColorMatrixElement-svgdom-type-prop.js: Test now works in Firefox as well. 26 (executeTest): SVGNumber.value only accepts numbers, not strings, now that StrictTypeChecking is enabled. 27 * svg/dynamic-updates/script-tests/SVGFEColorMatrixElement-svgdom-values-prop.js: Test now works in Firefox as well. 28 (executeTest): Don't call appendItem several times with the same SVGNumber, it will be removed if it was already inserted in a list. 29 * svg/dynamic-updates/script-tests/SVGFETurbulenceElement-svgdom-baseFrequency-prop.js: 30 1 31 2010-10-30 Nikolas Zimmermann <nzimmermann@rim.com> 2 32 -
trunk/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.checksum
r69230 r70979 1 1c199825420432255e0f64ba5c68374e 1 0e9e0b9fa2fe65b56e30bc8d0b0f2f3c -
trunk/LayoutTests/svg/dynamic-updates/script-tests/SVGFEColorMatrixElement-svgdom-type-prop.js
r69409 r70979 172 172 matrixElement.type.baseVal = SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX; 173 173 174 var matrixArray = new Array( "0.33", "0.33", "0.33", "0", "0", "0.33", "0.33", "0.33", "0", "0", "0.33", "0.33", "0.33", "0", "0", "0.33", "0.33", "0.33", "0", "0");174 var matrixArray = new Array(0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0); 175 175 matrixElement.values.baseVal.clear(); 176 var number = rootSVGElement.createSVGNumber();177 176 for (var i = 0; i < matrixArray.length; ++i) { 177 var number = rootSVGElement.createSVGNumber(); 178 178 number.value = matrixArray[i]; 179 179 matrixElement.values.baseVal.appendItem(number, i); … … 183 183 184 184 hueRotateElement.type.baseVal = SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_HUEROTATE; 185 var number = rootSVGElement.createSVGNumber(); 185 186 number.value = 90; 186 187 hueRotateElement.values.baseVal.appendItem(number, 0); -
trunk/LayoutTests/svg/dynamic-updates/script-tests/SVGFEColorMatrixElement-svgdom-values-prop.js
r69409 r70979 182 182 183 183 function executeTest() { 184 var number = rootSVGElement.createSVGNumber(); 185 186 number.value = 0.33; 187 matrixElement.values.baseVal.replaceItem(number, 0); 188 matrixElement.values.baseVal.replaceItem(number, 1); 189 matrixElement.values.baseVal.replaceItem(number, 2); 190 191 number.value = 0.25; 192 saturateElement.values.baseVal.replaceItem(number, 0); 193 194 number.value = 90; 195 hueRotateElement.values.baseVal.replaceItem(number, 0); 184 var number1 = rootSVGElement.createSVGNumber(); 185 number1.value = 0.33; 186 matrixElement.values.baseVal.replaceItem(number1, 0); 187 188 var number2 = rootSVGElement.createSVGNumber(); 189 number2.value = 0.33; 190 matrixElement.values.baseVal.replaceItem(number2, 1); 191 192 var number3 = rootSVGElement.createSVGNumber(); 193 number3.value = 0.33; 194 matrixElement.values.baseVal.replaceItem(number3, 2); 195 196 var number4 = rootSVGElement.createSVGNumber(); 197 number4.value = 0.25; 198 saturateElement.values.baseVal.replaceItem(number4, 0); 199 200 var number5 = rootSVGElement.createSVGNumber(); 201 number5.value = 90; 202 hueRotateElement.values.baseVal.replaceItem(number5, 0); 196 203 197 204 shouldBeEqualToString("SVGNumberListToString(matrixElement.values.baseVal)", "0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 "); -
trunk/LayoutTests/svg/dynamic-updates/script-tests/SVGFETurbulenceElement-svgdom-baseFrequency-prop.js
r67544 r70979 32 32 rootSVGElement.appendChild(rectElement); 33 33 34 <!-- We should multiply and round the value of baseFrequency otherwise the expected value cannot be precisely represented as a floating point number and the comparison will fail.--> 34 // We should multiply and round the value of baseFrequency otherwise the expected value cannot be precisely represented as a floating point number and the comparison will fail. 35 35 shouldBe("Math.round(turbulence.baseFrequencyX.baseVal * 1000)", "70"); 36 36 shouldBe("Math.round(turbulence.baseFrequencyY.baseVal * 1000)", "70"); -
trunk/WebCore/ChangeLog
r70976 r70979 1 2010-10-30 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Rob Buis. 4 5 Convert SVGAnimatedNumber/SVGAnimatedNumberList to the new SVGAnimatedPropertyTearOff concept 6 https://bugs.webkit.org/show_bug.cgi?id=48686 7 8 Convert the next set of primitives to use the new SVG(Animated)PropertyTearOff concept. 9 10 Tests: svg/dom/SVGAnimatedNumber.html 11 svg/dom/SVGAnimatedNumberList.html 12 svg/dom/SVGNumber.html 13 14 * GNUmakefile.am: Add SVGAnimatedNumber.h / SVGAnimatedNumberList.h to build. 15 * WebCore.gypi: Ditto. 16 * WebCore.pro: Ditto. 17 * WebCore.vcproj/WebCore.vcproj: Ditto. 18 * WebCore.xcodeproj/project.pbxproj: Ditto. 19 * bindings/scripts/CodeGenerator.pm: Recognize SVGAnimatedNumber/SVGAnimatedNumberList as new style SVG animated properties. Remove SVGNumber from PODType hash. 20 * bindings/scripts/CodeGeneratorJS.pm: Remove special SVGNumber handing, it's obsolete now. 21 * bindings/scripts/CodeGeneratorObjC.pm: Add special SVGNumber handling, as it's the first of the converted dynamic SVGAnimatedProperty types that's not in WebCore namespace. 22 * bindings/scripts/CodeGeneratorV8.pm: Use AvoidInclusionOfType method from CodeGenerator.pm, remove special SVGNumber handling, that's obsolete now. 23 * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: 24 (WebCore::extractFloatValuesFromSVGNumberList): Adapt to SVGNumberList change, which is a plain Vector<float> now. 25 * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGAnimatedNumber/SVGAnimatedNumberList handling. 26 * svg/DeprecatedSVGAnimatedTemplate.h: Ditto. 27 * svg/SVGAnimatedNumber.h: Added. 28 * svg/SVGAnimatedNumber.idl: Enable StrictTypeChecking. 29 * svg/SVGAnimatedNumberList.h: Added. 30 * svg/SVGAnimatedNumberList.idl: Ditto. 31 * svg/SVGComponentTransferFunctionElement.cpp: Switch animated float properties to the new SVGAnimatedNumber(List). 32 (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement): 33 (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute): 34 (WebCore::SVGComponentTransferFunctionElement::transferFunction): 35 * svg/SVGComponentTransferFunctionElement.h: 36 * svg/SVGFEColorMatrixElement.cpp: Ditto. 37 (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement): 38 (WebCore::SVGFEColorMatrixElement::parseMappedAttribute): 39 (WebCore::SVGFEColorMatrixElement::build): 40 * svg/SVGFEColorMatrixElement.h: 41 * svg/SVGFECompositeElement.h: Ditto. 42 * svg/SVGFEConvolveMatrixElement.cpp: Ditto. 43 (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement): 44 (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier): Added, replacing char[] hack by a static atomic string. 45 (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier): Ditto. 46 (WebCore::SVGFEConvolveMatrixElement::parseMappedAttribute): 47 (WebCore::SVGFEConvolveMatrixElement::build): 48 * svg/SVGFEConvolveMatrixElement.h: Switch animated float properties to the new SVGAnimatedNumber(List). 49 * svg/SVGFEDiffuseLightingElement.cpp: Ditto. 50 (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier): Remove trailing whitespace. 51 (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier): Ditto. 52 * svg/SVGFEDiffuseLightingElement.h: Switch animated float properties to the new SVGAnimatedNumber(List). 53 * svg/SVGFEDisplacementMapElement.h: Ditto. 54 * svg/SVGFEGaussianBlurElement.cpp: Ditto. 55 (WebCore::SVGFEGaussianBlurElement::stdDeviationXIdentifier): Remove trailing whitespace. 56 (WebCore::SVGFEGaussianBlurElement::stdDeviationYIdentifier): Ditto. 57 * svg/SVGFEGaussianBlurElement.h: Switch animated float properties to the new SVGAnimatedNumber(List). 58 * svg/SVGFELightElement.h: Ditto. 59 * svg/SVGFEMorphologyElement.cpp: 60 (WebCore::SVGFEMorphologyElement::radiusXIdentifier): Added, replacing char[] hack by a static atomic string. 61 (WebCore::SVGFEMorphologyElement::radiusYIdentifier): Ditto. 62 * svg/SVGFEMorphologyElement.h: Switch animated float properties to the new SVGAnimatedNumber(List). 63 * svg/SVGFEOffsetElement.h: Ditto. 64 * svg/SVGFESpecularLightingElement.cpp: 65 (WebCore::SVGFESpecularLightingElement::kernelUnitLengthXIdentifier): Remove trailing whitespace. 66 (WebCore::SVGFESpecularLightingElement::kernelUnitLengthYIdentifier): Ditto. 67 * svg/SVGFESpecularLightingElement.h: Switch animated float properties to the new SVGAnimatedNumber(List). 68 * svg/SVGFETurbulenceElement.cpp: 69 (WebCore::SVGFETurbulenceElement::baseFrequencyXIdentifier): Remove trailing whitespace. 70 (WebCore::SVGFETurbulenceElement::baseFrequencyYIdentifier): Ditto. 71 * svg/SVGFETurbulenceElement.h: Switch animated float properties to the new SVGAnimatedNumber(List). 72 * svg/SVGFilterElement.cpp: 73 (WebCore::SVGFilterElement::filterResXIdentifier): Remove trailing whitespace. 74 (WebCore::SVGFilterElement::filterResYIdentifier): Ditto. 75 * svg/SVGLengthList.idl: Remove leftover [SVGListProperty] marker. 76 * svg/SVGMarkerElement.cpp: 77 (WebCore::SVGMarkerElement::orientTypeIdentifier): Remove trailing whitespace. 78 (WebCore::SVGMarkerElement::orientAngleIdentifier): Ditto. 79 * svg/SVGNumber.idl: Remove [PODType] marker, add StrictTypeChecking. 80 * svg/SVGNumberList.cpp: Convert from SVGPODList<RefPtr<SVGPODListItem<float> > > to plain Vector<float>, just like it has been done for SVGLengthList before. 81 (WebCore::SVGNumberList::parse): 82 (WebCore::SVGNumberList::valueAsString): 83 * svg/SVGNumberList.h: 84 (WebCore::SVGNumberList::SVGNumberList): 85 * svg/SVGPathElement.h: Switch animated float properties to the new SVGAnimatedNumber(List). 86 * svg/SVGStopElement.h: Ditto. 87 * svg/SVGTextPositioningElement.cpp: Switch animated float properties to the new SVGAnimatedNumber(List). 88 (WebCore::SVGTextPositioningElement::SVGTextPositioningElement): 89 (WebCore::SVGTextPositioningElement::parseMappedAttribute): 90 * svg/SVGTextPositioningElement.h: Ditto. 91 * svg/properties/SVGPropertyTraits.h: Add SVGNumberList handling. 92 1 93 2010-10-29 Daniel Bates <dbates@rim.com> 2 94 -
trunk/WebCore/GNUmakefile.am
r70970 r70979 3054 3054 WebCore/svg/SVGAnimatedLength.h \ 3055 3055 WebCore/svg/SVGAnimatedLengthList.h \ 3056 WebCore/svg/SVGAnimatedNumber.h \ 3057 WebCore/svg/SVGAnimatedNumberList.h \ 3056 3058 WebCore/svg/SVGAnimatedPathData.cpp \ 3057 3059 WebCore/svg/SVGAnimatedPathData.h \ -
trunk/WebCore/WebCore.gypi
r70970 r70979 3987 3987 'svg/SVGAnimatedLength.h', 3988 3988 'svg/SVGAnimatedLengthList.h', 3989 'svg/SVGAnimatedNumber.h', 3990 'svg/SVGAnimatedNumberList.h', 3989 3991 'svg/SVGAnimatedPathData.cpp', 3990 3992 'svg/SVGAnimatedPathData.h', -
trunk/WebCore/WebCore.pro
r70970 r70979 2379 2379 svg/SVGAnimatedLength.h \ 2380 2380 svg/SVGAnimatedLengthList.h \ 2381 svg/SVGAnimatedNumber.h \ 2382 svg/SVGAnimatedNumberList.h \ 2381 2383 svg/SVGAnimatedPathData.h \ 2382 2384 svg/SVGAnimatedPoints.h \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r70970 r70979 61593 61593 </File> 61594 61594 <File 61595 RelativePath="..\svg\SVGAnimatedNumber.h" 61596 > 61597 </File> 61598 <File 61599 RelativePath="..\svg\SVGAnimatedNumberList.h" 61600 > 61601 </File> 61602 <File 61595 61603 RelativePath="..\svg\SVGAnimatedPathData.h" 61596 61604 > -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r70970 r70979 214 214 08A484780E5272C500C3FE76 /* ScriptElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08A484760E5272C500C3FE76 /* ScriptElement.h */; }; 215 215 08A48A6E0E86CF6D00E225DD /* JSSVGElementInstanceCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08A48A6D0E86CF6D00E225DD /* JSSVGElementInstanceCustom.cpp */; }; 216 08B35B13127B6A7C005314DD /* SVGAnimatedNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 08B35B12127B6A7C005314DD /* SVGAnimatedNumber.h */; settings = {ATTRIBUTES = (Private, ); }; }; 217 08B35B17127B6A88005314DD /* SVGAnimatedNumberList.h in Headers */ = {isa = PBXBuildFile; fileRef = 08B35B16127B6A88005314DD /* SVGAnimatedNumberList.h */; settings = {ATTRIBUTES = (Private, ); }; }; 216 218 08C34AF51179C057002D7456 /* RenderSVGResourceGradient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C34AF11179C056002D7456 /* RenderSVGResourceGradient.cpp */; }; 217 219 08C34AF61179C057002D7456 /* RenderSVGResourceGradient.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C34AF21179C057002D7456 /* RenderSVGResourceGradient.h */; }; … … 6222 6224 08A484760E5272C500C3FE76 /* ScriptElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptElement.h; sourceTree = "<group>"; }; 6223 6225 08A48A6D0E86CF6D00E225DD /* JSSVGElementInstanceCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGElementInstanceCustom.cpp; sourceTree = "<group>"; }; 6226 08B35B12127B6A7C005314DD /* SVGAnimatedNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedNumber.h; sourceTree = "<group>"; }; 6227 08B35B16127B6A88005314DD /* SVGAnimatedNumberList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedNumberList.h; sourceTree = "<group>"; }; 6224 6228 08C34AF11179C056002D7456 /* RenderSVGResourceGradient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceGradient.cpp; sourceTree = "<group>"; }; 6225 6229 08C34AF21179C057002D7456 /* RenderSVGResourceGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceGradient.h; sourceTree = "<group>"; }; … … 16015 16019 089021AC126EF5E90092D5EA /* SVGAnimatedLengthList.h */, 16016 16020 B22277EB0D00BF1F0071B782 /* SVGAnimatedLengthList.idl */, 16021 08B35B12127B6A7C005314DD /* SVGAnimatedNumber.h */, 16017 16022 B22277EC0D00BF1F0071B782 /* SVGAnimatedNumber.idl */, 16023 08B35B16127B6A88005314DD /* SVGAnimatedNumberList.h */, 16018 16024 B22277ED0D00BF1F0071B782 /* SVGAnimatedNumberList.idl */, 16019 16025 B22277EE0D00BF1F0071B782 /* SVGAnimatedPathData.cpp */, … … 21232 21238 08D46CE3127AD5FC0089694B /* SVGAnimatedEnumeration.h in Headers */, 21233 21239 0823D159127AD6AC000EBC95 /* SVGAnimatedInteger.h in Headers */, 21240 08B35B13127B6A7C005314DD /* SVGAnimatedNumber.h in Headers */, 21241 08B35B17127B6A88005314DD /* SVGAnimatedNumberList.h in Headers */, 21234 21242 ); 21235 21243 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/bindings/scripts/CodeGenerator.pm
r70872 r70979 51 51 my %primitiveTypeHash = ( "boolean" => 1, "void" => 1, "Date" => 1); 52 52 53 my %podTypeHash = ("SVG Number" => 1, "SVGTransform" => 1);53 my %podTypeHash = ("SVGTransform" => 1); 54 54 my %podTypesWithWritablePropertiesHash = ("SVGMatrix" => 1, "SVGPoint" => 1, "SVGPreserveAspectRatio" => 1); 55 55 my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1); … … 60 60 "SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1, 61 61 "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1, 62 "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1, 62 63 "SVGAnimatedRect" => 1); 63 64 … … 80 81 "SVGLength" => "SVGPropertyTearOff<SVGLength>", 81 82 "SVGLengthList" => "SVGListPropertyTearOff<SVGLengthList>", 83 "SVGNumber" => "SVGPropertyTearOff<float>", 84 "SVGNumberList" => "SVGListPropertyTearOff<SVGNumberList>", 82 85 "SVGRect" => "SVGPropertyTearOff<FloatRect>" 83 86 ); -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r70918 r70979 2456 2456 "IDBKey" => "RefPtr<IDBKey>", 2457 2457 "SVGMatrix" => "AffineTransform", 2458 "SVGNumber" => "float",2459 2458 "SVGPaintType" => "SVGPaint::SVGPaintType", 2460 2459 "SVGPreserveAspectRatio" => "SVGPreserveAspectRatio", … … 2529 2528 return "$value.toBoolean(exec)" if $type eq "boolean"; 2530 2529 return "$value.toNumber(exec)" if $type eq "double"; 2531 return "$value.toFloat(exec)" if $type eq "float" or $type eq "SVGNumber";2530 return "$value.toFloat(exec)" if $type eq "float"; 2532 2531 return "$value.toInt32(exec)" if $type eq "long"; 2533 2532 return "$value.toUInt32(exec)" if $type eq "unsigned long" or $type eq "unsigned short"; -
trunk/WebCore/bindings/scripts/CodeGeneratorObjC.pm
r70918 r70979 614 614 } 615 615 616 if ($type eq "SVGNumber") {617 $implIncludes{"DOMSVGNumberInternal.h"} = 1;618 return;619 }620 621 616 if ($type =~ /(\w+)(Abs|Rel)$/) { 622 617 $implIncludes{"$1.h"} = 1; … … 657 652 } 658 653 654 sub GetSVGTypeWithNamespace 655 { 656 my $type = shift; 657 my $typeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($type); 658 659 # Special case for DOMSVGNumber 660 $typeWithNamespace =~ s/</\<WebCore::/ unless $type eq "SVGNumber"; 661 return $typeWithNamespace; 662 } 663 659 664 sub GetSVGPropertyTypes 660 665 { … … 672 677 # Append space to avoid compilation errors when using PassRefPtr<$svgNativeType> 673 678 $svgNativeType = "WebCore::$svgNativeType "; 674 $svgNativeType =~ s/</\<WebCore::/ ;679 $svgNativeType =~ s/</\<WebCore::/ if not $svgNativeType =~ /float/; 675 680 676 681 my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implType); 677 682 if ($svgNativeType =~ /SVGPropertyTearOff/) { 678 $svgPropertyType = "WebCore::$svgWrappedNativeType"; 679 $svgPropertyType =~ s/</\<WebCore::/; 683 if ($svgWrappedNativeType eq "float") { 684 # Special case for DOMSVGNumber 685 $svgPropertyType = $svgWrappedNativeType; 686 } else { 687 $svgPropertyType = "WebCore::$svgWrappedNativeType"; 688 $svgPropertyType =~ s/</\<WebCore::/; 689 } 680 690 } elsif ($svgNativeType =~ /SVGListPropertyTearOff/) { 681 691 $svgListPropertyType = "WebCore::$svgWrappedNativeType"; … … 1238 1248 if ($svgPropertyType eq "WebCore::SVGLength" and $attributeName eq "value") { 1239 1249 $getterContentHead = "value(0 /* FIXME */"; 1240 }1241 } else {1242 # Special case for DOMSVGNumber1243 if ($podType and $podType eq "float") {1244 $getterContentHead = "*IMPL";1245 $getterContentTail = "";1246 1250 } 1247 1251 } … … 1288 1292 $getterContentTail .= ")"; 1289 1293 } elsif ($svgPropertyType) { 1290 $getterContentHead = "IMPL->propertyReference().$getterContentHead"; 1294 # Special case for DOMSVGNumber 1295 if ($svgPropertyType eq "float") { 1296 # Intentional leave out closing brace, it's already contained in getterContentTail 1297 $getterContentHead = "IMPL->propertyReference("; 1298 } else { 1299 $getterContentHead = "IMPL->propertyReference().$getterContentHead"; 1300 } 1291 1301 } elsif ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($idlType)) { 1292 my $idlTypeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($idlType); 1293 $idlTypeWithNamespace =~ s/</\<WebCore::/; 1302 my $idlTypeWithNamespace = GetSVGTypeWithNamespace($idlType); 1294 1303 $getterContentHead = "kit(static_cast<$idlTypeWithNamespace*>($getterContentHead)"; 1295 1304 $getterContentTail .= ")"; … … 1305 1314 } elsif (ConversionNeeded($attribute->signature->type)) { 1306 1315 if ($codeGenerator->IsSVGTypeNeedingTearOff($attribute->signature->type) and not $implClassName =~ /List$/) { 1307 my $idlType = $attribute->signature->type; 1308 my $idlTypeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($idlType); 1309 $idlTypeWithNamespace =~ s/</\<WebCore::/; 1316 my $idlTypeWithNamespace = GetSVGTypeWithNamespace($attribute->signature->type); 1310 1317 $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($getterContentHead"; 1311 1318 $getterContentTail .= ")))"; … … 1382 1389 my $ec = $hasSetterException ? ", ec" : ""; 1383 1390 push(@implContent, " $exceptionInit\n") if $hasSetterException; 1384 push(@implContent, " podImpl.$coreSetterName($arg$ec);\n"); 1391 1392 # Special case for DOMSVGNumber 1393 if ($svgPropertyType eq "float") { 1394 push(@implContent, " podImpl = $arg;\n"); 1395 } else { 1396 push(@implContent, " podImpl.$coreSetterName($arg$ec);\n"); 1397 } 1398 1385 1399 if ($hasSetterException) { 1386 1400 push(@implContent, " if (!ec)\n"); … … 1394 1408 push(@implContent, " IMPL->$coreSetterName($arg);\n"); 1395 1409 } elsif ($podType) { 1396 # Special case for DOMSVGNumber 1397 if ($podType eq "float") { 1398 push(@implContent, " *IMPL = $arg;\n"); 1399 } else { 1400 push(@implContent, " IMPL->$coreSetterName($arg);\n"); 1401 } 1410 push(@implContent, " IMPL->$coreSetterName($arg);\n"); 1402 1411 } else { 1403 1412 my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); … … 1534 1543 1535 1544 my $implGetter = GetObjCTypeGetter($paramName, $idlType); 1536 my $idlTypeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($idlType); 1537 $idlTypeWithNamespace =~ s/</\<WebCore::/; 1545 my $idlTypeWithNamespace = GetSVGTypeWithNamespace($idlType); 1538 1546 1539 1547 push(@functionContent, " $idlTypeWithNamespace* ${paramName}Core = $implGetter;\n"); … … 1604 1612 if (ConversionNeeded($function->signature->type)) { 1605 1613 if ($codeGenerator->IsSVGTypeNeedingTearOff($function->signature->type) and not $implClassName =~ /List$/) { 1606 my $idlType = $function->signature->type; 1607 my $idlTypeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($idlType); 1608 $idlTypeWithNamespace =~ s/</\<WebCore::/; 1614 my $idlTypeWithNamespace = GetSVGTypeWithNamespace($function->signature->type); 1609 1615 $content = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($content)))"; 1610 1616 } elsif ($codeGenerator->IsPodType($function->signature->type)) { -
trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm
r70918 r70979 131 131 } 132 132 133 sub AvoidInclusionOfType134 {135 my $type = shift;136 137 # Special case: SVGRect.h / SVGPoint.h / SVGNumber.h / SVGMatrix.h do not exist.138 return 1 if $type eq "SVGRect" or $type eq "SVGPoint" or $type eq "SVGNumber" or $type eq "SVGMatrix";139 return 0;140 }141 142 133 sub AddIncludesForType 143 134 { … … 146 137 # When we're finished with the one-file-per-class 147 138 # reorganization, we won't need these special cases. 148 if (!$codeGenerator->IsPrimitiveType($type) and ! AvoidInclusionOfType($type) and $type ne "Date") {139 if (!$codeGenerator->IsPrimitiveType($type) and !$codeGenerator->AvoidInclusionOfType($type) and $type ne "Date") { 149 140 # default, include the same named file 150 141 $implIncludes{GetV8HeaderName(${type})} = 1; … … 479 470 $className =~ s/Abs|Rel//; 480 471 } 481 return "" if ( AvoidInclusionOfType($className));472 return "" if ($codeGenerator->AvoidInclusionOfType($className)); 482 473 return "DeprecatedSVGAnimatedTemplate.h" if $codeGenerator->IsSVGAnimatedType($className) and !$codeGenerator->IsSVGNewStyleAnimatedType($className); 483 474 return "${className}.h"; … … 728 719 } 729 720 730 my $getterStringUsesImp = $implClassName ne " float";721 my $getterStringUsesImp = $implClassName ne "SVGNumber"; 731 722 my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implClassName); 732 723 … … 761 752 $svgNativeType* wrapper = V8${implClassName}::toNative(info.Holder()); 762 753 $svgWrappedNativeType& impInstance = wrapper->propertyReference(); 754 END 755 if ($getterStringUsesImp) { 756 push(@implContentDecls, <<END); 763 757 $svgWrappedNativeType* imp = &impInstance; 764 758 END 759 } 765 760 } 766 761 } elsif ($attrExt->{"v8OnProto"} || $attrExt->{"V8DisallowShadowing"}) { … … 1070 1065 } 1071 1066 1072 if ($implClassName eq " float") {1067 if ($implClassName eq "SVGNumber") { 1073 1068 push(@implContentDecls, " *imp = $result;\n"); 1074 1069 } else { … … 2674 2669 $type = "FloatPoint" if $type eq "SVGPoint"; 2675 2670 $type = "AffineTransform" if $type eq "SVGMatrix"; 2676 $type = "float" if $type eq "SVGNumber";2677 2671 $type = "V8SVGPODTypeWrapper<$type>" if $dataNode->extendedAttributes->{"PODType"}; 2678 2672 $type = $codeGenerator->GetSVGTypeNeedingTearOff($type) if $codeGenerator->IsSVGTypeNeedingTearOff($type); … … 2979 2973 return "AffineTransform" if $type eq "SVGMatrix"; 2980 2974 return "SVGTransform" if $type eq "SVGTransform"; 2981 return "float" if $type eq "SVGNumber";2982 2975 return "SVGPreserveAspectRatio" if $type eq "SVGPreserveAspectRatio"; 2983 2976 return "SVGPaint::SVGPaintType" if $type eq "SVGPaintType"; … … 3062 3055 return "$value->BooleanValue()" if $type eq "boolean"; 3063 3056 return "static_cast<$type>($value->NumberValue())" if $type eq "float" or $type eq "double"; 3064 return "$value->NumberValue()" if $type eq "SVGNumber";3065 3057 3066 3058 return "toInt32($value${maybeOkParam})" if $type eq "long"; -
trunk/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
r70223 r70979 73 73 } 74 74 75 static inline void extractFloatValuesFromSVGNumberList(SVGNumberList* list, Vector<float>& floatValues, unsigned textContentLength) 76 { 77 ASSERT(list); 78 79 unsigned length = list->numberOfItems(); 75 static inline void extractFloatValuesFromSVGNumberList(const SVGNumberList& list, Vector<float>& floatValues, unsigned textContentLength) 76 { 77 unsigned length = list.size(); 80 78 if (length > textContentLength) 81 79 length = textContentLength; 82 80 floatValues.reserveCapacity(length); 83 81 84 ExceptionCode ec = 0; 85 for (unsigned i = 0; i < length; ++i) { 86 float length = list->getItem(i, ec); 87 ASSERT(!ec); 88 floatValues.append(length); 89 } 82 for (unsigned i = 0; i < length; ++i) 83 floatValues.append(list.at(i)); 90 84 } 91 85 -
trunk/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h
r70872 r70979 24 24 #if ENABLE(SVG) 25 25 #include "PlatformString.h" 26 #include "SVGNumberList.h"27 26 #include "SVGPreserveAspectRatio.h" 28 27 #include "SVGTransformList.h" … … 32 31 template<typename Type> 33 32 struct DeprecatedSVGAnimatedPropertyTraits : public Noncopyable { }; 34 35 // SVGAnimatedNumber36 template<>37 struct DeprecatedSVGAnimatedPropertyTraits<float> : public Noncopyable {38 typedef const float& PassType;39 typedef float ReturnType;40 typedef float StoredType;41 42 static ReturnType null() { return 0.0f; }43 static ReturnType toReturnType(const StoredType& type) { return type; }44 static String toString(PassType type) { return String::number(type); }45 };46 47 // SVGAnimatedNumberList48 template<>49 struct DeprecatedSVGAnimatedPropertyTraits<SVGNumberList*> : public Noncopyable {50 typedef SVGNumberList* PassType;51 typedef SVGNumberList* ReturnType;52 typedef RefPtr<SVGNumberList> StoredType;53 54 static ReturnType null() { return 0; }55 static ReturnType toReturnType(const StoredType& type) { return type.get(); }56 static String toString(PassType type) { return type ? type->valueAsString() : String(); }57 };58 33 59 34 // SVGAnimatedPreserveAspectRatio -
trunk/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
r70872 r70979 30 30 31 31 class SVGElement; 32 class SVGNumberList;33 32 class SVGPreserveAspectRatio; 34 33 class SVGTransformList; … … 155 154 156 155 // Common type definitions, to ease IDL generation. 157 typedef DeprecatedSVGAnimatedTemplate<float> SVGAnimatedNumber;158 typedef DeprecatedSVGAnimatedTemplate<SVGNumberList*> SVGAnimatedNumberList;159 156 typedef DeprecatedSVGAnimatedTemplate<SVGPreserveAspectRatio> SVGAnimatedPreserveAspectRatio; 160 157 typedef DeprecatedSVGAnimatedTemplate<String> SVGAnimatedString; -
trunk/WebCore/svg/SVGAnimatedNumber.idl
r64579 r70979 28 28 29 29 interface [Conditional=SVG] SVGAnimatedNumber { 30 attribute float baseVal 31 /*setter raises(DOMException)*/; 30 attribute [StrictTypeChecking] float baseVal; 32 31 readonly attribute float animVal; 33 32 }; -
trunk/WebCore/svg/SVGComponentTransferFunctionElement.cpp
r66397 r70979 34 34 : SVGElement(tagName, document) 35 35 , m_type(FECOMPONENTTRANSFER_TYPE_UNKNOWN) 36 , m_tableValues(SVGNumberList::create(SVGNames::tableValuesAttr))37 36 , m_slope(1) 38 37 , m_amplitude(1) … … 55 54 else if (value == "gamma") 56 55 setTypeBaseValue(FECOMPONENTTRANSFER_TYPE_GAMMA); 57 } 58 else if (attr->name() == SVGNames::tableValuesAttr) 59 tableValuesBaseValue()->parse(value); 60 else if (attr->name() == SVGNames::slopeAttr) 56 } else if (attr->name() == SVGNames::tableValuesAttr) { 57 SVGNumberList newList; 58 newList.parse(value); 59 detachAnimatedTableValuesListWrappers(newList.size()); 60 tableValuesBaseValue() = newList; 61 } else if (attr->name() == SVGNames::slopeAttr) 61 62 setSlopeBaseValue(value.toFloat()); 62 63 else if (attr->name() == SVGNames::interceptAttr) … … 106 107 { 107 108 ComponentTransferFunction func; 108 func.type = (ComponentTransferType) type();109 func.type = static_cast<ComponentTransferType>(type()); 109 110 func.slope = slope(); 110 111 func.intercept = intercept(); … … 112 113 func.exponent = exponent(); 113 114 func.offset = offset(); 114 SVGNumberList* numbers = tableValues(); 115 116 ExceptionCode ec = 0; 117 unsigned int nr = numbers->numberOfItems(); 118 for (unsigned int i = 0; i < nr; i++) 119 func.tableValues.append(numbers->getItem(i, ec)); 115 func.tableValues = tableValues(); 120 116 return func; 121 117 } -
trunk/WebCore/svg/SVGComponentTransferFunctionElement.h
r70872 r70979 23 23 24 24 #if ENABLE(SVG) && ENABLE(FILTERS) 25 #include "FEComponentTransfer.h" 25 26 #include "SVGAnimatedPropertyMacros.h" 26 27 #include "SVGNumberList.h" 27 #include "FEComponentTransfer.h"28 28 29 29 namespace WebCore { … … 41 41 private: 42 42 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::typeAttr, int, Type, type) 43 DECLARE_ANIMATED_ PROPERTY(SVGComponentTransferFunctionElement, SVGNames::tableValuesAttr, SVGNumberList*, TableValues, tableValues)44 DECLARE_ANIMATED_ PROPERTY(SVGComponentTransferFunctionElement, SVGNames::slopeAttr, float, Slope, slope)45 DECLARE_ANIMATED_ PROPERTY(SVGComponentTransferFunctionElement, SVGNames::interceptAttr, float, Intercept, intercept)46 DECLARE_ANIMATED_ PROPERTY(SVGComponentTransferFunctionElement, SVGNames::amplitudeAttr, float, Amplitude, amplitude)47 DECLARE_ANIMATED_ PROPERTY(SVGComponentTransferFunctionElement, SVGNames::exponentAttr, float, Exponent, exponent)48 DECLARE_ANIMATED_ PROPERTY(SVGComponentTransferFunctionElement, SVGNames::offsetAttr, float, Offset, offset)43 DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::tableValuesAttr, SVGNumberList, TableValues, tableValues) 44 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::slopeAttr, float, Slope, slope) 45 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::interceptAttr, float, Intercept, intercept) 46 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::amplitudeAttr, float, Amplitude, amplitude) 47 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::exponentAttr, float, Exponent, exponent) 48 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::offsetAttr, float, Offset, offset) 49 49 }; 50 50 -
trunk/WebCore/svg/SVGFEColorMatrixElement.cpp
r69409 r70979 33 33 : SVGFilterPrimitiveStandardAttributes(tagName, document) 34 34 , m_type(FECOLORMATRIX_TYPE_UNKNOWN) 35 , m_values(SVGNumberList::create(SVGNames::valuesAttr))36 35 { 37 36 } … … 57 56 else if (attr->name() == SVGNames::inAttr) 58 57 setIn1BaseValue(value); 59 else if (attr->name() == SVGNames::valuesAttr) 60 valuesBaseValue()->parse(value); 61 else 58 else if (attr->name() == SVGNames::valuesAttr) { 59 SVGNumberList newList; 60 newList.parse(value); 61 detachAnimatedValuesListWrappers(newList.size()); 62 valuesBaseValue() = newList; 63 } else 62 64 SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr); 63 65 } … … 100 102 101 103 Vector<float> filterValues; 102 SVGNumberList* numbers = values();103 104 const ColorMatrixType filterType(static_cast<ColorMatrixType>(type())); 104 105 … … 120 121 } 121 122 } else { 122 size_t size = numbers->numberOfItems(); 123 for (size_t i = 0; i < size; i++) { 124 ExceptionCode ec = 0; 125 filterValues.append(numbers->getItem(i, ec)); 126 } 127 size = filterValues.size(); 123 filterValues = values(); 124 unsigned size = filterValues.size(); 128 125 129 126 if ((filterType == FECOLORMATRIX_TYPE_MATRIX && size != 20) -
trunk/WebCore/svg/SVGFEColorMatrixElement.h
r70872 r70979 43 43 DECLARE_ANIMATED_PROPERTY(SVGFEColorMatrixElement, SVGNames::inAttr, String, In1, in1) 44 44 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEColorMatrixElement, SVGNames::typeAttr, int, Type, type) 45 DECLARE_ANIMATED_ PROPERTY(SVGFEColorMatrixElement, SVGNames::valuesAttr, SVGNumberList*, Values, values)45 DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGFEColorMatrixElement, SVGNames::valuesAttr, SVGNumberList, Values, values) 46 46 }; 47 47 -
trunk/WebCore/svg/SVGFECompositeElement.h
r70872 r70979 43 43 DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::in2Attr, String, In2, in2) 44 44 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFECompositeElement, SVGNames::operatorAttr, int, _operator, _operator) 45 DECLARE_ANIMATED_ PROPERTY(SVGFECompositeElement, SVGNames::k1Attr, float, K1, k1)46 DECLARE_ANIMATED_ PROPERTY(SVGFECompositeElement, SVGNames::k2Attr, float, K2, k2)47 DECLARE_ANIMATED_ PROPERTY(SVGFECompositeElement, SVGNames::k3Attr, float, K3, k3)48 DECLARE_ANIMATED_ PROPERTY(SVGFECompositeElement, SVGNames::k4Attr, float, K4, k4)45 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFECompositeElement, SVGNames::k1Attr, float, K1, k1) 46 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFECompositeElement, SVGNames::k2Attr, float, K2, k2) 47 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFECompositeElement, SVGNames::k3Attr, float, K3, k3) 48 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFECompositeElement, SVGNames::k4Attr, float, K4, k4) 49 49 }; 50 50 -
trunk/WebCore/svg/SVGFEConvolveMatrixElement.cpp
r69774 r70979 36 36 namespace WebCore { 37 37 38 char SVGKernelUnitLengthXAttrIdentifier[] = "SVGKernelUnitLengthXAttr";39 char SVGKernelUnitLengthYAttrIdentifier[] = "SVGKernelUnitLengthYAttr";40 41 38 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedName& tagName, Document* document) 42 39 : SVGFilterPrimitiveStandardAttributes(tagName, document) 43 , m_kernelMatrix(SVGNumberList::create(SVGNames::kernelMatrixAttr))44 40 , m_edgeMode(EDGEMODE_DUPLICATE) 45 41 { … … 49 45 { 50 46 return adoptRef(new SVGFEConvolveMatrixElement(tagName, document)); 47 } 48 49 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier() 50 { 51 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX")); 52 return s_identifier; 53 } 54 55 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier() 56 { 57 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthY")); 58 return s_identifier; 51 59 } 52 60 … … 69 77 else if (value == "none") 70 78 setEdgeModeBaseValue(EDGEMODE_NONE); 71 } else if (attr->name() == SVGNames::kernelMatrixAttr) 72 kernelMatrixBaseValue()->parse(value); 73 else if (attr->name() == SVGNames::divisorAttr) 79 } else if (attr->name() == SVGNames::kernelMatrixAttr) { 80 SVGNumberList newList; 81 newList.parse(value); 82 detachAnimatedKernelMatrixListWrappers(newList.size()); 83 kernelMatrixBaseValue() = newList; 84 } else if (attr->name() == SVGNames::divisorAttr) 74 85 setDivisorBaseValue(value.toFloat()); 75 86 else if (attr->name() == SVGNames::biasAttr) … … 132 143 return 0; 133 144 134 Vector<float> kernelMatrixValues;135 SVGNumberList* numbers = kernelMatrix();136 137 ExceptionCode ec = 0;138 int numberOfItems = numbers->numberOfItems();139 for (int i = 0; i < numberOfItems; ++i)140 kernelMatrixValues.append(numbers->getItem(i, ec));141 142 145 int orderXValue = orderX(); 143 146 int orderYValue = orderY(); … … 146 149 orderYValue = 3; 147 150 } 151 SVGNumberList& kernelMatrix = this->kernelMatrix(); 152 int kernelMatrixSize = kernelMatrix.size(); 148 153 // The spec says this is a requirement, and should bail out if fails 149 if (orderXValue * orderYValue != numberOfItems)154 if (orderXValue * orderYValue != kernelMatrixSize) 150 155 return 0; 151 156 … … 167 172 return 0; 168 173 if (!hasAttribute(SVGNames::divisorAttr)) { 169 for (int i = 0; i < numberOfItems; ++i)170 divisorValue += kernelMatrix Values[i];174 for (int i = 0; i < kernelMatrixSize; ++i) 175 divisorValue += kernelMatrix.at(i); 171 176 if (!divisorValue) 172 177 divisorValue = 1; … … 176 181 IntSize(orderXValue, orderYValue), divisorValue, 177 182 bias(), IntPoint(targetXValue, targetYValue), static_cast<EdgeModeType>(edgeMode()), 178 FloatPoint(kernelUnitLengthX(), kernelUnitLengthX()), preserveAlpha(), kernelMatrix Values);183 FloatPoint(kernelUnitLengthX(), kernelUnitLengthX()), preserveAlpha(), kernelMatrix); 179 184 effect->inputEffects().append(input1); 180 185 return effect.release(); -
trunk/WebCore/svg/SVGFEConvolveMatrixElement.h
r70872 r70979 42 42 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*); 43 43 44 static const AtomicString& kernelUnitLengthXIdentifier(); 45 static const AtomicString& kernelUnitLengthYIdentifier(); 46 44 47 DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::inAttr, String, In1, in1) 45 48 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::orderXAttr, long, OrderX, orderX) 46 49 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::orderYAttr, long, OrderY, orderY) 47 DECLARE_ANIMATED_ PROPERTY(SVGFEConvolveMatrixElement, SVGNames::kernelMatrixAttr, SVGNumberList*, KernelMatrix, kernelMatrix)48 DECLARE_ANIMATED_ PROPERTY(SVGFEConvolveMatrixElement, SVGNames::divisorAttr, float, Divisor, divisor)49 DECLARE_ANIMATED_ PROPERTY(SVGFEConvolveMatrixElement, SVGNames::biasAttr, float, Bias, bias)50 DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::kernelMatrixAttr, SVGNumberList, KernelMatrix, kernelMatrix) 51 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::divisorAttr, float, Divisor, divisor) 52 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::biasAttr, float, Bias, bias) 50 53 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::targetXAttr, long, TargetX, targetX) 51 54 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::targetYAttr, long, TargetY, targetY) 52 55 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::operatorAttr, int, EdgeMode, edgeMode) 53 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, SVGKernelUnitLengthXIdentifier, float, KernelUnitLengthX, kernelUnitLengthX)54 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, SVGKernelUnitLengthYIdentifier, float, KernelUnitLengthY, kernelUnitLengthY)56 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthXIdentifier(), float, KernelUnitLengthX, kernelUnitLengthX) 57 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthYIdentifier(), float, KernelUnitLengthY, kernelUnitLengthY) 55 58 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::preserveAlphaAttr, bool, PreserveAlpha, preserveAlpha) 56 59 }; -
trunk/WebCore/svg/SVGFEDiffuseLightingElement.cpp
r70872 r70979 48 48 { 49 49 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX")); 50 return s_identifier; 50 return s_identifier; 51 51 } 52 52 … … 54 54 { 55 55 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthY")); 56 return s_identifier; 56 return s_identifier; 57 57 } 58 58 -
trunk/WebCore/svg/SVGFEDiffuseLightingElement.h
r70872 r70979 48 48 49 49 DECLARE_ANIMATED_PROPERTY(SVGFEDiffuseLightingElement, SVGNames::inAttr, String, In1, in1) 50 DECLARE_ANIMATED_ PROPERTY(SVGFEDiffuseLightingElement, SVGNames::diffuseConstantAttr, float, DiffuseConstant, diffuseConstant)51 DECLARE_ANIMATED_ PROPERTY(SVGFEDiffuseLightingElement, SVGNames::surfaceScaleAttr, float, SurfaceScale, surfaceScale)52 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFEDiffuseLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthXIdentifier(), float, KernelUnitLengthX, kernelUnitLengthX)53 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFEDiffuseLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthYIdentifier(), float, KernelUnitLengthY, kernelUnitLengthY)50 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDiffuseLightingElement, SVGNames::diffuseConstantAttr, float, DiffuseConstant, diffuseConstant) 51 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDiffuseLightingElement, SVGNames::surfaceScaleAttr, float, SurfaceScale, surfaceScale) 52 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEDiffuseLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthXIdentifier(), float, KernelUnitLengthX, kernelUnitLengthX) 53 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEDiffuseLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthYIdentifier(), float, KernelUnitLengthY, kernelUnitLengthY) 54 54 55 55 PassRefPtr<LightSource> findLights() const; -
trunk/WebCore/svg/SVGFEDisplacementMapElement.h
r70872 r70979 44 44 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDisplacementMapElement, SVGNames::xChannelSelectorAttr, int, XChannelSelector, xChannelSelector) 45 45 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDisplacementMapElement, SVGNames::yChannelSelectorAttr, int, YChannelSelector, yChannelSelector) 46 DECLARE_ANIMATED_ PROPERTY(SVGFEDisplacementMapElement, SVGNames::scaleAttr, float, Scale, scale)46 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDisplacementMapElement, SVGNames::scaleAttr, float, Scale, scale) 47 47 }; 48 48 -
trunk/WebCore/svg/SVGFEGaussianBlurElement.cpp
r70872 r70979 43 43 { 44 44 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGStdDeviationX")); 45 return s_identifier; 45 return s_identifier; 46 46 } 47 47 … … 49 49 { 50 50 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGStdDeviationY")); 51 return s_identifier; 51 return s_identifier; 52 52 } 53 53 -
trunk/WebCore/svg/SVGFEGaussianBlurElement.h
r70872 r70979 46 46 47 47 DECLARE_ANIMATED_PROPERTY(SVGFEGaussianBlurElement, SVGNames::inAttr, String, In1, in1) 48 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, stdDeviationXIdentifier(), float, StdDeviationX, stdDeviationX)49 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, stdDeviationYIdentifier(), float, StdDeviationY, stdDeviationY)48 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, stdDeviationXIdentifier(), float, StdDeviationX, stdDeviationX) 49 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, stdDeviationYIdentifier(), float, StdDeviationY, stdDeviationY) 50 50 }; 51 51 -
trunk/WebCore/svg/SVGFELightElement.h
r68022 r70979 25 25 #if ENABLE(SVG) && ENABLE(FILTERS) 26 26 #include "LightSource.h" 27 #include "SVGAnimatedPropertyMacros.h" 27 28 #include "SVGElement.h" 28 #include "SVGNames.h"29 29 30 30 namespace WebCore { … … 43 43 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 44 44 45 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::azimuthAttr, float, Azimuth, azimuth)46 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::elevationAttr, float, Elevation, elevation)47 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::xAttr, float, X, x)48 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::yAttr, float, Y, y)49 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::zAttr, float, Z, z)50 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::pointsAtXAttr, float, PointsAtX, pointsAtX)51 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::pointsAtYAttr, float, PointsAtY, pointsAtY)52 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::pointsAtZAttr, float, PointsAtZ, pointsAtZ)53 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::specularExponentAttr, float, SpecularExponent, specularExponent)54 DECLARE_ANIMATED_ PROPERTY(SVGFELightElement, SVGNames::limitingConeAngleAttr, float, LimitingConeAngle, limitingConeAngle)45 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::azimuthAttr, float, Azimuth, azimuth) 46 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::elevationAttr, float, Elevation, elevation) 47 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::xAttr, float, X, x) 48 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::yAttr, float, Y, y) 49 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::zAttr, float, Z, z) 50 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::pointsAtXAttr, float, PointsAtX, pointsAtX) 51 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::pointsAtYAttr, float, PointsAtY, pointsAtY) 52 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::pointsAtZAttr, float, PointsAtZ, pointsAtZ) 53 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::specularExponentAttr, float, SpecularExponent, specularExponent) 54 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFELightElement, SVGNames::limitingConeAngleAttr, float, LimitingConeAngle, limitingConeAngle) 55 55 }; 56 56 -
trunk/WebCore/svg/SVGFEMorphologyElement.cpp
r68168 r70979 29 29 namespace WebCore { 30 30 31 char SVGRadiusXAttrIdentifier[] = "SVGRadiusXAttr";32 char SVGRadiusYAttrIdentifier[] = "SVGRadiusYAttr";33 34 31 inline SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagName, Document* document) 35 32 : SVGFilterPrimitiveStandardAttributes(tagName, document) … … 41 38 { 42 39 return adoptRef(new SVGFEMorphologyElement(tagName, document)); 40 } 41 42 const AtomicString& SVGFEMorphologyElement::radiusXIdentifier() 43 { 44 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGRadiusX")); 45 return s_identifier; 46 } 47 48 const AtomicString& SVGFEMorphologyElement::radiusYIdentifier() 49 { 50 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGRadiusY")); 51 return s_identifier; 43 52 } 44 53 -
trunk/WebCore/svg/SVGFEMorphologyElement.h
r70872 r70979 27 27 namespace WebCore { 28 28 29 extern char SVGRadiusXAttrIdentifier[];30 extern char SVGRadiusYAttrIdentifier[];31 32 29 class SVGFEMorphologyElement : public SVGFilterPrimitiveStandardAttributes { 33 30 public: … … 49 46 DECLARE_ANIMATED_PROPERTY(SVGFEMorphologyElement, SVGNames::inAttr, String, In1, in1) 50 47 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEMorphologyElement, SVGNames::operatorAttr, int, _operator, _operator) 51 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFEMorphologyElement, SVGNames::radiusAttr, SVGRadiusXAttrIdentifier, float, RadiusX, radiusX)52 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFEMorphologyElement, SVGNames::radiusAttr, SVGRadiusYAttrIdentifier, float, RadiusY, radiusY)48 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEMorphologyElement, SVGNames::radiusAttr, radiusXIdentifier(), float, RadiusX, radiusX) 49 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEMorphologyElement, SVGNames::radiusAttr, radiusYIdentifier(), float, RadiusY, radiusY) 53 50 }; 54 51 -
trunk/WebCore/svg/SVGFEOffsetElement.h
r68022 r70979 41 41 42 42 DECLARE_ANIMATED_PROPERTY(SVGFEOffsetElement, SVGNames::inAttr, String, In1, in1) 43 DECLARE_ANIMATED_ PROPERTY(SVGFEOffsetElement, SVGNames::dxAttr, float, Dx, dx)44 DECLARE_ANIMATED_ PROPERTY(SVGFEOffsetElement, SVGNames::dyAttr, float, Dy, dy)43 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEOffsetElement, SVGNames::dxAttr, float, Dx, dx) 44 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEOffsetElement, SVGNames::dyAttr, float, Dy, dy) 45 45 }; 46 46 -
trunk/WebCore/svg/SVGFESpecularLightingElement.cpp
r70872 r70979 49 49 { 50 50 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX")); 51 return s_identifier; 51 return s_identifier; 52 52 } 53 53 … … 55 55 { 56 56 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthY")); 57 return s_identifier; 57 return s_identifier; 58 58 } 59 59 -
trunk/WebCore/svg/SVGFESpecularLightingElement.h
r70872 r70979 44 44 45 45 DECLARE_ANIMATED_PROPERTY(SVGFESpecularLightingElement, SVGNames::inAttr, String, In1, in1) 46 DECLARE_ANIMATED_ PROPERTY(SVGFESpecularLightingElement, SVGNames::specularConstantAttr, float, SpecularConstant, specularConstant)47 DECLARE_ANIMATED_ PROPERTY(SVGFESpecularLightingElement, SVGNames::specularExponentAttr, float, SpecularExponent, specularExponent)48 DECLARE_ANIMATED_ PROPERTY(SVGFESpecularLightingElement, SVGNames::surfaceScaleAttr, float, SurfaceScale, surfaceScale)49 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFESpecularLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthXIdentifier(), float, KernelUnitLengthX, kernelUnitLengthX)50 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFESpecularLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthYIdentifier(), float, KernelUnitLengthY, kernelUnitLengthY)46 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFESpecularLightingElement, SVGNames::specularConstantAttr, float, SpecularConstant, specularConstant) 47 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFESpecularLightingElement, SVGNames::specularExponentAttr, float, SpecularExponent, specularExponent) 48 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFESpecularLightingElement, SVGNames::surfaceScaleAttr, float, SurfaceScale, surfaceScale) 49 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFESpecularLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthXIdentifier(), float, KernelUnitLengthX, kernelUnitLengthX) 50 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFESpecularLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthYIdentifier(), float, KernelUnitLengthY, kernelUnitLengthY) 51 51 52 52 PassRefPtr<LightSource> findLights() const; -
trunk/WebCore/svg/SVGFETurbulenceElement.cpp
r70872 r70979 45 45 { 46 46 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGBaseFrequencyX")); 47 return s_identifier; 47 return s_identifier; 48 48 } 49 49 … … 51 51 { 52 52 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGBaseFrequencyY")); 53 return s_identifier; 53 return s_identifier; 54 54 } 55 55 -
trunk/WebCore/svg/SVGFETurbulenceElement.h
r70872 r70979 49 49 static const AtomicString& baseFrequencyYIdentifier(); 50 50 51 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, baseFrequencyXIdentifier(), float, BaseFrequencyX, baseFrequencyX)52 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, baseFrequencyYIdentifier(), float, BaseFrequencyY, baseFrequencyY)51 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, baseFrequencyXIdentifier(), float, BaseFrequencyX, baseFrequencyX) 52 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, baseFrequencyYIdentifier(), float, BaseFrequencyY, baseFrequencyY) 53 53 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFETurbulenceElement, SVGNames::numOctavesAttr, long, NumOctaves, numOctaves) 54 DECLARE_ANIMATED_ PROPERTY(SVGFETurbulenceElement, SVGNames::seedAttr, float, Seed, seed)54 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFETurbulenceElement, SVGNames::seedAttr, float, Seed, seed) 55 55 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFETurbulenceElement, SVGNames::stitchTilesAttr, int, StitchTiles, stitchTiles) 56 56 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFETurbulenceElement, SVGNames::typeAttr, int, Type, type) -
trunk/WebCore/svg/SVGFilterElement.cpp
r70872 r70979 64 64 { 65 65 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGFilterResX")); 66 return s_identifier; 66 return s_identifier; 67 67 } 68 68 … … 70 70 { 71 71 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGFilterResY")); 72 return s_identifier; 72 return s_identifier; 73 73 } 74 74 -
trunk/WebCore/svg/SVGMarkerElement.cpp
r70872 r70979 56 56 { 57 57 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGOrientType")); 58 return s_identifier; 58 return s_identifier; 59 59 } 60 60 … … 62 62 { 63 63 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGOrientAngle")); 64 return s_identifier; 64 return s_identifier; 65 65 } 66 66 -
trunk/WebCore/svg/SVGNumber.idl
r70410 r70979 23 23 module svg { 24 24 25 interface [Conditional=SVG , PODType=float] SVGNumber {26 attribute float value;25 interface [Conditional=SVG] SVGNumber { 26 attribute [StrictTypeChecking] float value; 27 27 }; 28 28 -
trunk/WebCore/svg/SVGNumberList.cpp
r66397 r70979 25 25 26 26 #include "SVGParserUtilities.h" 27 #include <wtf/text/StringBuilder.h> 27 28 28 29 namespace WebCore { 29 30 30 SVGNumberList::SVGNumberList(const QualifiedName& attributeName)31 : SVGPODList<float>(attributeName)32 {33 }34 35 31 void SVGNumberList::parse(const String& value) 36 32 { 37 ExceptionCode ec = 0; 38 clear(ec); 33 clear(); 39 34 40 float number = 0.0f; 41 35 float number = 0; 42 36 const UChar* ptr = value.characters(); 43 37 const UChar* end = ptr + value.length(); 38 44 39 // The spec strangely doesn't allow leading whitespace. We might choose to violate that intentionally. (section 4.1) 45 40 while (ptr < end) { 46 41 if (!parseNumber(ptr, end, number)) 47 42 return; 48 append Item(number, ec);43 append(number); 49 44 } 50 45 } … … 52 47 String SVGNumberList::valueAsString() const 53 48 { 54 String result;49 StringBuilder builder; 55 50 56 ExceptionCode ec = 0;57 for (unsigned i nt i = 0; i < numberOfItems(); ++i) {51 unsigned size = this->size(); 52 for (unsigned i = 0; i < size; ++i) { 58 53 if (i > 0) 59 result += ", ";54 builder.append(", "); 60 55 61 result += String::number(getItem(i, ec)); 62 ASSERT(ec == 0); 56 builder.append(String::number(at(i))); 63 57 } 64 58 65 return result;59 return builder.toString(); 66 60 } 67 61 -
trunk/WebCore/svg/SVGNumberList.h
r66397 r70979 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGList.h" 26 #include <wtf/Forward.h> 27 #include <wtf/PassRefPtr.h> 25 #include <wtf/Vector.h> 26 #include <wtf/text/WTFString.h> 28 27 29 28 namespace WebCore { 30 29 31 class SVGNumberList : public SVGPODList<float> {32 33 static PassRefPtr<SVGNumberList> create(const QualifiedName& attributeName) { return adoptRef(new SVGNumberList(attributeName));}30 class SVGNumberList : public Vector<float> { 31 public: 32 SVGNumberList() { } 34 33 35 void parse(const String& value); 36 37 String valueAsString() const; 38 39 private: 40 SVGNumberList(const QualifiedName&); 41 }; 34 void parse(const String&); 35 String valueAsString() const; 36 }; 42 37 43 38 } // namespace WebCore -
trunk/WebCore/svg/SVGPathElement.h
r70857 r70979 106 106 mutable RefPtr<SVGPathSegList> m_pathSegList; 107 107 108 DECLARE_ANIMATED_ PROPERTY(SVGPathElement, SVGNames::pathLengthAttr, float, PathLength, pathLength)108 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPathElement, SVGNames::pathLengthAttr, float, PathLength, pathLength) 109 109 110 110 // SVGExternalResourcesRequired -
trunk/WebCore/svg/SVGStopElement.h
r66397 r70979 23 23 24 24 #if ENABLE(SVG) 25 #include "SVG Names.h"25 #include "SVGAnimatedPropertyMacros.h" 26 26 #include "SVGStyledElement.h" 27 27 … … 45 45 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 46 46 47 DECLARE_ANIMATED_ PROPERTY(SVGStopElement, SVGNames::offsetAttr, float, Offset, offset)47 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGStopElement, SVGNames::offsetAttr, float, Offset, offset) 48 48 }; 49 49 -
trunk/WebCore/svg/SVGTextPositioningElement.cpp
r70223 r70979 35 35 SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagName, Document* document) 36 36 : SVGTextContentElement(tagName, document) 37 , m_rotate(SVGNumberList::create(SVGNames::rotateAttr))38 37 { 39 38 } … … 61 60 detachAnimatedDyListWrappers(newList.size()); 62 61 dyBaseValue() = newList; 63 } else if (attr->name() == SVGNames::rotateAttr) 64 rotateBaseValue()->parse(attr->value()); 65 else 62 } else if (attr->name() == SVGNames::rotateAttr) { 63 SVGNumberList newList; 64 newList.parse(attr->value()); 65 detachAnimatedRotateListWrappers(newList.size()); 66 rotateBaseValue() = newList; 67 } else 66 68 SVGTextContentElement::parseMappedAttribute(attr); 67 69 } -
trunk/WebCore/svg/SVGTextPositioningElement.h
r70223 r70979 47 47 DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::dxAttr, SVGLengthList, Dx, dx) 48 48 DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::dyAttr, SVGLengthList, Dy, dy) 49 DECLARE_ANIMATED_ PROPERTY(SVGTextPositioningElement, SVGNames::rotateAttr, SVGNumberList*, Rotate, rotate)49 DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::rotateAttr, SVGNumberList, Rotate, rotate) 50 50 }; 51 51 -
trunk/WebCore/svg/properties/SVGPropertyTraits.h
r70303 r70979 27 27 #include "SVGLength.h" 28 28 #include "SVGLengthList.h" 29 #include "SVGNumberList.h" 29 30 #include "SVGPreserveAspectRatio.h" 30 31 #include <wtf/text/StringBuilder.h> … … 80 81 81 82 template<> 83 struct SVGPropertyTraits<SVGNumberList> { 84 typedef float ListItemType; 85 86 static SVGNumberList initialValue() { return SVGNumberList(); } 87 static String toString(const SVGNumberList& type) { return type.valueAsString(); } 88 }; 89 90 template<> 82 91 struct SVGPropertyTraits<SVGPreserveAspectRatio> { 83 92 static SVGPreserveAspectRatio initialValue() { return SVGPreserveAspectRatio(); }
Note: See TracChangeset
for help on using the changeset viewer.