Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: Source/core/rendering/shapes/Shape.cpp

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderWidget.cpp ('k') | Source/core/rendering/style/BasicShapes.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
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"
35 #include "core/rendering/shapes/PolygonShape.h" 34 #include "core/rendering/shapes/PolygonShape.h"
36 #include "core/rendering/shapes/RasterShape.h" 35 #include "core/rendering/shapes/RasterShape.h"
37 #include "core/rendering/shapes/RectangleShape.h" 36 #include "core/rendering/shapes/RectangleShape.h"
38 #include "platform/LengthFunctions.h" 37 #include "platform/LengthFunctions.h"
39 #include "platform/geometry/FloatSize.h" 38 #include "platform/geometry/FloatSize.h"
39 #include "platform/graphics/ImageBuffer.h"
40 #include "platform/graphics/WindRule.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 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 static PassOwnPtr<Shape> createRectangleShape(const FloatRect& bounds, const Flo atSize& radii) 46 static PassOwnPtr<Shape> createRectangleShape(const FloatRect& bounds, const Flo atSize& radii)
47 { 47 {
48 ASSERT(bounds.width() >= 0 && bounds.height() >= 0 && radii.width() >= 0 && radii.height() >= 0); 48 ASSERT(bounds.width() >= 0 && bounds.height() >= 0 && radii.width() >= 0 && radii.height() >= 0);
49 return adoptPtr(new RectangleShape(bounds, radii)); 49 return adoptPtr(new RectangleShape(bounds, radii));
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 OwnPtr<Shape> shape = createRectangleShape(bounds, radii); 254 OwnPtr<Shape> shape = createRectangleShape(bounds, radii);
255 shape->m_writingMode = writingMode; 255 shape->m_writingMode = writingMode;
256 shape->m_margin = floatValueForLength(margin, 0); 256 shape->m_margin = floatValueForLength(margin, 0);
257 shape->m_padding = floatValueForLength(padding, 0); 257 shape->m_padding = floatValueForLength(padding, 0);
258 258
259 return shape.release(); 259 return shape.release();
260 } 260 }
261 261
262 } // namespace WebCore 262 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderWidget.cpp ('k') | Source/core/rendering/style/BasicShapes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698