| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 ellipse->setRadiusY(cssValueToBasicShapeRadius(state, ellipseValue->radi
usY())); | 229 ellipse->setRadiusY(cssValueToBasicShapeRadius(state, ellipseValue->radi
usY())); |
| 230 | 230 |
| 231 basicShape = ellipse.release(); | 231 basicShape = ellipse.release(); |
| 232 break; | 232 break; |
| 233 } | 233 } |
| 234 case CSSBasicShape::CSSBasicShapePolygonType: { | 234 case CSSBasicShape::CSSBasicShapePolygonType: { |
| 235 const CSSBasicShapePolygon* polygonValue = toCSSBasicShapePolygon(basicS
hapeValue); | 235 const CSSBasicShapePolygon* polygonValue = toCSSBasicShapePolygon(basicS
hapeValue); |
| 236 RefPtr<BasicShapePolygon> polygon = BasicShapePolygon::create(); | 236 RefPtr<BasicShapePolygon> polygon = BasicShapePolygon::create(); |
| 237 | 237 |
| 238 polygon->setWindRule(polygonValue->windRule()); | 238 polygon->setWindRule(polygonValue->windRule()); |
| 239 const WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue> >& values =
polygonValue->values(); | 239 const WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>>& values =
polygonValue->values(); |
| 240 for (unsigned i = 0; i < values.size(); i += 2) | 240 for (unsigned i = 0; i < values.size(); i += 2) |
| 241 polygon->appendPoint(convertToLength(state, values.at(i).get()), con
vertToLength(state, values.at(i + 1).get())); | 241 polygon->appendPoint(convertToLength(state, values.at(i).get()), con
vertToLength(state, values.at(i + 1).get())); |
| 242 | 242 |
| 243 basicShape = polygon.release(); | 243 basicShape = polygon.release(); |
| 244 break; | 244 break; |
| 245 } | 245 } |
| 246 case CSSBasicShape::CSSBasicShapeInsetType: { | 246 case CSSBasicShape::CSSBasicShapeInsetType: { |
| 247 const CSSBasicShapeInset* rectValue = toCSSBasicShapeInset(basicShapeVal
ue); | 247 const CSSBasicShapeInset* rectValue = toCSSBasicShapeInset(basicShapeVal
ue); |
| 248 RefPtr<BasicShapeInset> rect = BasicShapeInset::create(); | 248 RefPtr<BasicShapeInset> rect = BasicShapeInset::create(); |
| 249 | 249 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 268 } | 268 } |
| 269 | 269 |
| 270 FloatPoint floatPointForCenterCoordinate(const BasicShapeCenterCoordinate& cente
rX, const BasicShapeCenterCoordinate& centerY, FloatSize boxSize) | 270 FloatPoint floatPointForCenterCoordinate(const BasicShapeCenterCoordinate& cente
rX, const BasicShapeCenterCoordinate& centerY, FloatSize boxSize) |
| 271 { | 271 { |
| 272 float x = floatValueForLength(centerX.computedLength(), boxSize.width()); | 272 float x = floatValueForLength(centerX.computedLength(), boxSize.width()); |
| 273 float y = floatValueForLength(centerY.computedLength(), boxSize.height()); | 273 float y = floatValueForLength(centerY.computedLength(), boxSize.height()); |
| 274 return FloatPoint(x, y); | 274 return FloatPoint(x, y); |
| 275 } | 275 } |
| 276 | 276 |
| 277 } | 277 } |
| OLD | NEW |