| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 CSSKeyframeRule* CSSKeyframesRule::findRule(const String& s) | 156 CSSKeyframeRule* CSSKeyframesRule::findRule(const String& s) |
| 157 { | 157 { |
| 158 int i = m_keyframesRule->findKeyframeIndex(s); | 158 int i = m_keyframesRule->findKeyframeIndex(s); |
| 159 return (i >= 0) ? item(i) : 0; | 159 return (i >= 0) ? item(i) : 0; |
| 160 } | 160 } |
| 161 | 161 |
| 162 String CSSKeyframesRule::cssText() const | 162 String CSSKeyframesRule::cssText() const |
| 163 { | 163 { |
| 164 StringBuilder result; | 164 StringBuilder result; |
| 165 if (isVendorPrefixed()) | 165 if (isVendorPrefixed()) |
| 166 result.append("@-webkit-keyframes "); | 166 result.appendLiteral("@-webkit-keyframes "); |
| 167 else | 167 else |
| 168 result.append("@keyframes "); | 168 result.appendLiteral("@keyframes "); |
| 169 result.append(name()); | 169 result.append(name()); |
| 170 result.append(" { \n"); | 170 result.appendLiteral(" { \n"); |
| 171 | 171 |
| 172 unsigned size = length(); | 172 unsigned size = length(); |
| 173 for (unsigned i = 0; i < size; ++i) { | 173 for (unsigned i = 0; i < size; ++i) { |
| 174 result.append(" "); | 174 result.appendLiteral(" "); |
| 175 result.append(m_keyframesRule->keyframes()[i]->cssText()); | 175 result.append(m_keyframesRule->keyframes()[i]->cssText()); |
| 176 result.append("\n"); | 176 result.append('\n'); |
| 177 } | 177 } |
| 178 result.append("}"); | 178 result.append('}'); |
| 179 return result.toString(); | 179 return result.toString(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 unsigned CSSKeyframesRule::length() const | 182 unsigned CSSKeyframesRule::length() const |
| 183 { | 183 { |
| 184 return m_keyframesRule->keyframes().size(); | 184 return m_keyframesRule->keyframes().size(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const | 187 CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const |
| 188 { | 188 { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 214 { | 214 { |
| 215 CSSRule::trace(visitor); | 215 CSSRule::trace(visitor); |
| 216 #if ENABLE(OILPAN) | 216 #if ENABLE(OILPAN) |
| 217 visitor->trace(m_childRuleCSSOMWrappers); | 217 visitor->trace(m_childRuleCSSOMWrappers); |
| 218 #endif | 218 #endif |
| 219 visitor->trace(m_keyframesRule); | 219 visitor->trace(m_keyframesRule); |
| 220 visitor->trace(m_ruleListCSSOMWrapper); | 220 visitor->trace(m_ruleListCSSOMWrapper); |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace blink | 223 } // namespace blink |
| OLD | NEW |