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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 231 } |
232 | 232 |
233 void StyleEngine::modifiedStyleSheetCandidateNode(Node& node) { | 233 void StyleEngine::modifiedStyleSheetCandidateNode(Node& node) { |
234 if (!node.isConnected()) | 234 if (!node.isConnected()) |
235 return; | 235 return; |
236 | 236 |
237 markTreeScopeDirty(node.treeScope()); | 237 markTreeScopeDirty(node.treeScope()); |
238 resolverChanged(AnalyzedStyleUpdate); | 238 resolverChanged(AnalyzedStyleUpdate); |
239 } | 239 } |
240 | 240 |
| 241 void StyleEngine::mediaQueriesChangedInScope(TreeScope& treeScope) { |
| 242 if (ScopedStyleResolver* resolver = treeScope.scopedStyleResolver()) |
| 243 resolver->setNeedsAppendAllSheets(); |
| 244 setNeedsActiveStyleUpdate(treeScope); |
| 245 } |
| 246 |
241 void StyleEngine::watchedSelectorsChanged() { | 247 void StyleEngine::watchedSelectorsChanged() { |
242 m_globalRuleSet.initWatchedSelectorsRuleSet(document()); | 248 m_globalRuleSet.initWatchedSelectorsRuleSet(document()); |
243 // TODO(rune@opera.com): Should be able to use RuleSetInvalidation here. | 249 // TODO(rune@opera.com): Should be able to use RuleSetInvalidation here. |
244 document().setNeedsStyleRecalc(SubtreeStyleChange, | 250 document().setNeedsStyleRecalc(SubtreeStyleChange, |
245 StyleChangeReasonForTracing::create( | 251 StyleChangeReasonForTracing::create( |
246 StyleChangeReason::DeclarativeContent)); | 252 StyleChangeReason::DeclarativeContent)); |
247 } | 253 } |
248 | 254 |
249 bool StyleEngine::shouldUpdateDocumentStyleSheetCollection() const { | 255 bool StyleEngine::shouldUpdateDocumentStyleSheetCollection() const { |
250 return m_allTreeScopesDirty || m_documentScopeDirty; | 256 return m_allTreeScopesDirty || m_documentScopeDirty; |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 } | 1238 } |
1233 | 1239 |
1234 DEFINE_TRACE_WRAPPERS(StyleEngine) { | 1240 DEFINE_TRACE_WRAPPERS(StyleEngine) { |
1235 for (auto sheet : m_injectedAuthorStyleSheets) { | 1241 for (auto sheet : m_injectedAuthorStyleSheets) { |
1236 visitor->traceWrappers(sheet); | 1242 visitor->traceWrappers(sheet); |
1237 } | 1243 } |
1238 visitor->traceWrappers(m_documentStyleSheetCollection); | 1244 visitor->traceWrappers(m_documentStyleSheetCollection); |
1239 } | 1245 } |
1240 | 1246 |
1241 } // namespace blink | 1247 } // namespace blink |
OLD | NEW |