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

Side by Side Diff: Source/platform/geometry/LayoutRect.h

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/platform/geometry/LayoutPoint.h ('k') | Source/platform/geometry/LayoutRect.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, Google Inc. All rights reserved. 2 * Copyright (c) 2012, Google Inc. 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #ifndef LayoutRect_h 31 #ifndef LayoutRect_h
32 #define LayoutRect_h 32 #define LayoutRect_h
33 33
34 #include "platform/geometry/IntRect.h" 34 #include "platform/geometry/IntRect.h"
35 #include "platform/geometry/LayoutBoxExtent.h" 35 #include "platform/geometry/LayoutBoxExtent.h"
36 #include "platform/geometry/LayoutPoint.h" 36 #include "platform/geometry/LayoutPoint.h"
37 #include "wtf/Vector.h" 37 #include "wtf/Vector.h"
38 38
39 namespace WebCore { 39 namespace blink {
40 40
41 class FloatRect; 41 class FloatRect;
42 42
43 class PLATFORM_EXPORT LayoutRect { 43 class PLATFORM_EXPORT LayoutRect {
44 public: 44 public:
45 LayoutRect() { } 45 LayoutRect() { }
46 LayoutRect(const LayoutPoint& location, const LayoutSize& size) 46 LayoutRect(const LayoutPoint& location, const LayoutSize& size)
47 : m_location(location), m_size(size) { } 47 : m_location(location), m_size(size) { }
48 LayoutRect(LayoutUnit x, LayoutUnit y, LayoutUnit width, LayoutUnit height) 48 LayoutRect(LayoutUnit x, LayoutUnit y, LayoutUnit width, LayoutUnit height)
49 : m_location(LayoutPoint(x, y)), m_size(LayoutSize(width, height)) { } 49 : m_location(LayoutPoint(x, y)), m_size(LayoutSize(width, height)) { }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 inline IntRect pixelSnappedIntRectFromEdges(LayoutUnit left, LayoutUnit top, Lay outUnit right, LayoutUnit bottom) 223 inline IntRect pixelSnappedIntRectFromEdges(LayoutUnit left, LayoutUnit top, Lay outUnit right, LayoutUnit bottom)
224 { 224 {
225 return IntRect(left.round(), top.round(), snapSizeToPixel(right - left, left ), snapSizeToPixel(bottom - top, top)); 225 return IntRect(left.round(), top.round(), snapSizeToPixel(right - left, left ), snapSizeToPixel(bottom - top, top));
226 } 226 }
227 227
228 inline IntRect pixelSnappedIntRect(LayoutPoint location, LayoutSize size) 228 inline IntRect pixelSnappedIntRect(LayoutPoint location, LayoutSize size)
229 { 229 {
230 return IntRect(roundedIntPoint(location), pixelSnappedIntSize(size, location )); 230 return IntRect(roundedIntPoint(location), pixelSnappedIntSize(size, location ));
231 } 231 }
232 232
233 } // namespace WebCore 233 } // namespace blink
234 234
235 #endif // LayoutRect_h 235 #endif // LayoutRect_h
OLDNEW
« no previous file with comments | « Source/platform/geometry/LayoutPoint.h ('k') | Source/platform/geometry/LayoutRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698