| Index: Source/core/dom/ProcessingInstruction.cpp
|
| diff --git a/Source/core/dom/ProcessingInstruction.cpp b/Source/core/dom/ProcessingInstruction.cpp
|
| index f2da0a501df3ed21e81575525b14064099123e78..127d852755915153fe324d070c47b5069d793657 100644
|
| --- a/Source/core/dom/ProcessingInstruction.cpp
|
| +++ b/Source/core/dom/ProcessingInstruction.cpp
|
| @@ -59,8 +59,12 @@ ProcessingInstruction::~ProcessingInstruction()
|
| m_sheet->clearOwnerNode();
|
|
|
| #if !ENABLE(OILPAN)
|
| - if (inDocument())
|
| - document().styleEngine()->removeStyleSheetCandidateNode(this);
|
| + if (inDocument()) {
|
| + 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;
|
|
|
|
|