| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 SVGPropertyBase* from, | 66 SVGPropertyBase* from, |
| 67 SVGPropertyBase* to, | 67 SVGPropertyBase* to, |
| 68 SVGPropertyBase* toAtEndOfDurationValue, | 68 SVGPropertyBase* toAtEndOfDurationValue, |
| 69 SVGElement*) override; | 69 SVGElement*) override; |
| 70 float calculateDistance(SVGPropertyBase* to, SVGElement*) override; | 70 float calculateDistance(SVGPropertyBase* to, SVGElement*) override; |
| 71 | 71 |
| 72 static AnimatedPropertyType classType() { return AnimatedEnumeration; } | 72 static AnimatedPropertyType classType() { return AnimatedEnumeration; } |
| 73 AnimatedPropertyType type() const override { return classType(); } | 73 AnimatedPropertyType type() const override { return classType(); } |
| 74 | 74 |
| 75 static unsigned short valueOfLastEnum(const StringEntries& entries) { | 75 static unsigned short valueOfLastEnum(const StringEntries& entries) { |
| 76 return entries.last().first; | 76 return entries.back().first; |
| 77 } | 77 } |
| 78 | 78 |
| 79 // This is the maximum value that is exposed as an IDL constant on the | 79 // This is the maximum value that is exposed as an IDL constant on the |
| 80 // relevant interface. | 80 // relevant interface. |
| 81 unsigned short maxExposedEnumValue() const { return m_maxExposed; } | 81 unsigned short maxExposedEnumValue() const { return m_maxExposed; } |
| 82 | 82 |
| 83 protected: | 83 protected: |
| 84 SVGEnumerationBase(unsigned short value, | 84 SVGEnumerationBase(unsigned short value, |
| 85 const StringEntries& entries, | 85 const StringEntries& entries, |
| 86 unsigned short maxExposed) | 86 unsigned short maxExposed) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 protected: | 132 protected: |
| 133 explicit SVGEnumeration(Enum newValue) | 133 explicit SVGEnumeration(Enum newValue) |
| 134 : SVGEnumerationBase(newValue, | 134 : SVGEnumerationBase(newValue, |
| 135 getStaticStringEntries<Enum>(), | 135 getStaticStringEntries<Enum>(), |
| 136 getMaxExposedEnumValue<Enum>()) {} | 136 getMaxExposedEnumValue<Enum>()) {} |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace blink | 139 } // namespace blink |
| 140 | 140 |
| 141 #endif // SVGEnumeration_h | 141 #endif // SVGEnumeration_h |
| OLD | NEW |