Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 #if !ENABLE(OILPAN) | 60 #if !ENABLE(OILPAN) |
| 61 if (m_sheet) | 61 if (m_sheet) |
| 62 clearSheet(); | 62 clearSheet(); |
| 63 | 63 |
| 64 // FIXME: ProcessingInstruction should not be in document here. | 64 // FIXME: ProcessingInstruction should not be in document here. |
| 65 // However, if we add ASSERT(!inDocument()), fast/xsl/xslt-entity.xml | 65 // However, if we add ASSERT(!inDocument()), fast/xsl/xslt-entity.xml |
| 66 // crashes. We need to investigate ProcessingInstruction lifetime. | 66 // crashes. We need to investigate ProcessingInstruction lifetime. |
| 67 if (inDocument() && m_isCSS) | 67 if (inDocument() && m_isCSS) |
| 68 document().styleEngine()->removeStyleSheetCandidateNode(this); | 68 document().styleEngine()->removeStyleSheetCandidateNode(this); |
| 69 #endif | 69 #endif |
| 70 if (m_listenerForXSLT) | |
|
haraken
2014/11/24 01:17:00
We can call clearEventListenerForXSLT().
sof
2014/11/24 06:15:39
Yes, done.
| |
| 71 m_listenerForXSLT->detach(); | |
| 72 } | |
| 73 | |
| 74 EventListener* ProcessingInstruction::eventListenerForXSLT() | |
| 75 { | |
| 76 if (!m_listenerForXSLT) | |
| 77 return 0; | |
| 78 | |
| 79 return m_listenerForXSLT->toEventListener(); | |
| 80 } | |
| 81 | |
| 82 void ProcessingInstruction::clearEventListenerForXSLT() | |
| 83 { | |
| 84 if (m_listenerForXSLT) { | |
| 85 m_listenerForXSLT->detach(); | |
| 86 m_listenerForXSLT.clear(); | |
| 87 } | |
| 70 } | 88 } |
| 71 | 89 |
| 72 String ProcessingInstruction::nodeName() const | 90 String ProcessingInstruction::nodeName() const |
| 73 { | 91 { |
| 74 return m_target; | 92 return m_target; |
| 75 } | 93 } |
| 76 | 94 |
| 77 Node::NodeType ProcessingInstruction::nodeType() const | 95 Node::NodeType ProcessingInstruction::nodeType() const |
| 78 { | 96 { |
| 79 return PROCESSING_INSTRUCTION_NODE; | 97 return PROCESSING_INSTRUCTION_NODE; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 m_sheet.release()->clearOwnerNode(); | 318 m_sheet.release()->clearOwnerNode(); |
| 301 } | 319 } |
| 302 | 320 |
| 303 void ProcessingInstruction::trace(Visitor* visitor) | 321 void ProcessingInstruction::trace(Visitor* visitor) |
| 304 { | 322 { |
| 305 visitor->trace(m_sheet); | 323 visitor->trace(m_sheet); |
| 306 CharacterData::trace(visitor); | 324 CharacterData::trace(visitor); |
| 307 } | 325 } |
| 308 | 326 |
| 309 } // namespace | 327 } // namespace |
| OLD | NEW |