| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2012 Apple 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 void StyleKeyframe::setKeys(PassOwnPtr<Vector<double> > keys) | 84 void StyleKeyframe::setKeys(PassOwnPtr<Vector<double> > keys) |
| 85 { | 85 { |
| 86 ASSERT(keys && !keys->isEmpty()); | 86 ASSERT(keys && !keys->isEmpty()); |
| 87 m_keys = keys; | 87 m_keys = keys; |
| 88 m_keyText = String(); | 88 m_keyText = String(); |
| 89 ASSERT(m_keyText.isNull()); | 89 ASSERT(m_keyText.isNull()); |
| 90 } | 90 } |
| 91 | 91 |
| 92 MutableStylePropertySet& StyleKeyframe::mutableProperties() | |
| 93 { | |
| 94 if (!m_properties->isMutable()) | |
| 95 m_properties = m_properties->mutableCopy(); | |
| 96 return *toMutableStylePropertySet(m_properties.get()); | |
| 97 } | |
| 98 | |
| 99 void StyleKeyframe::setProperties(PassRefPtr<StylePropertySet> properties) | 92 void StyleKeyframe::setProperties(PassRefPtr<StylePropertySet> properties) |
| 100 { | 93 { |
| 101 ASSERT(properties); | 94 ASSERT(properties); |
| 102 m_properties = properties; | 95 m_properties = properties; |
| 103 } | 96 } |
| 104 | 97 |
| 105 String StyleKeyframe::cssText() const | 98 String StyleKeyframe::cssText() const |
| 106 { | 99 { |
| 107 StringBuilder result; | 100 StringBuilder result; |
| 108 result.append(keyText()); | 101 result.append(keyText()); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 127 // or values higher than 100%, then the keyframe will be ignored." | 120 // or values higher than 100%, then the keyframe will be ignored." |
| 128 keyVector->clear(); | 121 keyVector->clear(); |
| 129 break; | 122 break; |
| 130 } | 123 } |
| 131 keyVector->at(i) = key / 100; | 124 keyVector->at(i) = key / 100; |
| 132 } | 125 } |
| 133 return keyVector.release(); | 126 return keyVector.release(); |
| 134 } | 127 } |
| 135 | 128 |
| 136 } // namespace blink | 129 } // namespace blink |
| OLD | NEW |