| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 for (unsigned i = 0; i < values.size(); i += 2) | 101 for (unsigned i = 0; i < values.size(); i += 2) |
| 102 polygonValue->appendPoint(pool.createValue(values.at(i), style), poo
l.createValue(values.at(i + 1), style)); | 102 polygonValue->appendPoint(pool.createValue(values.at(i), style), poo
l.createValue(values.at(i + 1), style)); |
| 103 | 103 |
| 104 basicShapeValue = polygonValue.release(); | 104 basicShapeValue = polygonValue.release(); |
| 105 break; | 105 break; |
| 106 } | 106 } |
| 107 case BasicShape::BasicShapeInsetType: { | 107 case BasicShape::BasicShapeInsetType: { |
| 108 const BasicShapeInset* inset = static_cast<const BasicShapeInset*>(basic
Shape); | 108 const BasicShapeInset* inset = static_cast<const BasicShapeInset*>(basic
Shape); |
| 109 RefPtrWillBeRawPtr<CSSBasicShapeInset> insetValue = CSSBasicShapeInset::
create(); | 109 RefPtrWillBeRawPtr<CSSBasicShapeInset> insetValue = CSSBasicShapeInset::
create(); |
| 110 | 110 |
| 111 insetValue->setTop(CSSPrimitiveValue::create(inset->top())); | 111 insetValue->setTop(pool.createValue(inset->top(), style)); |
| 112 insetValue->setRight(CSSPrimitiveValue::create(inset->right())); | 112 insetValue->setRight(pool.createValue(inset->right(), style)); |
| 113 insetValue->setBottom(CSSPrimitiveValue::create(inset->bottom())); | 113 insetValue->setBottom(pool.createValue(inset->bottom(), style)); |
| 114 insetValue->setLeft(CSSPrimitiveValue::create(inset->left())); | 114 insetValue->setLeft(pool.createValue(inset->left(), style)); |
| 115 | 115 |
| 116 insetValue->setTopLeftRadius(CSSPrimitiveValue::create(inset->topLeftRad
ius())); | 116 insetValue->setTopLeftRadius(CSSPrimitiveValue::create(inset->topLeftRad
ius())); |
| 117 insetValue->setTopRightRadius(CSSPrimitiveValue::create(inset->topRightR
adius())); | 117 insetValue->setTopRightRadius(CSSPrimitiveValue::create(inset->topRightR
adius())); |
| 118 insetValue->setBottomRightRadius(CSSPrimitiveValue::create(inset->bottom
RightRadius())); | 118 insetValue->setBottomRightRadius(CSSPrimitiveValue::create(inset->bottom
RightRadius())); |
| 119 insetValue->setBottomLeftRadius(CSSPrimitiveValue::create(inset->bottomL
eftRadius())); | 119 insetValue->setBottomLeftRadius(CSSPrimitiveValue::create(inset->bottomL
eftRadius())); |
| 120 | 120 |
| 121 basicShapeValue = insetValue.release(); | 121 basicShapeValue = insetValue.release(); |
| 122 break; | 122 break; |
| 123 } | 123 } |
| 124 default: | 124 default: |
| (...skipping 146 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 |