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

Side by Side Diff: Source/platform/geometry/RoundedRect.cpp

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/RoundedRect.h ('k') | Source/platform/geometry/RoundedRectTest.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) 2003, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * Copyright (C) 2013 Xidorn Quan (quanxunzhen@gmail.com) 4 * Copyright (C) 2013 Xidorn Quan (quanxunzhen@gmail.com)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 15 matching lines...) Expand all
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 #include "platform/geometry/RoundedRect.h" 29 #include "platform/geometry/RoundedRect.h"
30 30
31 #include "wtf/Assertions.h" 31 #include "wtf/Assertions.h"
32 #include <algorithm> 32 #include <algorithm>
33 33
34 using namespace std; 34 using namespace std;
35 35
36 namespace WebCore { 36 namespace blink {
37 37
38 bool RoundedRect::Radii::isZero() const 38 bool RoundedRect::Radii::isZero() const
39 { 39 {
40 return m_topLeft.isZero() && m_topRight.isZero() && m_bottomLeft.isZero() && m_bottomRight.isZero(); 40 return m_topLeft.isZero() && m_topRight.isZero() && m_bottomLeft.isZero() && m_bottomRight.isZero();
41 } 41 }
42 42
43 void RoundedRect::Radii::scale(float factor) 43 void RoundedRect::Radii::scale(float factor)
44 { 44 {
45 if (factor == 1) 45 if (factor == 1)
46 return; 46 return;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 FloatPoint center(m_rect.maxX() - bottomRight.width(), m_rect.maxY() - bottomRight.height()); 239 FloatPoint center(m_rect.maxX() - bottomRight.width(), m_rect.maxY() - bottomRight.height());
240 FloatSize size(bottomRight.width(), bottomRight.height()); 240 FloatSize size(bottomRight.width(), bottomRight.height());
241 if (!quad.intersectsEllipse(center, size)) 241 if (!quad.intersectsEllipse(center, size))
242 return false; 242 return false;
243 } 243 }
244 } 244 }
245 245
246 return true; 246 return true;
247 } 247 }
248 248
249 } // namespace WebCore 249 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/geometry/RoundedRect.h ('k') | Source/platform/geometry/RoundedRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698