| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 return svgEnumeration; | 45 return svgEnumeration; |
| 46 } | 46 } |
| 47 | 47 |
| 48 String SVGEnumerationBase::valueAsString() const { | 48 String SVGEnumerationBase::valueAsString() const { |
| 49 for (const auto& entry : m_entries) { | 49 for (const auto& entry : m_entries) { |
| 50 if (m_value == entry.first) | 50 if (m_value == entry.first) |
| 51 return entry.second; | 51 return entry.second; |
| 52 } | 52 } |
| 53 | 53 |
| 54 ASSERT(m_value < maxInternalEnumValue()); | 54 ASSERT(m_value < maxInternalEnumValue()); |
| 55 return emptyString(); | 55 return emptyString; |
| 56 } | 56 } |
| 57 | 57 |
| 58 void SVGEnumerationBase::setValue(unsigned short value) { | 58 void SVGEnumerationBase::setValue(unsigned short value) { |
| 59 m_value = value; | 59 m_value = value; |
| 60 notifyChange(); | 60 notifyChange(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 SVGParsingError SVGEnumerationBase::setValueAsString(const String& string) { | 63 SVGParsingError SVGEnumerationBase::setValueAsString(const String& string) { |
| 64 for (const auto& entry : m_entries) { | 64 for (const auto& entry : m_entries) { |
| 65 if (string == entry.second) { | 65 if (string == entry.second) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 animationElement->animateDiscreteType<unsigned short>( | 98 animationElement->animateDiscreteType<unsigned short>( |
| 99 percentage, fromEnumeration, toEnumeration, m_value); | 99 percentage, fromEnumeration, toEnumeration, m_value); |
| 100 } | 100 } |
| 101 | 101 |
| 102 float SVGEnumerationBase::calculateDistance(SVGPropertyBase*, SVGElement*) { | 102 float SVGEnumerationBase::calculateDistance(SVGPropertyBase*, SVGElement*) { |
| 103 // No paced animations for boolean. | 103 // No paced animations for boolean. |
| 104 return -1; | 104 return -1; |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace blink | 107 } // namespace blink |
| OLD | NEW |