OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Computer, 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 28 matching lines...) Expand all Loading... |
39 + String::number(m_y2) + ")"; | 39 + String::number(m_y2) + ")"; |
40 } | 40 } |
41 | 41 |
42 bool CSSCubicBezierTimingFunctionValue::equals(const CSSCubicBezierTimingFunctio
nValue& other) const | 42 bool CSSCubicBezierTimingFunctionValue::equals(const CSSCubicBezierTimingFunctio
nValue& other) const |
43 { | 43 { |
44 return m_x1 == other.m_x1 && m_x2 == other.m_x2 && m_y1 == other.m_y1 && m_y
2 == other.m_y2; | 44 return m_x1 == other.m_x1 && m_x2 == other.m_x2 && m_y1 == other.m_y1 && m_y
2 == other.m_y2; |
45 } | 45 } |
46 | 46 |
47 String CSSStepsTimingFunctionValue::customCSSText() const | 47 String CSSStepsTimingFunctionValue::customCSSText() const |
48 { | 48 { |
49 return "steps(" + String::number(m_steps) + ", " + (m_stepAtStart ? "start"
: "end") + ')'; | 49 String stepAtPositionString; |
| 50 switch (m_stepAtPosition) { |
| 51 case StepsTimingFunction::StepAtStart: |
| 52 { |
| 53 stepAtPositionString = "start"; |
| 54 break; |
| 55 } |
| 56 case StepsTimingFunction::StepAtMiddle: |
| 57 { |
| 58 stepAtPositionString = "middle"; |
| 59 break; |
| 60 } |
| 61 case StepsTimingFunction::StepAtEnd: |
| 62 { |
| 63 stepAtPositionString = "end"; |
| 64 break; |
| 65 } |
| 66 default: |
| 67 { |
| 68 ASSERT_NOT_REACHED(); |
| 69 stepAtPositionString = "end"; |
| 70 break; |
| 71 } |
| 72 } |
| 73 return "steps(" + String::number(m_steps) + ", " + stepAtPositionString + ')
'; |
50 } | 74 } |
51 | 75 |
52 bool CSSStepsTimingFunctionValue::equals(const CSSStepsTimingFunctionValue& othe
r) const | 76 bool CSSStepsTimingFunctionValue::equals(const CSSStepsTimingFunctionValue& othe
r) const |
53 { | 77 { |
54 return m_steps == other.m_steps && m_stepAtStart == other.m_stepAtStart; | 78 return m_steps == other.m_steps && m_stepAtPosition == other.m_stepAtPositio
n; |
55 } | 79 } |
56 | 80 |
57 } // namespace WebCore | 81 } // namespace WebCore |
OLD | NEW |