Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: Source/core/dom/StyleSheetCollection.cpp

Issue 20856002: applyXSLTransform is too eager (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/ProcessingInstruction.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StyleSheetCollection.cpp
diff --git a/Source/core/dom/StyleSheetCollection.cpp b/Source/core/dom/StyleSheetCollection.cpp
index 52fbaed865e45042e4a6af0721859fe9a6215bac..80ca3d2a96764e872e2b7d9936a23de390a8d203 100644
--- a/Source/core/dom/StyleSheetCollection.cpp
+++ b/Source/core/dom/StyleSheetCollection.cpp
@@ -97,14 +97,14 @@ void StyleSheetCollection::collectStyleSheets(DocumentStyleSheetCollection* coll
Node* n = *it;
StyleSheet* sheet = 0;
CSSStyleSheet* activeSheet = 0;
- if (n->nodeType() == Node::PROCESSING_INSTRUCTION_NODE) {
+ if (n->nodeType() == Node::PROCESSING_INSTRUCTION_NODE && !document()->isHTMLDocument()) {
// Processing instruction (XML documents only).
// We don't support linking to embedded CSS stylesheets, see <https://bugs.webkit.org/show_bug.cgi?id=49281> for discussion.
ProcessingInstruction* pi = static_cast<ProcessingInstruction*>(n);
// Don't apply XSL transforms to already transformed documents -- <rdar://problem/4132806>
if (pi->isXSL() && !document()->transformSourceDocument()) {
// Don't apply XSL transforms until loading is finished.
- if (!document()->parsing())
+ if (!document()->parsing() && !pi->isLoading())
document()->applyXSLTransform(pi);
return;
}
« no previous file with comments | « Source/core/dom/ProcessingInstruction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698