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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 void DocumentStyleSheetCollection::collectStyleSheetsFromCandidates(StyleEngine*
engine, DocumentStyleSheetCollector& collector) | 57 void DocumentStyleSheetCollection::collectStyleSheetsFromCandidates(StyleEngine*
engine, DocumentStyleSheetCollector& collector) |
58 { | 58 { |
59 DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin(); | 59 DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin(); |
60 DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end(); | 60 DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end(); |
61 for (DocumentOrderedList::iterator it = begin; it != end; ++it) { | 61 for (DocumentOrderedList::iterator it = begin; it != end; ++it) { |
62 Node* n = *it; | 62 Node* n = *it; |
63 StyleSheetCandidate candidate(*n); | 63 StyleSheetCandidate candidate(*n); |
64 | 64 |
65 if (candidate.isXSL()) { | 65 ASSERT(!candidate.isXSL()); |
66 // Processing instruction (XML documents only). | |
67 // We don't support linking to embedded CSS stylesheets, see <https:
//bugs.webkit.org/show_bug.cgi?id=49281> for discussion. | |
68 // Don't apply XSL transforms to already transformed documents -- <r
dar://problem/4132806> | |
69 if (RuntimeEnabledFeatures::xsltEnabled() && !document().transformSo
urceDocument()) { | |
70 ProcessingInstruction* pi = toProcessingInstruction(n); | |
71 // Don't apply XSL transforms until loading is finished. | |
72 if (!document().parsing() && !pi->isLoading()) | |
73 document().applyXSLTransform(pi); | |
74 return; | |
75 } | |
76 | |
77 continue; | |
78 } | |
79 | |
80 if (candidate.isImport()) { | 66 if (candidate.isImport()) { |
81 Document* document = candidate.importedDocument(); | 67 Document* document = candidate.importedDocument(); |
82 if (!document) | 68 if (!document) |
83 continue; | 69 continue; |
84 if (collector.hasVisited(document)) | 70 if (collector.hasVisited(document)) |
85 continue; | 71 continue; |
86 collector.willVisit(document); | 72 collector.willVisit(document); |
87 document->styleEngine()->updateStyleSheetsInImport(collector); | 73 document->styleEngine()->updateStyleSheetsInImport(collector); |
88 continue; | 74 continue; |
89 } | 75 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); | 132 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); |
147 | 133 |
148 collection.swap(*this); | 134 collection.swap(*this); |
149 | 135 |
150 updateUsesRemUnits(); | 136 updateUsesRemUnits(); |
151 | 137 |
152 return change.requiresFullStyleRecalc; | 138 return change.requiresFullStyleRecalc; |
153 } | 139 } |
154 | 140 |
155 } | 141 } |
OLD | NEW |