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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #include "config.h" | 28 #include "config.h" |
29 #include "core/dom/StyleEngine.h" | 29 #include "core/dom/StyleEngine.h" |
30 | 30 |
31 #include "HTMLNames.h" | 31 #include "HTMLNames.h" |
32 #include "SVGNames.h" | 32 #include "SVGNames.h" |
33 #include "core/css/CSSFontSelector.h" | 33 #include "core/css/CSSFontSelector.h" |
34 #include "core/css/CSSStyleSheet.h" | 34 #include "core/css/CSSStyleSheet.h" |
35 #include "core/css/StyleInvalidationAnalysis.h" | 35 #include "core/css/StyleInvalidationAnalysis.h" |
36 #include "core/css/StyleSheetContents.h" | 36 #include "core/css/StyleSheetContents.h" |
| 37 #include "core/dom/DocumentStyleSheetCollector.h" |
37 #include "core/dom/Element.h" | 38 #include "core/dom/Element.h" |
38 #include "core/dom/ProcessingInstruction.h" | 39 #include "core/dom/ProcessingInstruction.h" |
39 #include "core/dom/ShadowTreeStyleSheetCollection.h" | 40 #include "core/dom/ShadowTreeStyleSheetCollection.h" |
40 #include "core/dom/shadow/ShadowRoot.h" | 41 #include "core/dom/shadow/ShadowRoot.h" |
41 #include "core/html/HTMLIFrameElement.h" | 42 #include "core/html/HTMLIFrameElement.h" |
42 #include "core/html/HTMLImport.h" | 43 #include "core/html/HTMLImport.h" |
43 #include "core/html/HTMLLinkElement.h" | 44 #include "core/html/HTMLLinkElement.h" |
44 #include "core/inspector/InspectorInstrumentation.h" | 45 #include "core/inspector/InspectorInstrumentation.h" |
45 #include "core/page/Page.h" | 46 #include "core/page/Page.h" |
46 #include "core/page/PageGroup.h" | 47 #include "core/page/PageGroup.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 342 } |
342 } | 343 } |
343 | 344 |
344 void StyleEngine::clearMediaQueryRuleSetStyleSheets() | 345 void StyleEngine::clearMediaQueryRuleSetStyleSheets() |
345 { | 346 { |
346 m_documentStyleSheetCollection.clearMediaQueryRuleSetStyleSheets(); | 347 m_documentStyleSheetCollection.clearMediaQueryRuleSetStyleSheets(); |
347 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_activeTreeScopes); | 348 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_activeTreeScopes); |
348 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_dirtyTreeScopes); | 349 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_dirtyTreeScopes); |
349 } | 350 } |
350 | 351 |
351 void StyleEngine::collectDocumentStyleSheets(DocumentStyleSheetCollector& collec
tor) | 352 void StyleEngine::updateStyleSheetsInImport(DocumentStyleSheetCollector& parentC
ollector) |
352 { | 353 { |
353 m_documentStyleSheetCollection.collectStyleSheets(this, collector); | 354 ASSERT(!isMaster()); |
| 355 Vector<RefPtr<StyleSheet> > sheetsForList; |
| 356 ImportedDocumentStyleSheetCollector subcollector(parentCollector, sheetsForL
ist); |
| 357 m_documentStyleSheetCollection.collectStyleSheets(this, subcollector); |
| 358 m_documentStyleSheetCollection.swapSheetsForSheetList(sheetsForList); |
354 } | 359 } |
355 | 360 |
356 bool StyleEngine::updateActiveStyleSheets(StyleResolverUpdateMode updateMode) | 361 bool StyleEngine::updateActiveStyleSheets(StyleResolverUpdateMode updateMode) |
357 { | 362 { |
358 ASSERT(isMaster()); | 363 ASSERT(isMaster()); |
359 ASSERT(!m_document.inStyleRecalc()); | 364 ASSERT(!m_document.inStyleRecalc()); |
360 | 365 |
361 if (!m_document.isActive()) | 366 if (!m_document.isActive()) |
362 return false; | 367 return false; |
363 | 368 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 { | 613 { |
609 HashMap<StyleSheetContents*, AtomicString>::iterator it = sheetToTextCache()
.find(contents); | 614 HashMap<StyleSheetContents*, AtomicString>::iterator it = sheetToTextCache()
.find(contents); |
610 if (it == sheetToTextCache().end()) | 615 if (it == sheetToTextCache().end()) |
611 return; | 616 return; |
612 | 617 |
613 textToSheetCache().remove(it->value); | 618 textToSheetCache().remove(it->value); |
614 sheetToTextCache().remove(contents); | 619 sheetToTextCache().remove(contents); |
615 } | 620 } |
616 | 621 |
617 } | 622 } |
OLD | NEW |