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

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

Issue 815933006: Change all uses of the RoundedRect class to use FloatRoundedRect instead. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/shapes/Shape.h ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.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 23 matching lines...) Expand all
34 #include "core/dom/DOMArrayBuffer.h" 34 #include "core/dom/DOMArrayBuffer.h"
35 #include "core/dom/DOMTypedArray.h" 35 #include "core/dom/DOMTypedArray.h"
36 #include "core/fetch/ImageResource.h" 36 #include "core/fetch/ImageResource.h"
37 #include "core/rendering/shapes/BoxShape.h" 37 #include "core/rendering/shapes/BoxShape.h"
38 #include "core/rendering/shapes/PolygonShape.h" 38 #include "core/rendering/shapes/PolygonShape.h"
39 #include "core/rendering/shapes/RasterShape.h" 39 #include "core/rendering/shapes/RasterShape.h"
40 #include "core/rendering/shapes/RectangleShape.h" 40 #include "core/rendering/shapes/RectangleShape.h"
41 #include "core/rendering/style/RenderStyle.h" 41 #include "core/rendering/style/RenderStyle.h"
42 #include "core/svg/graphics/SVGImage.h" 42 #include "core/svg/graphics/SVGImage.h"
43 #include "platform/LengthFunctions.h" 43 #include "platform/LengthFunctions.h"
44 #include "platform/geometry/FloatRoundedRect.h"
44 #include "platform/geometry/FloatSize.h" 45 #include "platform/geometry/FloatSize.h"
45 #include "platform/graphics/GraphicsContext.h" 46 #include "platform/graphics/GraphicsContext.h"
46 #include "platform/graphics/GraphicsTypes.h" 47 #include "platform/graphics/GraphicsTypes.h"
47 #include "platform/graphics/ImageBuffer.h" 48 #include "platform/graphics/ImageBuffer.h"
48 #include "wtf/ArrayBufferContents.h" 49 #include "wtf/ArrayBufferContents.h"
49 #include "wtf/MathExtras.h" 50 #include "wtf/MathExtras.h"
50 #include "wtf/OwnPtr.h" 51 #include "wtf/OwnPtr.h"
51 52
52 namespace blink { 53 namespace blink {
53 54
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 232 }
232 } 233 }
233 } 234 }
234 235
235 OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release (), marginRect.size())); 236 OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release (), marginRect.size()));
236 rasterShape->m_writingMode = writingMode; 237 rasterShape->m_writingMode = writingMode;
237 rasterShape->m_margin = margin; 238 rasterShape->m_margin = margin;
238 return rasterShape.release(); 239 return rasterShape.release();
239 } 240 }
240 241
241 PassOwnPtr<Shape> Shape::createLayoutBoxShape(const RoundedRect& roundedRect, Wr itingMode writingMode, float margin) 242 PassOwnPtr<Shape> Shape::createLayoutBoxShape(const FloatRoundedRect& roundedRec t, WritingMode writingMode, float margin)
242 { 243 {
243 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height() ); 244 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height() );
244 FloatRoundedRect bounds(rect, roundedRect.radii()); 245 FloatRoundedRect bounds(rect, roundedRect.radii());
245 OwnPtr<Shape> shape = createInsetShape(bounds); 246 OwnPtr<Shape> shape = createInsetShape(bounds);
246 shape->m_writingMode = writingMode; 247 shape->m_writingMode = writingMode;
247 shape->m_margin = margin; 248 shape->m_margin = margin;
248 249
249 return shape.release(); 250 return shape.release();
250 } 251 }
251 252
252 } // namespace blink 253 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/Shape.h ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698