| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 if (ScopedStyleResolver* scoped_resolver = | 1207 if (ScopedStyleResolver* scoped_resolver = |
| 1208 element->GetTreeScope().GetScopedStyleResolver()) | 1208 element->GetTreeScope().GetScopedStyleResolver()) |
| 1209 resolvers.push_back(scoped_resolver); | 1209 resolvers.push_back(scoped_resolver); |
| 1210 | 1210 |
| 1211 for (auto& resolver : resolvers) { | 1211 for (auto& resolver : resolvers) { |
| 1212 if (StyleRuleKeyframes* keyframes_rule = | 1212 if (StyleRuleKeyframes* keyframes_rule = |
| 1213 resolver->KeyframeStylesForAnimation(animation_name.Impl())) | 1213 resolver->KeyframeStylesForAnimation(animation_name.Impl())) |
| 1214 return keyframes_rule; | 1214 return keyframes_rule; |
| 1215 } | 1215 } |
| 1216 | 1216 |
| 1217 // This is a workaround for crbug.com/724975. Since the keyframe rules from |
| 1218 // UA style sheets are not available in the resolvers, read those rules |
| 1219 // directly here. |
| 1220 if (element->IsInShadowTree() && |
| 1221 ToShadowRoot(element->GetTreeScope().RootNode()).GetType() == |
| 1222 ShadowRootType::kUserAgent) { |
| 1223 const auto& keyframe_rules = |
| 1224 CSSDefaultStyleSheets::Instance().DefaultStyle()->KeyframesRules(); |
| 1225 for (const auto& rule : keyframe_rules) { |
| 1226 if (rule->GetName() == animation_name) |
| 1227 return rule; |
| 1228 } |
| 1229 } |
| 1230 |
| 1217 for (auto& resolver : resolvers) | 1231 for (auto& resolver : resolvers) |
| 1218 resolver->SetHasUnresolvedKeyframesRule(); | 1232 resolver->SetHasUnresolvedKeyframesRule(); |
| 1219 return nullptr; | 1233 return nullptr; |
| 1220 } | 1234 } |
| 1221 | 1235 |
| 1222 template <CSSPropertyPriority priority> | 1236 template <CSSPropertyPriority priority> |
| 1223 void StyleResolver::ApplyAnimatedProperties( | 1237 void StyleResolver::ApplyAnimatedProperties( |
| 1224 StyleResolverState& state, | 1238 StyleResolverState& state, |
| 1225 const ActiveInterpolationsMap& active_interpolations_map) { | 1239 const ActiveInterpolationsMap& active_interpolations_map) { |
| 1226 // TODO(alancutter): Don't apply presentation attribute animations here, | 1240 // TODO(alancutter): Don't apply presentation attribute animations here, |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2035 | 2049 |
| 2036 DEFINE_TRACE(StyleResolver) { | 2050 DEFINE_TRACE(StyleResolver) { |
| 2037 visitor->Trace(matched_properties_cache_); | 2051 visitor->Trace(matched_properties_cache_); |
| 2038 visitor->Trace(selector_filter_); | 2052 visitor->Trace(selector_filter_); |
| 2039 visitor->Trace(style_sharing_lists_); | 2053 visitor->Trace(style_sharing_lists_); |
| 2040 visitor->Trace(document_); | 2054 visitor->Trace(document_); |
| 2041 visitor->Trace(tracker_); | 2055 visitor->Trace(tracker_); |
| 2042 } | 2056 } |
| 2043 | 2057 |
| 2044 } // namespace blink | 2058 } // namespace blink |
| OLD | NEW |