| 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 14 matching lines...) Expand all Loading... |
| 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 27 * OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #include "config.h" | 30 #include "config.h" |
| 31 #include "core/rendering/shapes/Shape.h" | 31 #include "core/rendering/shapes/Shape.h" |
| 32 | 32 |
| 33 #include "core/fetch/ImageResource.h" | 33 #include "core/fetch/ImageResource.h" |
| 34 #include "core/platform/graphics/ImageBuffer.h" | 34 #include "core/platform/graphics/ImageBuffer.h" |
| 35 #include "core/platform/graphics/WindRule.h" | |
| 36 #include "core/rendering/shapes/PolygonShape.h" | 35 #include "core/rendering/shapes/PolygonShape.h" |
| 37 #include "core/rendering/shapes/RasterShape.h" | 36 #include "core/rendering/shapes/RasterShape.h" |
| 38 #include "core/rendering/shapes/RectangleShape.h" | 37 #include "core/rendering/shapes/RectangleShape.h" |
| 39 #include "platform/LengthFunctions.h" | 38 #include "platform/LengthFunctions.h" |
| 40 #include "platform/geometry/FloatSize.h" | 39 #include "platform/geometry/FloatSize.h" |
| 40 #include "platform/graphics/WindRule.h" |
| 41 #include "wtf/MathExtras.h" | 41 #include "wtf/MathExtras.h" |
| 42 #include "wtf/OwnPtr.h" | 42 #include "wtf/OwnPtr.h" |
| 43 #include "wtf/PassOwnPtr.h" | 43 #include "wtf/PassOwnPtr.h" |
| 44 | 44 |
| 45 namespace WebCore { | 45 namespace WebCore { |
| 46 | 46 |
| 47 static PassOwnPtr<Shape> createRectangleShape(const FloatRect& bounds, const Flo
atSize& radii) | 47 static PassOwnPtr<Shape> createRectangleShape(const FloatRect& bounds, const Flo
atSize& radii) |
| 48 { | 48 { |
| 49 ASSERT(bounds.width() >= 0 && bounds.height() >= 0 && radii.width() >= 0 &&
radii.height() >= 0); | 49 ASSERT(bounds.width() >= 0 && bounds.height() >= 0 && radii.width() >= 0 &&
radii.height() >= 0); |
| 50 return adoptPtr(new RectangleShape(bounds, radii)); | 50 return adoptPtr(new RectangleShape(bounds, radii)); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 } | 241 } |
| 242 | 242 |
| 243 OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release
(), imageSize)); | 243 OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release
(), imageSize)); |
| 244 rasterShape->m_writingMode = writingMode; | 244 rasterShape->m_writingMode = writingMode; |
| 245 rasterShape->m_margin = floatValueForLength(margin, 0); | 245 rasterShape->m_margin = floatValueForLength(margin, 0); |
| 246 rasterShape->m_padding = floatValueForLength(padding, 0); | 246 rasterShape->m_padding = floatValueForLength(padding, 0); |
| 247 return rasterShape.release(); | 247 return rasterShape.release(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace WebCore | 250 } // namespace WebCore |
| OLD | NEW |