OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 { | 59 { |
60 return m_name; | 60 return m_name; |
61 } | 61 } |
62 | 62 |
63 void WebKitCSSKeyframesRule::setName(const String& name) | 63 void WebKitCSSKeyframesRule::setName(const String& name) |
64 { | 64 { |
65 m_name = name; | 65 m_name = name; |
66 | 66 |
67 // Since the name is used in the keyframe map list in CSSStyleSelector, we n
eed | 67 // Since the name is used in the keyframe map list in CSSStyleSelector, we n
eed |
68 // to recompute the style sheet to get the updated name. | 68 // to recompute the style sheet to get the updated name. |
69 stylesheet()->styleSheetChanged(); | 69 if (stylesheet()) |
| 70 stylesheet()->styleSheetChanged(); |
70 } | 71 } |
71 | 72 |
72 unsigned WebKitCSSKeyframesRule::length() const | 73 unsigned WebKitCSSKeyframesRule::length() const |
73 { | 74 { |
74 return m_lstCSSRules.get()->length(); | 75 return m_lstCSSRules.get()->length(); |
75 } | 76 } |
76 | 77 |
77 WebKitCSSKeyframeRule* WebKitCSSKeyframesRule::item(unsigned index) | 78 WebKitCSSKeyframeRule* WebKitCSSKeyframesRule::item(unsigned index) |
78 { | 79 { |
79 CSSRule* rule = m_lstCSSRules.get()->item(index); | 80 CSSRule* rule = m_lstCSSRules.get()->item(index); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 result += m_lstCSSRules->item(i)->cssText(); | 151 result += m_lstCSSRules->item(i)->cssText(); |
151 result += "\n"; | 152 result += "\n"; |
152 } | 153 } |
153 } | 154 } |
154 | 155 |
155 result += "}"; | 156 result += "}"; |
156 return result; | 157 return result; |
157 } | 158 } |
158 | 159 |
159 } // namespace WebCore | 160 } // namespace WebCore |
OLD | NEW |