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, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 continue; | 97 continue; |
98 | 98 |
99 if (candidate.hasPreferrableName(engine->preferredStylesheetSetName())) | 99 if (candidate.hasPreferrableName(engine->preferredStylesheetSetName())) |
100 engine->selectStylesheetSetName(candidate.title()); | 100 engine->selectStylesheetSetName(candidate.title()); |
101 collector.appendSheetForList(sheet); | 101 collector.appendSheetForList(sheet); |
102 if (candidate.canBeActivated(engine->preferredStylesheetSetName())) | 102 if (candidate.canBeActivated(engine->preferredStylesheetSetName())) |
103 collector.appendActiveStyleSheet(toCSSStyleSheet(sheet)); | 103 collector.appendActiveStyleSheet(toCSSStyleSheet(sheet)); |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 static void collectActiveCSSStyleSheetsFromSeamlessParents(DocumentStyleSheetCol
lector& collector, Document* document) | |
108 { | |
109 HTMLIFrameElement* seamlessParentIFrame = document->seamlessParentIFrame(); | |
110 if (!seamlessParentIFrame) | |
111 return; | |
112 collector.appendActiveStyleSheets(seamlessParentIFrame->document().styleEngi
ne()->activeAuthorStyleSheets()); | |
113 } | |
114 | |
115 void DocumentStyleSheetCollection::collectStyleSheets(StyleEngine* engine, Docum
entStyleSheetCollector& collector) | 107 void DocumentStyleSheetCollection::collectStyleSheets(StyleEngine* engine, Docum
entStyleSheetCollector& collector) |
116 { | 108 { |
117 ASSERT(document()->styleEngine() == engine); | 109 ASSERT(document()->styleEngine() == engine); |
118 collector.appendActiveStyleSheets(engine->injectedAuthorStyleSheets()); | 110 collector.appendActiveStyleSheets(engine->injectedAuthorStyleSheets()); |
119 collector.appendActiveStyleSheets(engine->documentAuthorStyleSheets()); | 111 collector.appendActiveStyleSheets(engine->documentAuthorStyleSheets()); |
120 collectActiveCSSStyleSheetsFromSeamlessParents(collector, document()); | |
121 collectStyleSheetsFromCandidates(engine, collector); | 112 collectStyleSheetsFromCandidates(engine, collector); |
122 } | 113 } |
123 | 114 |
124 bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleEngine* engine,
StyleResolverUpdateMode updateMode) | 115 bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleEngine* engine,
StyleResolverUpdateMode updateMode) |
125 { | 116 { |
126 StyleSheetCollectionBase collection; | 117 StyleSheetCollectionBase collection; |
127 ActiveDocumentStyleSheetCollector collector(collection); | 118 ActiveDocumentStyleSheetCollector collector(collection); |
128 collectStyleSheets(engine, collector); | 119 collectStyleSheets(engine, collector); |
129 | 120 |
130 StyleSheetChange change; | 121 StyleSheetChange change; |
(...skipping 22 matching lines...) Expand all Loading... |
153 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); | 144 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); |
154 | 145 |
155 collection.swap(*this); | 146 collection.swap(*this); |
156 | 147 |
157 updateUsesRemUnits(); | 148 updateUsesRemUnits(); |
158 | 149 |
159 return change.requiresFullStyleRecalc; | 150 return change.requiresFullStyleRecalc; |
160 } | 151 } |
161 | 152 |
162 } | 153 } |
OLD | NEW |