| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 ASSERT(keys && !keys->isEmpty()); | 89 ASSERT(keys && !keys->isEmpty()); |
| 90 m_keys = keys; | 90 m_keys = keys; |
| 91 m_keyText = String(); | 91 m_keyText = String(); |
| 92 ASSERT(m_keyText.isNull()); | 92 ASSERT(m_keyText.isNull()); |
| 93 } | 93 } |
| 94 | 94 |
| 95 MutableStylePropertySet& StyleKeyframe::mutableProperties() | 95 MutableStylePropertySet& StyleKeyframe::mutableProperties() |
| 96 { | 96 { |
| 97 if (!m_properties->isMutable()) | 97 if (!m_properties->isMutable()) |
| 98 m_properties = m_properties->mutableCopy(); | 98 m_properties = m_properties->mutableCopy(); |
| 99 return *toMutableStylePropertySet(m_properties); | 99 return *toMutableStylePropertySet(m_properties.get()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void StyleKeyframe::setProperties(PassRefPtr<StylePropertySet> properties) | 102 void StyleKeyframe::setProperties(PassRefPtrWillBeRawPtr<StylePropertySet> prope
rties) |
| 103 { | 103 { |
| 104 ASSERT(properties); | 104 ASSERT(properties); |
| 105 m_properties = properties; | 105 m_properties = properties; |
| 106 } | 106 } |
| 107 | 107 |
| 108 String StyleKeyframe::cssText() const | 108 String StyleKeyframe::cssText() const |
| 109 { | 109 { |
| 110 StringBuilder result; | 110 StringBuilder result; |
| 111 result.append(keyText()); | 111 result.append(keyText()); |
| 112 result.appendLiteral(" { "); | 112 result.appendLiteral(" { "); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 129 // "If a keyframe selector specifies negative percentage values | 129 // "If a keyframe selector specifies negative percentage values |
| 130 // or values higher than 100%, then the keyframe will be ignored." | 130 // or values higher than 100%, then the keyframe will be ignored." |
| 131 keyVector->clear(); | 131 keyVector->clear(); |
| 132 break; | 132 break; |
| 133 } | 133 } |
| 134 keyVector->at(i) = key / 100; | 134 keyVector->at(i) = key / 100; |
| 135 } | 135 } |
| 136 return keyVector.release(); | 136 return keyVector.release(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void StyleKeyframe::trace(Visitor* visitor) |
| 140 { |
| 141 visitor->trace(m_properties); |
| 142 } |
| 139 | 143 |
| 140 CSSKeyframeRule::CSSKeyframeRule(StyleKeyframe* keyframe, CSSKeyframesRule* pare
nt) | 144 CSSKeyframeRule::CSSKeyframeRule(StyleKeyframe* keyframe, CSSKeyframesRule* pare
nt) |
| 141 : CSSRule(0) | 145 : CSSRule(0) |
| 142 , m_keyframe(keyframe) | 146 , m_keyframe(keyframe) |
| 143 { | 147 { |
| 144 setParentRule(parent); | 148 setParentRule(parent); |
| 145 } | 149 } |
| 146 | 150 |
| 147 CSSKeyframeRule::~CSSKeyframeRule() | 151 CSSKeyframeRule::~CSSKeyframeRule() |
| 148 { | 152 { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 166 } | 170 } |
| 167 | 171 |
| 168 void CSSKeyframeRule::trace(Visitor* visitor) | 172 void CSSKeyframeRule::trace(Visitor* visitor) |
| 169 { | 173 { |
| 170 visitor->trace(m_keyframe); | 174 visitor->trace(m_keyframe); |
| 171 visitor->trace(m_propertiesCSSOMWrapper); | 175 visitor->trace(m_propertiesCSSOMWrapper); |
| 172 CSSRule::trace(visitor); | 176 CSSRule::trace(visitor); |
| 173 } | 177 } |
| 174 | 178 |
| 175 } // namespace WebCore | 179 } // namespace WebCore |
| OLD | NEW |