| 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 StyleRuleKeyframes* ScopedStyleResolver::keyframeStylesForAnimation(const String
Impl* animationName) |
| 94 { | 94 { |
| 95 if (m_keyframesRuleMap.isEmpty()) | 95 if (m_keyframesRuleMap.isEmpty()) |
| 96 return 0; | 96 return nullptr; |
| 97 | 97 |
| 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 nullptr; |
| 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 |
| 108 if (rule->isVendorPrefixed()) { | 109 if (rule->isVendorPrefixed()) { |
| 109 KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(rule->name().imp
l()); | 110 KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(s.impl()); |
| 110 if (it == m_keyframesRuleMap.end()) | 111 if (it == m_keyframesRuleMap.end()) |
| 111 m_keyframesRuleMap.set(s.impl(), rule); | 112 m_keyframesRuleMap.set(s.impl(), rule); |
| 112 else if (it->value->isVendorPrefixed()) | 113 else if (it->value->isVendorPrefixed()) |
| 113 m_keyframesRuleMap.set(s.impl(), rule); | 114 m_keyframesRuleMap.set(s.impl(), rule); |
| 114 } else { | 115 } else { |
| 115 m_keyframesRuleMap.set(s.impl(), rule); | 116 m_keyframesRuleMap.set(s.impl(), rule); |
| 116 } | 117 } |
| 117 } | 118 } |
| 118 | 119 |
| 119 void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& colle
ctor, bool includeEmptyRules, CascadeOrder cascadeOrder) | 120 void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& colle
ctor, bool includeEmptyRules, CascadeOrder cascadeOrder) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 void ScopedStyleResolver::trace(Visitor* visitor) | 160 void ScopedStyleResolver::trace(Visitor* visitor) |
| 160 { | 161 { |
| 161 #if ENABLE(OILPAN) | 162 #if ENABLE(OILPAN) |
| 162 visitor->trace(m_scope); | 163 visitor->trace(m_scope); |
| 163 visitor->trace(m_authorStyleSheets); | 164 visitor->trace(m_authorStyleSheets); |
| 164 visitor->trace(m_keyframesRuleMap); | 165 visitor->trace(m_keyframesRuleMap); |
| 165 #endif | 166 #endif |
| 166 } | 167 } |
| 167 | 168 |
| 168 } // namespace blink | 169 } // namespace blink |
| OLD | NEW |