OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
4 * Copyright (C) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 features.add(contents->ruleSet().features()); | 83 features.add(contents->ruleSet().features()); |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 void ScopedStyleResolver::resetAuthorStyle() | 87 void ScopedStyleResolver::resetAuthorStyle() |
88 { | 88 { |
89 m_authorStyleSheets.clear(); | 89 m_authorStyleSheets.clear(); |
90 m_keyframesRuleMap.clear(); | 90 m_keyframesRuleMap.clear(); |
91 } | 91 } |
92 | 92 |
93 const StyleRuleKeyframes* ScopedStyleResolver::keyframeStylesForAnimation(const StringImpl* animationName) | 93 const StyleRuleKeyframes* ScopedStyleResolver::keyframeStylesForAnimation(const StringImpl* animationName) const |
94 { | 94 { |
95 if (m_keyframesRuleMap.isEmpty()) | 95 if (m_keyframesRuleMap.isEmpty()) |
96 return 0; | 96 return 0; |
97 | 97 |
98 KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(animationName); | 98 KeyframesRuleMap::const_iterator it = m_keyframesRuleMap.find(animationName) ; |
99 if (it == m_keyframesRuleMap.end()) | 99 if (it == m_keyframesRuleMap.end()) |
100 return 0; | 100 return 0; |
101 | 101 |
102 return it->value.get(); | 102 return it->value.get(); |
103 } | 103 } |
104 | 104 |
105 PassRefPtrWillBeRawPtr<StyleRuleKeyframes> ScopedStyleResolver::keyframeStylesFo rAnimation(const StringImpl* animationName) | |
106 { | |
107 if (m_keyframesRuleMap.isEmpty()) | |
108 return nullptr; | |
109 | |
110 KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(animationName); | |
111 if (it == m_keyframesRuleMap.end()) | |
112 return nullptr; | |
113 | |
114 return it->value; | |
115 } | |
116 | |
105 void ScopedStyleResolver::addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyfr ames> rule) | 117 void ScopedStyleResolver::addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyfr ames> rule) |
106 { | 118 { |
107 AtomicString s(rule->name()); | 119 AtomicString s(rule->name()); |
120 | |
121 rule->styleChanged(); | |
dstockwell
2015/01/05 07:31:18
I think on Friday we discussed that we need to cal
shend
2015/01/06 00:36:17
Modifying the style of an existing keyframe seems
dstockwell
2015/01/07 00:18:33
Hmm, but how does that work?
shend
2015/01/08 05:05:29
I'm not exactly sure, but if you follow the call t
dstockwell
2015/01/08 05:27:24
Ahh, I see! I think I misunderstood the purpose of
| |
122 | |
108 if (rule->isVendorPrefixed()) { | 123 if (rule->isVendorPrefixed()) { |
109 KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(rule->name().imp l()); | 124 KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(s.impl()); |
110 if (it == m_keyframesRuleMap.end()) | 125 if (it == m_keyframesRuleMap.end()) |
111 m_keyframesRuleMap.set(s.impl(), rule); | 126 m_keyframesRuleMap.set(s.impl(), rule); |
112 else if (it->value->isVendorPrefixed()) | 127 else if (it->value->isVendorPrefixed()) |
113 m_keyframesRuleMap.set(s.impl(), rule); | 128 m_keyframesRuleMap.set(s.impl(), rule); |
114 } else { | 129 } else { |
115 m_keyframesRuleMap.set(s.impl(), rule); | 130 m_keyframesRuleMap.set(s.impl(), rule); |
116 } | 131 } |
117 } | 132 } |
118 | 133 |
119 void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& colle ctor, bool includeEmptyRules, CascadeScope cascadeScope, CascadeOrder cascadeOrd er) | 134 void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& colle ctor, bool includeEmptyRules, CascadeScope cascadeScope, CascadeOrder cascadeOrd er) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 void ScopedStyleResolver::trace(Visitor* visitor) | 174 void ScopedStyleResolver::trace(Visitor* visitor) |
160 { | 175 { |
161 #if ENABLE(OILPAN) | 176 #if ENABLE(OILPAN) |
162 visitor->trace(m_scope); | 177 visitor->trace(m_scope); |
163 visitor->trace(m_authorStyleSheets); | 178 visitor->trace(m_authorStyleSheets); |
164 visitor->trace(m_keyframesRuleMap); | 179 visitor->trace(m_keyframesRuleMap); |
165 #endif | 180 #endif |
166 } | 181 } |
167 | 182 |
168 } // namespace blink | 183 } // namespace blink |
OLD | NEW |