| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 styleSheet->contents()->parseStringAtPosition(text, startPosition); | 565 styleSheet->contents()->parseStringAtPosition(text, startPosition); |
| 566 return styleSheet; | 566 return styleSheet; |
| 567 } | 567 } |
| 568 | 568 |
| 569 void StyleEngine::collectScopedStyleFeaturesTo(RuleFeatureSet& features) const { | 569 void StyleEngine::collectScopedStyleFeaturesTo(RuleFeatureSet& features) const { |
| 570 HeapHashSet<Member<const StyleSheetContents>> visitedSharedStyleSheetContents; | 570 HeapHashSet<Member<const StyleSheetContents>> visitedSharedStyleSheetContents; |
| 571 if (document().scopedStyleResolver()) | 571 if (document().scopedStyleResolver()) |
| 572 document().scopedStyleResolver()->collectFeaturesTo( | 572 document().scopedStyleResolver()->collectFeaturesTo( |
| 573 features, visitedSharedStyleSheetContents); | 573 features, visitedSharedStyleSheetContents); |
| 574 for (TreeScope* treeScope : m_activeTreeScopes) { | 574 for (TreeScope* treeScope : m_activeTreeScopes) { |
| 575 // When creating StyleResolver, dirty treescopes might not be processed. | |
| 576 // So some active treescopes might not have a scoped style resolver. | |
| 577 // In this case, we should skip collectFeatures for the treescopes without | |
| 578 // scoped style resolvers. When invoking updateActiveStyleSheets, | |
| 579 // the treescope's features will be processed. | |
| 580 if (ScopedStyleResolver* resolver = treeScope->scopedStyleResolver()) | 575 if (ScopedStyleResolver* resolver = treeScope->scopedStyleResolver()) |
| 581 resolver->collectFeaturesTo(features, visitedSharedStyleSheetContents); | 576 resolver->collectFeaturesTo(features, visitedSharedStyleSheetContents); |
| 582 } | 577 } |
| 583 } | 578 } |
| 584 | 579 |
| 585 void StyleEngine::fontsNeedUpdate(CSSFontSelector*) { | 580 void StyleEngine::fontsNeedUpdate(CSSFontSelector*) { |
| 586 if (!document().isActive()) | 581 if (!document().isActive()) |
| 587 return; | 582 return; |
| 588 | 583 |
| 589 if (m_resolver) | 584 if (m_resolver) |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 } | 1149 } |
| 1155 | 1150 |
| 1156 DEFINE_TRACE_WRAPPERS(StyleEngine) { | 1151 DEFINE_TRACE_WRAPPERS(StyleEngine) { |
| 1157 for (auto sheet : m_injectedAuthorStyleSheets) { | 1152 for (auto sheet : m_injectedAuthorStyleSheets) { |
| 1158 visitor->traceWrappers(sheet); | 1153 visitor->traceWrappers(sheet); |
| 1159 } | 1154 } |
| 1160 visitor->traceWrappers(m_documentStyleSheetCollection); | 1155 visitor->traceWrappers(m_documentStyleSheetCollection); |
| 1161 } | 1156 } |
| 1162 | 1157 |
| 1163 } // namespace blink | 1158 } // namespace blink |
| OLD | NEW |