| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 314 } |
| 315 default: | 315 default: |
| 316 break; | 316 break; |
| 317 } | 317 } |
| 318 | 318 |
| 319 if (basicShapeValue->layoutBox()) | 319 if (basicShapeValue->layoutBox()) |
| 320 basicShape->setLayoutBox(LayoutBox(*basicShapeValue->layoutBox())); | 320 basicShape->setLayoutBox(LayoutBox(*basicShapeValue->layoutBox())); |
| 321 | 321 |
| 322 return basicShape.release(); | 322 return basicShape.release(); |
| 323 } | 323 } |
| 324 |
| 325 float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate& center, fl
oat boxDimension) |
| 326 { |
| 327 float offset = floatValueForLength(center.length(), boxDimension); |
| 328 switch (center.keyword()) { |
| 329 case BasicShapeCenterCoordinate::None: |
| 330 return offset; |
| 331 case BasicShapeCenterCoordinate::Top: |
| 332 case BasicShapeCenterCoordinate::Left: |
| 333 return offset; |
| 334 case BasicShapeCenterCoordinate::Bottom: |
| 335 case BasicShapeCenterCoordinate::Right: |
| 336 return boxDimension - offset; |
| 337 } |
| 338 |
| 339 ASSERT_NOT_REACHED(); |
| 340 return 0; |
| 324 } | 341 } |
| 342 |
| 343 } |
| OLD | NEW |