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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/LayoutPoint.h

Issue 2153633002: Add PLATFORM_EXPORT to Layout{Point,Size} classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/geometry/LayoutSize.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, 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 23 matching lines...) Expand all
34 #include "platform/geometry/DoublePoint.h" 34 #include "platform/geometry/DoublePoint.h"
35 #include "platform/geometry/FloatPoint.h" 35 #include "platform/geometry/FloatPoint.h"
36 #include "platform/geometry/LayoutSize.h" 36 #include "platform/geometry/LayoutSize.h"
37 #include "wtf/Allocator.h" 37 #include "wtf/Allocator.h"
38 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
39 #include "wtf/MathExtras.h" 39 #include "wtf/MathExtras.h"
40 #include <algorithm> 40 #include <algorithm>
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class LayoutPoint { 44 class PLATFORM_EXPORT LayoutPoint {
45 DISALLOW_NEW(); 45 DISALLOW_NEW();
46 public: 46 public:
47 LayoutPoint() { } 47 LayoutPoint() { }
48 LayoutPoint(LayoutUnit x, LayoutUnit y) : m_x(x), m_y(y) { } 48 LayoutPoint(LayoutUnit x, LayoutUnit y) : m_x(x), m_y(y) { }
49 LayoutPoint(int x, int y) : m_x(LayoutUnit(x)), m_y(LayoutUnit(y)) { } 49 LayoutPoint(int x, int y) : m_x(LayoutUnit(x)), m_y(LayoutUnit(y)) { }
50 LayoutPoint(const IntPoint& point) : m_x(point.x()), m_y(point.y()) { } 50 LayoutPoint(const IntPoint& point) : m_x(point.x()), m_y(point.y()) { }
51 explicit LayoutPoint(const FloatPoint& point) : m_x(point.x()), m_y(point.y( )) { } 51 explicit LayoutPoint(const FloatPoint& point) : m_x(point.x()), m_y(point.y( )) { }
52 explicit LayoutPoint(const DoublePoint& point) : m_x(point.x()), m_y(point.y ()) { } 52 explicit LayoutPoint(const DoublePoint& point) : m_x(point.x()), m_y(point.y ()) { }
53 explicit LayoutPoint(const LayoutSize& size) : m_x(size.width()), m_y(size.h eight()) { } 53 explicit LayoutPoint(const LayoutSize& size) : m_x(size.width()), m_y(size.h eight()) { }
54 54
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 240 }
241 241
242 inline LayoutPoint flooredLayoutPoint(const FloatSize& s) 242 inline LayoutPoint flooredLayoutPoint(const FloatSize& s)
243 { 243 {
244 return flooredLayoutPoint(FloatPoint(s)); 244 return flooredLayoutPoint(FloatPoint(s));
245 } 245 }
246 246
247 } // namespace blink 247 } // namespace blink
248 248
249 #endif // LayoutPoint_h 249 #endif // LayoutPoint_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/geometry/LayoutSize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698