Changeset 192787 in webkit
- Timestamp:
- Nov 29, 2015 10:47:08 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r192783 r192787 1 2015-11-29 Simon Fraser <simon.fraser@apple.com> 2 3 Use SVGTransform::SVGTransformType instead of an unsigned short 4 https://bugs.webkit.org/show_bug.cgi?id=151637 5 6 Reviewed by Brady Eidson. 7 8 Make 'type' more strongly typed. 9 10 * svg/SVGTransformable.cpp: 11 (WebCore::SVGTransformable::parseTransformValue): 12 (WebCore::parseAndSkipType): 13 (WebCore::SVGTransformable::parseTransformType): 14 (WebCore::SVGTransformable::parseTransformAttribute): 15 * svg/SVGTransformable.h: 16 1 17 2015-11-27 Brady Eidson <beidson@apple.com> 2 18 -
trunk/Source/WebCore/svg/SVGTransformable.cpp
r165848 r192787 94 94 } 95 95 96 bool SVGTransformable::parseTransformValue( unsignedtype, const UChar*& ptr, const UChar* end, SVGTransform& transform)96 bool SVGTransformable::parseTransformValue(SVGTransform::SVGTransformType type, const UChar*& ptr, const UChar* end, SVGTransform& transform) 97 97 { 98 98 if (type == SVGTransform::SVG_TRANSFORM_UNKNOWN) … … 105 105 106 106 switch (type) { 107 case SVGTransform::SVG_TRANSFORM_UNKNOWN: 108 ASSERT_NOT_REACHED(); 109 break; 107 110 case SVGTransform::SVG_TRANSFORM_SKEWX: 108 111 transform.setSkewX(values[0]); … … 144 147 static const UChar matrixDesc[] = {'m', 'a', 't', 'r', 'i', 'x'}; 145 148 146 static inline bool parseAndSkipType(const UChar*& currTransform, const UChar* end, unsigned short& type)149 static inline bool parseAndSkipType(const UChar*& currTransform, const UChar* end, SVGTransform::SVGTransformType& type) 147 150 { 148 151 if (currTransform >= end) … … 172 175 SVGTransform::SVGTransformType SVGTransformable::parseTransformType(const String& typeString) 173 176 { 174 unsigned shorttype = SVGTransform::SVG_TRANSFORM_UNKNOWN;177 SVGTransform::SVGTransformType type = SVGTransform::SVG_TRANSFORM_UNKNOWN; 175 178 auto upconvertedCharacters = StringView(typeString).upconvertedCharacters(); 176 179 const UChar* characters = upconvertedCharacters; … … 187 190 while (currTransform < end) { 188 191 delimParsed = false; 189 unsigned shorttype = SVGTransform::SVG_TRANSFORM_UNKNOWN;192 SVGTransform::SVGTransformType type = SVGTransform::SVG_TRANSFORM_UNKNOWN; 190 193 skipOptionalSVGSpaces(currTransform, end); 191 194 -
trunk/Source/WebCore/svg/SVGTransformable.h
r163440 r192787 41 41 42 42 static bool parseTransformAttribute(SVGTransformList&, const UChar*& ptr, const UChar* end, TransformParsingMode mode = ClearList); 43 static bool parseTransformValue( unsigned type, const UChar*& ptr, const UChar* end, SVGTransform&);43 static bool parseTransformValue(SVGTransform::SVGTransformType, const UChar*& ptr, const UChar* end, SVGTransform&); 44 44 static SVGTransform::SVGTransformType parseTransformType(const String&); 45 45
Note: See TracChangeset
for help on using the changeset viewer.