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

Side by Side Diff: Source/core/dom/ProcessingInstruction.cpp

Issue 738443003: Have ProcessingInstruction's XSLT event listener keep a weak backreference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename ProcessingInstruction local interface class Created 6 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ProcessingInstruction.h ('k') | Source/core/xml/DocumentXSLT.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 clearEventListenerForXSLT();
71 }
72
73 EventListener* ProcessingInstruction::eventListenerForXSLT()
74 {
75 if (!m_listenerForXSLT)
76 return 0;
77
78 return m_listenerForXSLT->toEventListener();
79 }
80
81 void ProcessingInstruction::clearEventListenerForXSLT()
82 {
83 if (m_listenerForXSLT) {
84 m_listenerForXSLT->detach();
85 m_listenerForXSLT.clear();
86 }
70 } 87 }
71 88
72 String ProcessingInstruction::nodeName() const 89 String ProcessingInstruction::nodeName() const
73 { 90 {
74 return m_target; 91 return m_target;
75 } 92 }
76 93
77 Node::NodeType ProcessingInstruction::nodeType() const 94 Node::NodeType ProcessingInstruction::nodeType() const
78 { 95 {
79 return PROCESSING_INSTRUCTION_NODE; 96 return PROCESSING_INSTRUCTION_NODE;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 m_sheet.release()->clearOwnerNode(); 317 m_sheet.release()->clearOwnerNode();
301 } 318 }
302 319
303 void ProcessingInstruction::trace(Visitor* visitor) 320 void ProcessingInstruction::trace(Visitor* visitor)
304 { 321 {
305 visitor->trace(m_sheet); 322 visitor->trace(m_sheet);
306 CharacterData::trace(visitor); 323 CharacterData::trace(visitor);
307 } 324 }
308 325
309 } // namespace 326 } // namespace
OLDNEW
« no previous file with comments | « Source/core/dom/ProcessingInstruction.h ('k') | Source/core/xml/DocumentXSLT.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698