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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 } | 49 } |
50 | 50 |
51 PassRefPtr<ProcessingInstruction> ProcessingInstruction::create(Document& docume nt, const String& target, const String& data) | 51 PassRefPtr<ProcessingInstruction> ProcessingInstruction::create(Document& docume nt, const String& target, const String& data) |
52 { | 52 { |
53 return adoptRef(new ProcessingInstruction(document, target, data)); | 53 return adoptRef(new ProcessingInstruction(document, target, data)); |
54 } | 54 } |
55 | 55 |
56 ProcessingInstruction::~ProcessingInstruction() | 56 ProcessingInstruction::~ProcessingInstruction() |
57 { | 57 { |
58 if (m_sheet) | 58 if (m_sheet) |
59 m_sheet->clearOwnerNode(); | 59 m_sheet->clearOwnerNode(); |
haraken
2014/04/25 05:21:42
You can put this in #if !ENABLE(OILPAN) as well (Y
haraken
2014/04/25 05:29:59
Discussed with tasak@, and it looks like a right f
Mads Ager (chromium)
2014/04/25 10:58:25
Yeah, good point. I restored the clearing in Style
| |
60 | 60 |
61 #if !ENABLE(OILPAN) | |
61 if (inDocument()) | 62 if (inDocument()) |
62 document().styleEngine()->removeStyleSheetCandidateNode(this); | 63 document().styleEngine()->removeStyleSheetCandidateNode(this); |
64 #endif | |
63 } | 65 } |
64 | 66 |
65 String ProcessingInstruction::nodeName() const | 67 String ProcessingInstruction::nodeName() const |
66 { | 68 { |
67 return m_target; | 69 return m_target; |
68 } | 70 } |
69 | 71 |
70 Node::NodeType ProcessingInstruction::nodeType() const | 72 Node::NodeType ProcessingInstruction::nodeType() const |
71 { | 73 { |
72 return PROCESSING_INSTRUCTION_NODE; | 74 return PROCESSING_INSTRUCTION_NODE; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 m_sheet->clearOwnerNode(); | 246 m_sheet->clearOwnerNode(); |
245 m_sheet = nullptr; | 247 m_sheet = nullptr; |
246 } | 248 } |
247 | 249 |
248 // If we're in document teardown, then we don't need to do any notification of our sheet's removal. | 250 // If we're in document teardown, then we don't need to do any notification of our sheet's removal. |
249 if (document().isActive()) | 251 if (document().isActive()) |
250 document().removedStyleSheet(removedSheet.get()); | 252 document().removedStyleSheet(removedSheet.get()); |
251 } | 253 } |
252 | 254 |
253 } // namespace | 255 } // namespace |
OLD | NEW |