Chromium Code Reviews| 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; |