| Index: third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.cpp b/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.cpp
|
| index 063f20c325f275817a7cb2ee7a8b78e6b49198aa..86a00ecb36c1d5961243beb12112c4b4995bca82 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.cpp
|
| @@ -331,53 +331,60 @@ AffineTransform SVGPreserveAspectRatio::getCTM(float logicalX, float logicalY, f
|
|
|
| String SVGPreserveAspectRatio::valueAsString() const
|
| {
|
| - String alignType;
|
| + StringBuilder builder;
|
|
|
| + const char* alignString = "";
|
| switch (m_align) {
|
| case SVG_PRESERVEASPECTRATIO_NONE:
|
| - alignType = "none";
|
| + alignString = "none";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_XMINYMIN:
|
| - alignType = "xMinYMin";
|
| + alignString = "xMinYMin";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_XMIDYMIN:
|
| - alignType = "xMidYMin";
|
| + alignString = "xMidYMin";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_XMAXYMIN:
|
| - alignType = "xMaxYMin";
|
| + alignString = "xMaxYMin";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_XMINYMID:
|
| - alignType = "xMinYMid";
|
| + alignString = "xMinYMid";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_XMIDYMID:
|
| - alignType = "xMidYMid";
|
| + alignString = "xMidYMid";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_XMAXYMID:
|
| - alignType = "xMaxYMid";
|
| + alignString = "xMaxYMid";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_XMINYMAX:
|
| - alignType = "xMinYMax";
|
| + alignString = "xMinYMax";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_XMIDYMAX:
|
| - alignType = "xMidYMax";
|
| + alignString = "xMidYMax";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_XMAXYMAX:
|
| - alignType = "xMaxYMax";
|
| + alignString = "xMaxYMax";
|
| break;
|
| case SVG_PRESERVEASPECTRATIO_UNKNOWN:
|
| - alignType = "unknown";
|
| + alignString = "unknown";
|
| break;
|
| - };
|
| + }
|
| + builder.append(alignString);
|
|
|
| + const char* meetOrSliceString = "";
|
| switch (m_meetOrSlice) {
|
| default:
|
| case SVG_MEETORSLICE_UNKNOWN:
|
| - return alignType;
|
| + break;
|
| case SVG_MEETORSLICE_MEET:
|
| - return alignType + " meet";
|
| + meetOrSliceString = " meet";
|
| + break;
|
| case SVG_MEETORSLICE_SLICE:
|
| - return alignType + " slice";
|
| + meetOrSliceString = " slice";
|
| + break;
|
| }
|
| + builder.append(meetOrSliceString);
|
| + return builder.toString();
|
| }
|
|
|
| void SVGPreserveAspectRatio::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)
|
|
|