| OLD | NEW |
| 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 10 matching lines...) Expand all Loading... |
| 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "config.h" | 28 #include "config.h" |
| 29 #include "core/platform/graphics/RoundedRect.h" | 29 #include "core/platform/graphics/RoundedRect.h" |
| 30 | 30 |
| 31 #include "core/platform/graphics/FloatQuad.h" |
| 32 |
| 31 #include <algorithm> | 33 #include <algorithm> |
| 32 | 34 |
| 33 using namespace std; | 35 using namespace std; |
| 34 | 36 |
| 35 namespace WebCore { | 37 namespace WebCore { |
| 36 | 38 |
| 37 bool RoundedRect::Radii::isZero() const | 39 bool RoundedRect::Radii::isZero() const |
| 38 { | 40 { |
| 39 return m_topLeft.isZero() && m_topRight.isZero() && m_bottomLeft.isZero() &&
m_bottomRight.isZero(); | 41 return m_topLeft.isZero() && m_topRight.isZero() && m_bottomLeft.isZero() &&
m_bottomRight.isZero(); |
| 40 } | 42 } |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 FloatSize size(bottomRight.width(), bottomRight.height()); | 231 FloatSize size(bottomRight.width(), bottomRight.height()); |
| 230 if (!quad.intersectsEllipse(center, size)) | 232 if (!quad.intersectsEllipse(center, size)) |
| 231 return false; | 233 return false; |
| 232 } | 234 } |
| 233 } | 235 } |
| 234 | 236 |
| 235 return true; | 237 return true; |
| 236 } | 238 } |
| 237 | 239 |
| 238 } // namespace WebCore | 240 } // namespace WebCore |
| OLD | NEW |