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

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

Issue 208333020: [Mac] Rely on science, not chance, to get the proper definition of the macro (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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/platform/geometry/FloatPoint.h ('k') | Source/platform/geometry/FloatSize.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) 2003, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2005 Nokia. All rights reserved. 3 * Copyright (C) 2005 Nokia. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 26
27 #ifndef FloatRect_h 27 #ifndef FloatRect_h
28 #define FloatRect_h 28 #define FloatRect_h
29 29
30 #include "platform/geometry/FloatPoint.h" 30 #include "platform/geometry/FloatPoint.h"
31 #include "wtf/Vector.h" 31 #include "wtf/Vector.h"
32 32
33 #if OS(MACOSX) 33 #if OS(MACOSX)
34 typedef struct CGRect CGRect; 34 typedef struct CGRect CGRect;
35 #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES 35
36 typedef struct CGRect NSRect; 36 #ifdef __OBJC__
37 #else 37 #import <Foundation/Foundation.h>
38 typedef struct _NSRect NSRect;
39 #endif 38 #endif
40 #endif 39 #endif
41 40
42 struct SkRect; 41 struct SkRect;
43 42
44 namespace WebCore { 43 namespace WebCore {
45 44
46 class LayoutRect; 45 class LayoutRect;
47 class IntRect; 46 class IntRect;
48 class IntPoint; 47 class IntPoint;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 FloatRect transposedRect() const { return FloatRect(m_location.transposedPoi nt(), m_size.transposedSize()); } 159 FloatRect transposedRect() const { return FloatRect(m_location.transposedPoi nt(), m_size.transposedSize()); }
161 160
162 // Re-initializes this rectangle to fit the sets of passed points. 161 // Re-initializes this rectangle to fit the sets of passed points.
163 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1); 162 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1);
164 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin t& p2); 163 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin t& p2);
165 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin t& p2, const FloatPoint& p3); 164 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin t& p2, const FloatPoint& p3);
166 165
167 #if OS(MACOSX) 166 #if OS(MACOSX)
168 FloatRect(const CGRect&); 167 FloatRect(const CGRect&);
169 operator CGRect() const; 168 operator CGRect() const;
170 #if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) 169 #if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
171 FloatRect(const NSRect&); 170 FloatRect(const NSRect&);
172 operator NSRect() const; 171 operator NSRect() const;
173 #endif 172 #endif
174 #endif 173 #endif
175 174
176 operator SkRect() const; 175 operator SkRect() const;
177 176
178 private: 177 private:
179 FloatPoint m_location; 178 FloatPoint m_location;
180 FloatSize m_size; 179 FloatSize m_size;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 PLATFORM_EXPORT IntRect enclosedIntRect(const FloatRect&); 233 PLATFORM_EXPORT IntRect enclosedIntRect(const FloatRect&);
235 234
236 PLATFORM_EXPORT IntRect roundedIntRect(const FloatRect&); 235 PLATFORM_EXPORT IntRect roundedIntRect(const FloatRect&);
237 236
238 // Map supplied rect from srcRect to an equivalent rect in destRect. 237 // Map supplied rect from srcRect to an equivalent rect in destRect.
239 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co nst FloatRect& destRect); 238 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co nst FloatRect& destRect);
240 239
241 } 240 }
242 241
243 #endif 242 #endif
OLDNEW
« no previous file with comments | « Source/platform/geometry/FloatPoint.h ('k') | Source/platform/geometry/FloatSize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698