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

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

Issue 257363002: Added addXSLStyleSheet and removeXSLStyleSheet to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
Index: Source/core/dom/ProcessingInstruction.cpp
diff --git a/Source/core/dom/ProcessingInstruction.cpp b/Source/core/dom/ProcessingInstruction.cpp
index 59df65c9773d09395286a316cbb85d838c773867..84d7daf21d201bdbd48cac4d155adfd7bfbeada6 100644
--- a/Source/core/dom/ProcessingInstruction.cpp
+++ b/Source/core/dom/ProcessingInstruction.cpp
@@ -59,8 +59,12 @@ ProcessingInstruction::~ProcessingInstruction()
if (m_sheet)
m_sheet->clearOwnerNode();
- if (inDocument())
- document().styleEngine()->removeStyleSheetCandidateNode(this);
+ if (inDocument()) {
esprehn 2014/06/06 01:32:55 This does doesn't make any sense, you can't be inD
tasak 2014/06/09 04:04:57 I would like to attach crash log when I added ASSE
+ if (m_isCSS)
+ document().styleEngine()->removeStyleSheetCandidateNode(this);
+ else if (m_isXSL)
+ document().styleEngine()->removeXSLStyleSheet(this);
+ }
#endif
}
@@ -242,11 +246,11 @@ Node::InsertionNotificationRequest ProcessingInstruction::insertedInto(Container
String href;
String charset;
- // To make it possible for us to see isXSL in
- // StyleEngine::addStyleSheetCandidateNode, split checkStyleSheet
- // into two methods, checkStyleSheet and process.
bool isValid = checkStyleSheet(href, charset);
- document().styleEngine()->addStyleSheetCandidateNode(this, m_createdByParser);
+ if (m_isCSS)
+ document().styleEngine()->addStyleSheetCandidateNode(this, m_createdByParser);
+ else if (m_isXSL)
+ document().styleEngine()->addXSLStyleSheet(this, m_createdByParser);
if (isValid)
process(href, charset);
return InsertionDone;
@@ -258,7 +262,10 @@ void ProcessingInstruction::removedFrom(ContainerNode* insertionPoint)
if (!insertionPoint->inDocument())
return;
- document().styleEngine()->removeStyleSheetCandidateNode(this);
+ if (m_isCSS)
+ document().styleEngine()->removeStyleSheetCandidateNode(this);
+ else if (m_isXSL)
+ document().styleEngine()->removeXSLStyleSheet(this);
RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet;

Powered by Google App Engine
This is Rietveld 408576698