OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 | 68 |
69 bool AnimatableColorImpl::operator==(const AnimatableColorImpl& other) const | 69 bool AnimatableColorImpl::operator==(const AnimatableColorImpl& other) const |
70 { | 70 { |
71 return m_red == other.m_red | 71 return m_red == other.m_red |
72 && m_green == other.m_green | 72 && m_green == other.m_green |
73 && m_blue == other.m_blue | 73 && m_blue == other.m_blue |
74 && m_alpha == other.m_alpha; | 74 && m_alpha == other.m_alpha; |
75 } | 75 } |
76 | 76 |
77 PassRefPtrWillBeRawPtr<AnimatableColor> AnimatableColor::create(const Animatable
ColorImpl& color, const AnimatableColorImpl& visitedLinkColor) | 77 PassRefPtr<AnimatableColor> AnimatableColor::create(const AnimatableColorImpl& c
olor, const AnimatableColorImpl& visitedLinkColor) |
78 { | 78 { |
79 return adoptRefWillBeNoop(new AnimatableColor(color, visitedLinkColor)); | 79 return adoptRef(new AnimatableColor(color, visitedLinkColor)); |
80 } | 80 } |
81 | 81 |
82 PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableColor::interpolateTo(const Ani
matableValue* value, double fraction) const | 82 PassRefPtr<AnimatableValue> AnimatableColor::interpolateTo(const AnimatableValue
* value, double fraction) const |
83 { | 83 { |
84 const AnimatableColor* color = toAnimatableColor(value); | 84 const AnimatableColor* color = toAnimatableColor(value); |
85 return create(m_color.interpolateTo(color->m_color, fraction), | 85 return create(m_color.interpolateTo(color->m_color, fraction), |
86 m_visitedLinkColor.interpolateTo(color->m_visitedLinkColor, fraction)); | 86 m_visitedLinkColor.interpolateTo(color->m_visitedLinkColor, fraction)); |
87 } | 87 } |
88 | 88 |
89 bool AnimatableColor::equalTo(const AnimatableValue* value) const | 89 bool AnimatableColor::equalTo(const AnimatableValue* value) const |
90 { | 90 { |
91 const AnimatableColor* color = toAnimatableColor(value); | 91 const AnimatableColor* color = toAnimatableColor(value); |
92 return m_color == color->m_color && m_visitedLinkColor == color->m_visitedLi
nkColor; | 92 return m_color == color->m_color && m_visitedLinkColor == color->m_visitedLi
nkColor; |
93 } | 93 } |
94 | 94 |
95 } // namespace blink | 95 } // namespace blink |
OLD | NEW |