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

Side by Side Diff: platform/graphics/FloatPoint.h

Issue 174242: Bring the Mac Chromium render theme up to date and easier to keep merged. DO ... (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 11 years, 3 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 | « platform/chromium/ThemeChromiumMac.mm ('k') | platform/graphics/FloatRect.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) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 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 18 matching lines...) Expand all
29 29
30 #include "FloatSize.h" 30 #include "FloatSize.h"
31 #include "IntPoint.h" 31 #include "IntPoint.h"
32 #include <wtf/MathExtras.h> 32 #include <wtf/MathExtras.h>
33 #include <wtf/Platform.h> 33 #include <wtf/Platform.h>
34 34
35 #if PLATFORM(CG) 35 #if PLATFORM(CG)
36 typedef struct CGPoint CGPoint; 36 typedef struct CGPoint CGPoint;
37 #endif 37 #endif
38 38
39 #if PLATFORM(MAC) 39 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
40 #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES 40 #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
41 typedef struct CGPoint NSPoint; 41 typedef struct CGPoint NSPoint;
42 #else 42 #else
43 typedef struct _NSPoint NSPoint; 43 typedef struct _NSPoint NSPoint;
44 #endif 44 #endif
45 #endif 45 #endif
46 46
47 #if PLATFORM(QT) 47 #if PLATFORM(QT)
48 #include "qglobal.h" 48 #include "qglobal.h"
49 QT_BEGIN_NAMESPACE 49 QT_BEGIN_NAMESPACE
(...skipping 27 matching lines...) Expand all
77 77
78 void setX(float x) { m_x = x; } 78 void setX(float x) { m_x = x; }
79 void setY(float y) { m_y = y; } 79 void setY(float y) { m_y = y; }
80 void move(float dx, float dy) { m_x += dx; m_y += dy; } 80 void move(float dx, float dy) { m_x += dx; m_y += dy; }
81 81
82 #if PLATFORM(CG) 82 #if PLATFORM(CG)
83 FloatPoint(const CGPoint&); 83 FloatPoint(const CGPoint&);
84 operator CGPoint() const; 84 operator CGPoint() const;
85 #endif 85 #endif
86 86
87 #if PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) 87 #if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
88 || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
88 FloatPoint(const NSPoint&); 89 FloatPoint(const NSPoint&);
89 operator NSPoint() const; 90 operator NSPoint() const;
90 #endif 91 #endif
91 92
92 #if PLATFORM(QT) 93 #if PLATFORM(QT)
93 FloatPoint(const QPointF&); 94 FloatPoint(const QPointF&);
94 operator QPointF() const; 95 operator QPointF() const;
95 #endif 96 #endif
96 97
97 #if PLATFORM(HAIKU) 98 #if PLATFORM(HAIKU)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 150 }
150 151
151 inline IntPoint roundedIntPoint(const FloatPoint& p) 152 inline IntPoint roundedIntPoint(const FloatPoint& p)
152 { 153 {
153 return IntPoint(static_cast<int>(roundf(p.x())), static_cast<int>(roundf(p.y ()))); 154 return IntPoint(static_cast<int>(roundf(p.x())), static_cast<int>(roundf(p.y ())));
154 } 155 }
155 156
156 } 157 }
157 158
158 #endif 159 #endif
OLDNEW
« no previous file with comments | « platform/chromium/ThemeChromiumMac.mm ('k') | platform/graphics/FloatRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698