| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 62 } |
| 63 | 63 |
| 64 ASSERT_NOT_REACHED(); | 64 ASSERT_NOT_REACHED(); |
| 65 return nullptr; | 65 return nullptr; |
| 66 } | 66 } |
| 67 | 67 |
| 68 PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co
nst BasicShape* basicShape) | 68 PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co
nst BasicShape* basicShape) |
| 69 { | 69 { |
| 70 CSSValuePool& pool = cssValuePool(); | 70 CSSValuePool& pool = cssValuePool(); |
| 71 | 71 |
| 72 RefPtrWillBeRawPtr<CSSBasicShape> basicShapeValue; | 72 RefPtrWillBeRawPtr<CSSBasicShape> basicShapeValue = nullptr; |
| 73 switch (basicShape->type()) { | 73 switch (basicShape->type()) { |
| 74 case BasicShape::BasicShapeCircleType: { | 74 case BasicShape::BasicShapeCircleType: { |
| 75 const BasicShapeCircle* circle = static_cast<const BasicShapeCircle*>(ba
sicShape); | 75 const BasicShapeCircle* circle = static_cast<const BasicShapeCircle*>(ba
sicShape); |
| 76 RefPtrWillBeRawPtr<CSSBasicShapeCircle> circleValue = CSSBasicShapeCircl
e::create(); | 76 RefPtrWillBeRawPtr<CSSBasicShapeCircle> circleValue = CSSBasicShapeCircl
e::create(); |
| 77 | 77 |
| 78 circleValue->setCenterX(valueForCenterCoordinate(pool, style, circle->ce
nterX(), HORIZONTAL)); | 78 circleValue->setCenterX(valueForCenterCoordinate(pool, style, circle->ce
nterX(), HORIZONTAL)); |
| 79 circleValue->setCenterY(valueForCenterCoordinate(pool, style, circle->ce
nterY(), VERTICAL)); | 79 circleValue->setCenterY(valueForCenterCoordinate(pool, style, circle->ce
nterY(), VERTICAL)); |
| 80 circleValue->setRadius(basicShapeRadiusToCSSValue(pool, style, circle->r
adius())); | 80 circleValue->setRadius(basicShapeRadiusToCSSValue(pool, style, circle->r
adius())); |
| 81 basicShapeValue = circleValue.release(); | 81 basicShapeValue = circleValue.release(); |
| 82 break; | 82 break; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 { | 271 { |
| 272 FloatPoint p; | 272 FloatPoint p; |
| 273 float offset = floatValueForLength(centerX.length(), boxSize.width()); | 273 float offset = floatValueForLength(centerX.length(), boxSize.width()); |
| 274 p.setX(centerX.direction() == BasicShapeCenterCoordinate::TopLeft ? offset :
boxSize.width() - offset); | 274 p.setX(centerX.direction() == BasicShapeCenterCoordinate::TopLeft ? offset :
boxSize.width() - offset); |
| 275 offset = floatValueForLength(centerY.length(), boxSize.height()); | 275 offset = floatValueForLength(centerY.length(), boxSize.height()); |
| 276 p.setY(centerY.direction() == BasicShapeCenterCoordinate::TopLeft ? offset :
boxSize.height() - offset); | 276 p.setY(centerY.direction() == BasicShapeCenterCoordinate::TopLeft ? offset :
boxSize.height() - offset); |
| 277 return p; | 277 return p; |
| 278 } | 278 } |
| 279 | 279 |
| 280 } | 280 } |
| OLD | NEW |