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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 return adoptRef(new ProcessingInstruction(document, target, data)); | 55 return adoptRef(new ProcessingInstruction(document, target, data)); |
56 } | 56 } |
57 | 57 |
58 ProcessingInstruction::~ProcessingInstruction() | 58 ProcessingInstruction::~ProcessingInstruction() |
59 { | 59 { |
60 if (m_sheet) | 60 if (m_sheet) |
61 m_sheet->clearOwnerNode(); | 61 m_sheet->clearOwnerNode(); |
62 | 62 |
63 if (m_cachedSheet) | 63 if (m_cachedSheet) |
64 m_cachedSheet->removeClient(this); | 64 m_cachedSheet->removeClient(this); |
| 65 |
| 66 if (inDocument()) |
| 67 document()->removeStyleSheetCandidateNode(this); |
65 } | 68 } |
66 | 69 |
67 void ProcessingInstruction::setData(const String& data, ExceptionCode&) | 70 void ProcessingInstruction::setData(const String& data, ExceptionCode&) |
68 { | 71 { |
69 int oldLength = m_data.length(); | 72 int oldLength = m_data.length(); |
70 m_data = data; | 73 m_data = data; |
71 document()->textRemoved(this, 0, oldLength); | 74 document()->textRemoved(this, 0, oldLength); |
72 checkStyleSheet(); | 75 checkStyleSheet(); |
73 } | 76 } |
74 | 77 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 document()->styleSelectorChanged(DeferRecalcStyle); | 295 document()->styleSelectorChanged(DeferRecalcStyle); |
293 } | 296 } |
294 | 297 |
295 void ProcessingInstruction::finishParsingChildren() | 298 void ProcessingInstruction::finishParsingChildren() |
296 { | 299 { |
297 m_createdByParser = false; | 300 m_createdByParser = false; |
298 ContainerNode::finishParsingChildren(); | 301 ContainerNode::finishParsingChildren(); |
299 } | 302 } |
300 | 303 |
301 } // namespace | 304 } // namespace |
OLD | NEW |