| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 return lhs.subType() == ctf.subType(); | 97 return lhs.subType() == ctf.subType(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool operator==(const StepsTimingFunction& lhs, const TimingFunction& rhs) | 100 bool operator==(const StepsTimingFunction& lhs, const TimingFunction& rhs) |
| 101 { | 101 { |
| 102 if (rhs.type() != TimingFunction::StepsFunction) | 102 if (rhs.type() != TimingFunction::StepsFunction) |
| 103 return false; | 103 return false; |
| 104 | 104 |
| 105 const StepsTimingFunction& stf = toStepsTimingFunction(rhs); | 105 const StepsTimingFunction& stf = toStepsTimingFunction(rhs); |
| 106 if ((lhs.subType() == StepsTimingFunction::Custom) && (stf.subType() == Step
sTimingFunction::Custom)) | 106 if ((lhs.subType() == StepsTimingFunction::Custom) && (stf.subType() == Step
sTimingFunction::Custom)) |
| 107 return (lhs.numberOfSteps() == stf.numberOfSteps()) && (lhs.stepAtStart(
) == stf.stepAtStart()); | 107 return (lhs.numberOfSteps() == stf.numberOfSteps()) && (lhs.stepAtPositi
on() == stf.stepAtPosition()); |
| 108 | 108 |
| 109 return lhs.subType() == stf.subType(); | 109 return lhs.subType() == stf.subType(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool operator==(const ChainedTimingFunction& lhs, const TimingFunction& rhs) | 112 bool operator==(const ChainedTimingFunction& lhs, const TimingFunction& rhs) |
| 113 { | 113 { |
| 114 return ChainedTimingFunctionTestHelper::equals(lhs, rhs); | 114 return ChainedTimingFunctionTestHelper::equals(lhs, rhs); |
| 115 } | 115 } |
| 116 | 116 |
| 117 // Like in the PrintTo case, the generic operator== *must* come after the | 117 // Like in the PrintTo case, the generic operator== *must* come after the |
| (...skipping 23 matching lines...) Expand all Loading... |
| 141 return false; | 141 return false; |
| 142 } | 142 } |
| 143 | 143 |
| 144 // No need to define specific operator!= as they can all come via this function. | 144 // No need to define specific operator!= as they can all come via this function. |
| 145 bool operator!=(const TimingFunction& lhs, const TimingFunction& rhs) | 145 bool operator!=(const TimingFunction& lhs, const TimingFunction& rhs) |
| 146 { | 146 { |
| 147 return !(lhs == rhs); | 147 return !(lhs == rhs); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace WebCore | 150 } // namespace WebCore |
| OLD | NEW |