| 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 22 matching lines...) Expand all Loading... |
| 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/GraphicsContext.h" |
| 43 #include "platform/graphics/GraphicsTypes.h" |
| 43 #include "platform/graphics/ImageBuffer.h" | 44 #include "platform/graphics/ImageBuffer.h" |
| 44 #include "platform/graphics/WindRule.h" | |
| 45 #include "wtf/MathExtras.h" | 45 #include "wtf/MathExtras.h" |
| 46 #include "wtf/OwnPtr.h" | 46 #include "wtf/OwnPtr.h" |
| 47 | 47 |
| 48 namespace blink { | 48 namespace blink { |
| 49 | 49 |
| 50 static PassOwnPtr<Shape> createInsetShape(const FloatRoundedRect& bounds) | 50 static PassOwnPtr<Shape> createInsetShape(const FloatRoundedRect& bounds) |
| 51 { | 51 { |
| 52 ASSERT(bounds.rect().width() >= 0 && bounds.rect().height() >= 0); | 52 ASSERT(bounds.rect().width() >= 0 && bounds.rect().height() >= 0); |
| 53 return adoptPtr(new BoxShape(bounds)); | 53 return adoptPtr(new BoxShape(bounds)); |
| 54 } | 54 } |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height()
); | 232 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height()
); |
| 233 FloatRoundedRect bounds(rect, roundedRect.radii()); | 233 FloatRoundedRect bounds(rect, roundedRect.radii()); |
| 234 OwnPtr<Shape> shape = createInsetShape(bounds); | 234 OwnPtr<Shape> shape = createInsetShape(bounds); |
| 235 shape->m_writingMode = writingMode; | 235 shape->m_writingMode = writingMode; |
| 236 shape->m_margin = margin; | 236 shape->m_margin = margin; |
| 237 | 237 |
| 238 return shape.release(); | 238 return shape.release(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 } // namespace blink | 241 } // namespace blink |
| OLD | NEW |