| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(animationName); | 98 KeyframesRuleMap::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 void ScopedStyleResolver::addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyfr
ames> rule) | 105 void ScopedStyleResolver::addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyfr
ames> rule) |
| 106 { | 106 { |
| 107 AtomicString s(rule->name()); | 107 AtomicString s(rule->name()); |
| 108 |
| 109 KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(s.impl()); |
| 110 if (it == m_keyframesRuleMap.end() || !(*rule == *it->value)) |
| 111 rule->styleChanged(); |
| 112 |
| 108 if (rule->isVendorPrefixed()) { | 113 if (rule->isVendorPrefixed()) { |
| 109 KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(rule->name().imp
l()); | |
| 110 if (it == m_keyframesRuleMap.end()) | 114 if (it == m_keyframesRuleMap.end()) |
| 111 m_keyframesRuleMap.set(s.impl(), rule); | 115 m_keyframesRuleMap.set(s.impl(), rule); |
| 112 else if (it->value->isVendorPrefixed()) | 116 else if (it->value->isVendorPrefixed()) |
| 113 m_keyframesRuleMap.set(s.impl(), rule); | 117 m_keyframesRuleMap.set(s.impl(), rule); |
| 114 } else { | 118 } else { |
| 115 m_keyframesRuleMap.set(s.impl(), rule); | 119 m_keyframesRuleMap.set(s.impl(), rule); |
| 116 } | 120 } |
| 117 } | 121 } |
| 118 | 122 |
| 119 void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& colle
ctor, bool includeEmptyRules, CascadeScope cascadeScope, CascadeOrder cascadeOrd
er) | 123 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) | 163 void ScopedStyleResolver::trace(Visitor* visitor) |
| 160 { | 164 { |
| 161 #if ENABLE(OILPAN) | 165 #if ENABLE(OILPAN) |
| 162 visitor->trace(m_scope); | 166 visitor->trace(m_scope); |
| 163 visitor->trace(m_authorStyleSheets); | 167 visitor->trace(m_authorStyleSheets); |
| 164 visitor->trace(m_keyframesRuleMap); | 168 visitor->trace(m_keyframesRuleMap); |
| 165 #endif | 169 #endif |
| 166 } | 170 } |
| 167 | 171 |
| 168 } // namespace blink | 172 } // namespace blink |
| OLD | NEW |