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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 #include "core/css/BasicShapeFunctions.h" | 33 #include "core/css/BasicShapeFunctions.h" |
34 #include "core/fetch/ImageResource.h" | 34 #include "core/fetch/ImageResource.h" |
35 #include "core/rendering/shapes/BoxShape.h" | 35 #include "core/rendering/shapes/BoxShape.h" |
36 #include "core/rendering/shapes/PolygonShape.h" | 36 #include "core/rendering/shapes/PolygonShape.h" |
37 #include "core/rendering/shapes/RasterShape.h" | 37 #include "core/rendering/shapes/RasterShape.h" |
38 #include "core/rendering/shapes/RectangleShape.h" | 38 #include "core/rendering/shapes/RectangleShape.h" |
39 #include "core/rendering/style/RenderStyle.h" | 39 #include "core/rendering/style/RenderStyle.h" |
40 #include "platform/LengthFunctions.h" | 40 #include "platform/LengthFunctions.h" |
41 #include "platform/geometry/FloatSize.h" | 41 #include "platform/geometry/FloatSize.h" |
| 42 #include "platform/graphics/GraphicsContext.h" |
42 #include "platform/graphics/ImageBuffer.h" | 43 #include "platform/graphics/ImageBuffer.h" |
43 #include "platform/graphics/WindRule.h" | 44 #include "platform/graphics/WindRule.h" |
44 #include "wtf/MathExtras.h" | 45 #include "wtf/MathExtras.h" |
45 #include "wtf/OwnPtr.h" | 46 #include "wtf/OwnPtr.h" |
46 | 47 |
47 namespace WebCore { | 48 namespace WebCore { |
48 | 49 |
49 static PassOwnPtr<Shape> createInsetShape(const FloatRoundedRect& bounds) | 50 static PassOwnPtr<Shape> createInsetShape(const FloatRoundedRect& bounds) |
50 { | 51 { |
51 ASSERT(bounds.rect().width() >= 0 && bounds.rect().height() >= 0); | 52 ASSERT(bounds.rect().width() >= 0 && bounds.rect().height() >= 0); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height()
); | 222 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height()
); |
222 FloatRoundedRect bounds(rect, roundedRect.radii()); | 223 FloatRoundedRect bounds(rect, roundedRect.radii()); |
223 OwnPtr<Shape> shape = createInsetShape(bounds); | 224 OwnPtr<Shape> shape = createInsetShape(bounds); |
224 shape->m_writingMode = writingMode; | 225 shape->m_writingMode = writingMode; |
225 shape->m_margin = margin; | 226 shape->m_margin = margin; |
226 | 227 |
227 return shape.release(); | 228 return shape.release(); |
228 } | 229 } |
229 | 230 |
230 } // namespace WebCore | 231 } // namespace WebCore |
OLD | NEW |