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

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

Issue 32823017: Move FloatPolygon.* and WindRule.h to Source/platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Export classes/enum for win/mac Created 7 years, 2 months 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
« no previous file with comments | « Source/core/rendering/shapes/PolygonShape.h ('k') | Source/core/rendering/style/BasicShapes.h » ('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 14 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/PolygonShape.h ('k') | Source/core/rendering/style/BasicShapes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698