Changeset 73011 in webkit
- Timestamp:
- Dec 1, 2010 12:57:20 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 1 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r73008 r73011 1 2010-12-01 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Dirk Schulze. 4 5 Cleanup SVGPropertyTraits 6 https://bugs.webkit.org/show_bug.cgi?id=50229 7 8 Move all template specializations for non-POD types (eg. SVGLength, SVGLengthList, etc.) from SVGPropertyTraits 9 into the right SVG* classes, to avoid having to include a dozen SVG*.h files in SVGPropertyTraits.h, which is 10 included by all DOM/JS/V8 binding files and SVGElement.h. 11 12 No new functionality, thus no new tests. 13 14 * GNUmakefile.am: 15 * WebCore.gypi: 16 * WebCore.pro: 17 * WebCore.xcodeproj/project.pbxproj: 18 * bindings/scripts/CodeGenerator.pm: 19 * bindings/scripts/CodeGeneratorObjC.pm: 20 * bindings/scripts/CodeGeneratorV8.pm: 21 * svg/SVGAngle.h: 22 * svg/SVGLength.h: 23 * svg/SVGLengthList.h: 24 * svg/SVGMarkerElement.h: 25 * svg/SVGNumberList.h: 26 * svg/SVGPatternElement.h: 27 * svg/SVGPointList.h: 28 * svg/SVGPreserveAspectRatio.h: 29 * svg/SVGRect.h: Added. 30 * svg/SVGSVGElement.h: 31 * svg/SVGStringList.h: 32 * svg/SVGSymbolElement.h: 33 * svg/SVGTransformList.h: 34 * svg/SVGViewElement.h: 35 * svg/SVGViewSpec.h: 36 * svg/properties/SVGListProperty.h: 37 * svg/properties/SVGPropertyTraits.h: 38 * svg/properties/SVGTransformListPropertyTearOff.h: 39 1 40 2010-11-30 Kent Tamura <tkent@chromium.org> 2 41 -
trunk/WebCore/GNUmakefile.am
r72887 r73011 3359 3359 WebCore/svg/SVGRadialGradientElement.cpp \ 3360 3360 WebCore/svg/SVGRadialGradientElement.h \ 3361 WebCore/svg/SVGRect.h \ 3361 3362 WebCore/svg/SVGRectElement.cpp \ 3362 3363 WebCore/svg/SVGRectElement.h \ -
trunk/WebCore/WebCore.gypi
r72887 r73011 4252 4252 'svg/SVGRadialGradientElement.cpp', 4253 4253 'svg/SVGRadialGradientElement.h', 4254 'svg/SVGRect.h', 4254 4255 'svg/SVGRectElement.cpp', 4255 4256 'svg/SVGRectElement.h', -
trunk/WebCore/WebCore.pro
r72948 r73011 2514 2514 svg/SVGPreserveAspectRatio.h \ 2515 2515 svg/SVGRadialGradientElement.h \ 2516 svg/SVGRect.h \ 2516 2517 svg/SVGRectElement.h \ 2517 2518 svg/SVGScriptElement.h \ -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r72887 r73011 258 258 08E6E0F10EFF42BA00029FBF /* WMLFieldSetElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E6E0EF0EFF42BA00029FBF /* WMLFieldSetElement.cpp */; }; 259 259 08E6E0F20EFF42BA00029FBF /* WMLFieldSetElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E6E0F00EFF42BA00029FBF /* WMLFieldSetElement.h */; }; 260 08EDE19F12A50B8E00B95797 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08EDE19E12A50B8E00B95797 /* SVGRect.h */; }; 260 261 08F0BFC21255C53C00075185 /* SVGTextChunk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08F0BFBD1255C53C00075185 /* SVGTextChunk.cpp */; }; 261 262 08F0BFC31255C53C00075185 /* SVGTextChunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 08F0BFBE1255C53C00075185 /* SVGTextChunk.h */; }; … … 6312 6313 08E6E0EF0EFF42BA00029FBF /* WMLFieldSetElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLFieldSetElement.cpp; sourceTree = "<group>"; }; 6313 6314 08E6E0F00EFF42BA00029FBF /* WMLFieldSetElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLFieldSetElement.h; sourceTree = "<group>"; }; 6315 08EDE19E12A50B8E00B95797 /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = "<group>"; }; 6314 6316 08F0BFBD1255C53C00075185 /* SVGTextChunk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTextChunk.cpp; sourceTree = "<group>"; }; 6315 6317 08F0BFBE1255C53C00075185 /* SVGTextChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextChunk.h; sourceTree = "<group>"; }; … … 16513 16515 B22279040D00BF210071B782 /* SVGRadialGradientElement.h */, 16514 16516 B22279050D00BF210071B782 /* SVGRadialGradientElement.idl */, 16517 08EDE19E12A50B8E00B95797 /* SVGRect.h */, 16515 16518 B22279060D00BF210071B782 /* SVGRect.idl */, 16516 16519 B22279070D00BF210071B782 /* SVGRectElement.cpp */, … … 21434 21437 2E97CCEB12939CB800C5C8FF /* DataView.h in Headers */, 21435 21438 2E97CE701293AD6B00C5C8FF /* JSDataView.h in Headers */, 21439 08EDE19F12A50B8E00B95797 /* SVGRect.h in Headers */, 21436 21440 ); 21437 21441 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/bindings/scripts/CodeGenerator.pm
r72381 r73011 309 309 my $type = shift; 310 310 311 # Special case: SVG Rect.h / SVGPoint.h / SVGNumber.h do not exist.312 return 1 if $type eq "SVG Rect" or $type eq "SVGPoint" or $type eq "SVGNumber";311 # Special case: SVGPoint.h / SVGNumber.h do not exist. 312 return 1 if $type eq "SVGPoint" or $type eq "SVGNumber"; 313 313 return 0; 314 314 } -
trunk/WebCore/bindings/scripts/CodeGeneratorObjC.pm
r72941 r73011 1303 1303 if ($codeGenerator->IsSVGTypeNeedingTearOff($type) and not $implClassName =~ /List$/) { 1304 1304 my $idlTypeWithNamespace = GetSVGTypeWithNamespace($type); 1305 $implIncludes{"$type.h"} = 1 if not $codeGenerator->AvoidInclusionOfType($type); 1305 1306 if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) { 1306 1307 $idlTypeWithNamespace =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassNameWithNamespace, /; -
trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm
r72948 r73011 2905 2905 } 2906 2906 2907 if ($type eq "SVGRect") {2908 $implIncludes{"FloatRect.h"} = 1;2909 }2910 2911 2907 if ($type eq "MediaQueryListListener") { 2912 2908 $implIncludes{"MediaQueryListListener.h"} = 1; -
trunk/WebCore/svg/SVGAngle.h
r70410 r73011 25 25 #if ENABLE(SVG) 26 26 #include "ExceptionCode.h" 27 #include <wtf/text/WTFString.h>27 #include "SVGPropertyTraits.h" 28 28 29 29 namespace WebCore { … … 60 60 }; 61 61 62 template<> 63 struct SVGPropertyTraits<SVGAngle> { 64 static SVGAngle initialValue() { return SVGAngle(); } 65 static String toString(const SVGAngle& type) { return type.valueAsString(); } 66 }; 67 62 68 } // namespace WebCore 63 69 -
trunk/WebCore/svg/SVGLength.h
r71014 r73011 24 24 #if ENABLE(SVG) 25 25 #include "ExceptionCode.h" 26 #include <wtf/text/WTFString.h>26 #include "SVGPropertyTraits.h" 27 27 28 28 namespace WebCore { … … 119 119 }; 120 120 121 template<> 122 struct SVGPropertyTraits<SVGLength> { 123 static SVGLength initialValue() { return SVGLength(); } 124 static String toString(const SVGLength& type) { return type.valueAsString(); } 125 }; 126 127 121 128 } // namespace WebCore 122 129 -
trunk/WebCore/svg/SVGLengthList.h
r70223 r73011 36 36 }; 37 37 38 template<> 39 struct SVGPropertyTraits<SVGLengthList> { 40 typedef SVGLength ListItemType; 41 42 static SVGLengthList initialValue() { return SVGLengthList(); } 43 static String toString(const SVGLengthList& type) { return type.valueAsString(); } 44 }; 45 38 46 } // namespace WebCore 39 47 -
trunk/WebCore/svg/SVGMarkerElement.h
r71103 r73011 30 30 #include "SVGFitToViewBox.h" 31 31 #include "SVGLangSpace.h" 32 #include "SVGPreserveAspectRatio.h" 33 #include "SVGRect.h" 32 34 #include "SVGStyledElement.h" 33 35 -
trunk/WebCore/svg/SVGNumberList.h
r70979 r73011 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGPropertyTraits.h" 25 26 #include <wtf/Vector.h> 26 #include <wtf/text/WTFString.h>27 27 28 28 namespace WebCore { … … 36 36 }; 37 37 38 template<> 39 struct SVGPropertyTraits<SVGNumberList> { 40 typedef float ListItemType; 41 42 static SVGNumberList initialValue() { return SVGNumberList(); } 43 static String toString(const SVGNumberList& type) { return type.valueAsString(); } 44 }; 45 38 46 } // namespace WebCore 39 47 -
trunk/WebCore/svg/SVGPatternElement.h
r71802 r73011 29 29 #include "SVGFitToViewBox.h" 30 30 #include "SVGLangSpace.h" 31 #include "SVGPreserveAspectRatio.h" 32 #include "SVGRect.h" 31 33 #include "SVGStyledElement.h" 32 34 #include "SVGTests.h" -
trunk/WebCore/svg/SVGPointList.h
r71512 r73011 24 24 #if ENABLE(SVG) 25 25 #include "QualifiedName.h" 26 #include "SVGPropertyTraits.h" 26 27 #include <wtf/Vector.h> 27 #include <wtf/text/WTFString.h>28 28 29 29 namespace WebCore { … … 40 40 }; 41 41 42 template<> 43 struct SVGPropertyTraits<SVGPointList> { 44 static SVGPointList initialValue() { return SVGPointList(); } 45 typedef FloatPoint ListItemType; 46 }; 47 42 48 } // namespace WebCore 43 49 -
trunk/WebCore/svg/SVGPreserveAspectRatio.h
r71103 r73011 24 24 #if ENABLE(SVG) 25 25 #include "ExceptionCode.h" 26 #include <wtf/text/WTFString.h>26 #include "SVGPropertyTraits.h" 27 27 28 28 namespace WebCore { … … 87 87 }; 88 88 89 template<> 90 struct SVGPropertyTraits<SVGPreserveAspectRatio> { 91 static SVGPreserveAspectRatio initialValue() { return SVGPreserveAspectRatio(); } 92 static String toString(const SVGPreserveAspectRatio& type) { return type.valueAsString(); } 93 }; 94 89 95 } // namespace WebCore 90 96 -
trunk/WebCore/svg/SVGSVGElement.h
r71802 r73011 29 29 #include "SVGFitToViewBox.h" 30 30 #include "SVGLangSpace.h" 31 #include "SVGPreserveAspectRatio.h" 32 #include "SVGRect.h" 31 33 #include "SVGStyledLocatableElement.h" 32 34 #include "SVGTests.h" -
trunk/WebCore/svg/SVGStringList.h
r72518 r73011 24 24 #if ENABLE(SVG) 25 25 #include "QualifiedName.h" 26 #include "SVGPropertyTraits.h" 26 27 #include <wtf/Vector.h> 27 #include <wtf/text/WTFString.h>28 28 29 29 namespace WebCore { … … 50 50 }; 51 51 52 template<> 53 struct SVGPropertyTraits<SVGStringList> { 54 typedef String ListItemType; 55 }; 56 52 57 } // namespace WebCore 53 58 -
trunk/WebCore/svg/SVGSymbolElement.h
r71103 r73011 27 27 #include "SVGFitToViewBox.h" 28 28 #include "SVGLangSpace.h" 29 #include "SVGPreserveAspectRatio.h" 30 #include "SVGRect.h" 29 31 #include "SVGStyledElement.h" 30 32 -
trunk/WebCore/svg/SVGTransformList.h
r71802 r73011 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGPropertyTraits.h" 25 26 #include "SVGTransform.h" 26 27 #include <wtf/Vector.h> 27 #include <wtf/text/WTFString.h>28 28 29 29 namespace WebCore { … … 42 42 }; 43 43 44 template<> 45 struct SVGPropertyTraits<SVGTransformList> { 46 static SVGTransformList initialValue() { return SVGTransformList(); } 47 static String toString(const SVGTransformList& type) { return type.valueAsString(); } 48 typedef SVGTransform ListItemType; 49 }; 50 44 51 } // namespace WebCore 45 52 -
trunk/WebCore/svg/SVGViewElement.h
r71227 r73011 24 24 #if ENABLE(SVG) 25 25 #include "SVGAnimatedPropertyMacros.h" 26 #include "SVGExternalResourcesRequired.h" 27 #include "SVGFitToViewBox.h" 28 #include "SVGPreserveAspectRatio.h" 29 #include "SVGRect.h" 26 30 #include "SVGStringList.h" 27 31 #include "SVGStyledElement.h" 28 #include "SVGExternalResourcesRequired.h"29 #include "SVGFitToViewBox.h"30 32 #include "SVGZoomAndPan.h" 31 33 -
trunk/WebCore/svg/SVGViewSpec.h
r71802 r73011 25 25 #include "SVGElement.h" 26 26 #include "SVGFitToViewBox.h" 27 #include "SVGPreserveAspectRatio.h" 28 #include "SVGRect.h" 27 29 #include "SVGZoomAndPan.h" 28 30 -
trunk/WebCore/svg/properties/SVGListProperty.h
r72518 r73011 22 22 23 23 #if ENABLE(SVG) 24 #include "ExceptionCode.h"25 24 #include "SVGAnimatedProperty.h" 25 #include "SVGException.h" 26 26 #include "SVGPropertyTearOff.h" 27 27 #include "SVGPropertyTraits.h" -
trunk/WebCore/svg/properties/SVGPropertyTraits.h
r71802 r73011 23 23 24 24 #if ENABLE(SVG) 25 #include "FloatRect.h" 26 #include "SVGAngle.h" 27 #include "SVGLength.h" 28 #include "SVGLengthList.h" 29 #include "SVGNumberList.h" 30 #include "SVGPointList.h" 31 #include "SVGPreserveAspectRatio.h" 32 #include "SVGStringList.h" 33 #include "SVGTransformList.h" 34 #include <wtf/text/StringBuilder.h> 25 #include <wtf/text/WTFString.h> 35 26 36 27 namespace WebCore { … … 38 29 template<typename PropertyType> 39 30 struct SVGPropertyTraits { }; 40 41 template<>42 struct SVGPropertyTraits<SVGAngle> {43 static SVGAngle initialValue() { return SVGAngle(); }44 static String toString(const SVGAngle& type) { return type.valueAsString(); }45 };46 31 47 32 template<> … … 64 49 65 50 template<> 66 struct SVGPropertyTraits<SVGLength> {67 static SVGLength initialValue() { return SVGLength(); }68 static String toString(const SVGLength& type) { return type.valueAsString(); }69 };70 71 template<>72 struct SVGPropertyTraits<SVGLengthList> {73 typedef SVGLength ListItemType;74 75 static SVGLengthList initialValue() { return SVGLengthList(); }76 static String toString(const SVGLengthList& type) { return type.valueAsString(); }77 };78 79 template<>80 51 struct SVGPropertyTraits<float> { 81 52 static float initialValue() { return 0; } 82 53 static String toString(float type) { return String::number(type); } 83 };84 85 template<>86 struct SVGPropertyTraits<SVGNumberList> {87 typedef float ListItemType;88 89 static SVGNumberList initialValue() { return SVGNumberList(); }90 static String toString(const SVGNumberList& type) { return type.valueAsString(); }91 };92 93 template<>94 struct SVGPropertyTraits<SVGPreserveAspectRatio> {95 static SVGPreserveAspectRatio initialValue() { return SVGPreserveAspectRatio(); }96 static String toString(const SVGPreserveAspectRatio& type) { return type.valueAsString(); }97 };98 99 template<>100 struct SVGPropertyTraits<FloatRect> {101 static FloatRect initialValue() { return FloatRect(); }102 static String toString(const FloatRect& type)103 {104 StringBuilder builder;105 builder.append(String::number(type.x()));106 builder.append(' ');107 builder.append(String::number(type.y()));108 builder.append(' ');109 builder.append(String::number(type.width()));110 builder.append(' ');111 builder.append(String::number(type.height()));112 builder.append(' ');113 return builder.toString();114 }115 54 }; 116 55 … … 121 60 }; 122 61 123 template<>124 struct SVGPropertyTraits<SVGStringList> {125 typedef String ListItemType;126 };127 128 template<>129 struct SVGPropertyTraits<SVGPointList> {130 static SVGPointList initialValue() { return SVGPointList(); }131 typedef FloatPoint ListItemType;132 };133 134 template<>135 struct SVGPropertyTraits<SVGTransformList> {136 static SVGTransformList initialValue() { return SVGTransformList(); }137 static String toString(const SVGTransformList& type) { return type.valueAsString(); }138 typedef SVGTransform ListItemType;139 };140 141 62 } 142 63 -
trunk/WebCore/svg/properties/SVGTransformListPropertyTearOff.h
r72400 r73011 23 23 #if ENABLE(SVG) 24 24 #include "SVGListPropertyTearOff.h" 25 #include "SVGTransformList.h" 25 26 26 27 namespace WebCore {
Note: See TracChangeset
for help on using the changeset viewer.