OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
4 * reserved. | 4 * reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 16 matching lines...) Expand all Loading... |
27 namespace blink { | 27 namespace blink { |
28 | 28 |
29 bool ShadowData::operator==(const ShadowData& o) const { | 29 bool ShadowData::operator==(const ShadowData& o) const { |
30 return m_location == o.m_location && m_blur == o.m_blur && | 30 return m_location == o.m_location && m_blur == o.m_blur && |
31 m_spread == o.m_spread && m_style == o.m_style && m_color == o.m_color; | 31 m_spread == o.m_spread && m_style == o.m_style && m_color == o.m_color; |
32 } | 32 } |
33 | 33 |
34 ShadowData ShadowData::blend(const ShadowData& from, | 34 ShadowData ShadowData::blend(const ShadowData& from, |
35 double progress, | 35 double progress, |
36 const Color& currentColor) const { | 36 const Color& currentColor) const { |
37 ASSERT(style() == from.style()); | 37 DCHECK_EQ(style(), from.style()); |
38 return ShadowData(blink::blend(from.location(), location(), progress), | 38 return ShadowData(blink::blend(from.location(), location(), progress), |
39 clampTo(blink::blend(from.blur(), blur(), progress), 0.0f), | 39 clampTo(blink::blend(from.blur(), blur(), progress), 0.0f), |
40 blink::blend(from.spread(), spread(), progress), style(), | 40 blink::blend(from.spread(), spread(), progress), style(), |
41 blink::blend(from.color().resolve(currentColor), | 41 blink::blend(from.color().resolve(currentColor), |
42 color().resolve(currentColor), progress)); | 42 color().resolve(currentColor), progress)); |
43 } | 43 } |
44 | 44 |
45 ShadowData ShadowData::neutralValue() { | 45 ShadowData ShadowData::neutralValue() { |
46 return ShadowData(FloatPoint(0, 0), 0, 0, Normal, | 46 return ShadowData(FloatPoint(0, 0), 0, 0, Normal, |
47 StyleColor(Color::transparent)); | 47 StyleColor(Color::transparent)); |
48 } | 48 } |
49 | 49 |
50 } // namespace blink | 50 } // namespace blink |
OLD | NEW |