OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 treeScope.document().hasNodesWithPlaceholderStyle()) { | 1077 treeScope.document().hasNodesWithPlaceholderStyle()) { |
1078 treeScope.document().setNeedsStyleRecalc( | 1078 treeScope.document().setNeedsStyleRecalc( |
1079 SubtreeStyleChange, StyleChangeReasonForTracing::create( | 1079 SubtreeStyleChange, StyleChangeReasonForTracing::create( |
1080 StyleChangeReason::CleanupPlaceholderStyles)); | 1080 StyleChangeReason::CleanupPlaceholderStyles)); |
1081 return; | 1081 return; |
1082 } | 1082 } |
1083 | 1083 |
1084 if (changedRuleFlags & KeyframesRules) | 1084 if (changedRuleFlags & KeyframesRules) |
1085 ScopedStyleResolver::keyframesRulesAdded(treeScope); | 1085 ScopedStyleResolver::keyframesRulesAdded(treeScope); |
1086 | 1086 |
| 1087 Node& invalidationRoot = |
| 1088 ScopedStyleResolver::invalidationRootForTreeScope(treeScope); |
| 1089 if (invalidationRoot.getStyleChangeType() >= SubtreeStyleChange) |
| 1090 return; |
| 1091 |
1087 if (fontsChanged || (changedRuleFlags & FullRecalcRules)) { | 1092 if (fontsChanged || (changedRuleFlags & FullRecalcRules)) { |
1088 ScopedStyleResolver::invalidationRootForTreeScope(treeScope) | 1093 invalidationRoot.setNeedsStyleRecalc( |
1089 .setNeedsStyleRecalc(SubtreeStyleChange, | 1094 SubtreeStyleChange, StyleChangeReasonForTracing::create( |
1090 StyleChangeReasonForTracing::create( | 1095 StyleChangeReason::ActiveStylesheetsUpdate)); |
1091 StyleChangeReason::ActiveStylesheetsUpdate)); | |
1092 return; | 1096 return; |
1093 } | 1097 } |
1094 | 1098 |
1095 scheduleInvalidationsForRuleSets(treeScope, changedRuleSets); | 1099 scheduleInvalidationsForRuleSets(treeScope, changedRuleSets); |
1096 } | 1100 } |
1097 | 1101 |
1098 const MediaQueryEvaluator& StyleEngine::ensureMediaQueryEvaluator() { | 1102 const MediaQueryEvaluator& StyleEngine::ensureMediaQueryEvaluator() { |
1099 if (!m_mediaQueryEvaluator) { | 1103 if (!m_mediaQueryEvaluator) { |
1100 if (document().frame()) | 1104 if (document().frame()) |
1101 m_mediaQueryEvaluator = new MediaQueryEvaluator(document().frame()); | 1105 m_mediaQueryEvaluator = new MediaQueryEvaluator(document().frame()); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 } | 1153 } |
1150 | 1154 |
1151 DEFINE_TRACE_WRAPPERS(StyleEngine) { | 1155 DEFINE_TRACE_WRAPPERS(StyleEngine) { |
1152 for (auto sheet : m_injectedAuthorStyleSheets) { | 1156 for (auto sheet : m_injectedAuthorStyleSheets) { |
1153 visitor->traceWrappers(sheet); | 1157 visitor->traceWrappers(sheet); |
1154 } | 1158 } |
1155 visitor->traceWrappers(m_documentStyleSheetCollection); | 1159 visitor->traceWrappers(m_documentStyleSheetCollection); |
1156 } | 1160 } |
1157 | 1161 |
1158 } // namespace blink | 1162 } // namespace blink |
OLD | NEW |