OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 radiusX * 2, | 206 radiusX * 2, |
207 radiusY * 2 | 207 radiusY * 2 |
208 )); | 208 )); |
209 } | 209 } |
210 | 210 |
211 bool DeprecatedBasicShapeEllipse::operator==(const BasicShape& o) const | 211 bool DeprecatedBasicShapeEllipse::operator==(const BasicShape& o) const |
212 { | 212 { |
213 if (!isSameType(o)) | 213 if (!isSameType(o)) |
214 return false; | 214 return false; |
215 const DeprecatedBasicShapeEllipse& other = toDeprecatedBasicShapeEllipse(o); | 215 const DeprecatedBasicShapeEllipse& other = toDeprecatedBasicShapeEllipse(o); |
216 return m_centerX == other.m_centerX && m_centerY == other.m_centerY && m_rad iusX == other.m_radiusX && m_radiusY == m_radiusY; | 216 return m_centerX == other.m_centerX && m_centerY == other.m_centerY && m_rad iusX == other.m_radiusX && m_radiusY == other.m_radiusY; |
Inactive
2014/01/17 00:54:53
Nice bug
abarth-chromium
2014/01/17 06:59:08
Can you write a test for this change?
| |
217 } | 217 } |
218 | 218 |
219 PassRefPtr<BasicShape> DeprecatedBasicShapeEllipse::blend(const BasicShape* othe r, double progress) const | 219 PassRefPtr<BasicShape> DeprecatedBasicShapeEllipse::blend(const BasicShape* othe r, double progress) const |
220 { | 220 { |
221 ASSERT(other && isSameType(*other)); | 221 ASSERT(other && isSameType(*other)); |
222 | 222 |
223 const DeprecatedBasicShapeEllipse* o = static_cast<const DeprecatedBasicShap eEllipse*>(other); | 223 const DeprecatedBasicShapeEllipse* o = static_cast<const DeprecatedBasicShap eEllipse*>(other); |
224 RefPtr<DeprecatedBasicShapeEllipse> result = DeprecatedBasicShapeEllipse::cr eate(); | 224 RefPtr<DeprecatedBasicShapeEllipse> result = DeprecatedBasicShapeEllipse::cr eate(); |
225 result->setCenterX(m_centerX.blend(o->centerX(), progress, ValueRangeAll)); | 225 result->setCenterX(m_centerX.blend(o->centerX(), progress, ValueRangeAll)); |
226 result->setCenterY(m_centerY.blend(o->centerY(), progress, ValueRangeAll)); | 226 result->setCenterY(m_centerY.blend(o->centerY(), progress, ValueRangeAll)); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 } | 369 } |
370 | 370 |
371 bool BasicShapeInsetRectangle::operator==(const BasicShape& o) const | 371 bool BasicShapeInsetRectangle::operator==(const BasicShape& o) const |
372 { | 372 { |
373 if (!isSameType(o)) | 373 if (!isSameType(o)) |
374 return false; | 374 return false; |
375 const BasicShapeInsetRectangle& other = toBasicShapeInsetRectangle(o); | 375 const BasicShapeInsetRectangle& other = toBasicShapeInsetRectangle(o); |
376 return m_right == other.m_right && m_top == other.m_top && m_bottom == other .m_bottom && m_left == other.m_left && m_cornerRadiusX == other.m_cornerRadiusX && m_cornerRadiusY == other.m_cornerRadiusY; | 376 return m_right == other.m_right && m_top == other.m_top && m_bottom == other .m_bottom && m_left == other.m_left && m_cornerRadiusX == other.m_cornerRadiusX && m_cornerRadiusY == other.m_cornerRadiusY; |
377 } | 377 } |
378 } | 378 } |
OLD | NEW |