| 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 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006 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 15 matching lines...) Expand all Loading... |
| 26 #include "core/fetch/ResourcePtr.h" | 26 #include "core/fetch/ResourcePtr.h" |
| 27 #include "core/fetch/StyleSheetResourceClient.h" | 27 #include "core/fetch/StyleSheetResourceClient.h" |
| 28 | 28 |
| 29 namespace WebCore { | 29 namespace WebCore { |
| 30 | 30 |
| 31 class StyleSheet; | 31 class StyleSheet; |
| 32 class CSSStyleSheet; | 32 class CSSStyleSheet; |
| 33 | 33 |
| 34 class ProcessingInstruction FINAL : public CharacterData, private StyleSheetReso
urceClient { | 34 class ProcessingInstruction FINAL : public CharacterData, private StyleSheetReso
urceClient { |
| 35 public: | 35 public: |
| 36 static PassRefPtr<ProcessingInstruction> create(Document*, const String& tar
get, const String& data); | 36 static PassRefPtr<ProcessingInstruction> create(Document&, const String& tar
get, const String& data); |
| 37 virtual ~ProcessingInstruction(); | 37 virtual ~ProcessingInstruction(); |
| 38 | 38 |
| 39 const String& target() const { return m_target; } | 39 const String& target() const { return m_target; } |
| 40 | 40 |
| 41 void setCreatedByParser(bool createdByParser) { m_createdByParser = createdB
yParser; } | 41 void setCreatedByParser(bool createdByParser) { m_createdByParser = createdB
yParser; } |
| 42 | 42 |
| 43 virtual void finishParsingChildren(); | 43 virtual void finishParsingChildren(); |
| 44 | 44 |
| 45 const String& localHref() const { return m_localHref; } | 45 const String& localHref() const { return m_localHref; } |
| 46 StyleSheet* sheet() const { return m_sheet.get(); } | 46 StyleSheet* sheet() const { return m_sheet.get(); } |
| 47 void setCSSStyleSheet(PassRefPtr<CSSStyleSheet>); | 47 void setCSSStyleSheet(PassRefPtr<CSSStyleSheet>); |
| 48 | 48 |
| 49 bool isCSS() const { return m_isCSS; } | 49 bool isCSS() const { return m_isCSS; } |
| 50 bool isXSL() const { return m_isXSL; } | 50 bool isXSL() const { return m_isXSL; } |
| 51 | 51 |
| 52 bool isLoading() const; | 52 bool isLoading() const; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 friend class CharacterData; | 55 friend class CharacterData; |
| 56 ProcessingInstruction(Document*, const String& target, const String& data); | 56 ProcessingInstruction(Document&, const String& target, const String& data); |
| 57 | 57 |
| 58 virtual String nodeName() const; | 58 virtual String nodeName() const; |
| 59 virtual NodeType nodeType() const; | 59 virtual NodeType nodeType() const; |
| 60 virtual PassRefPtr<Node> cloneNode(bool deep = true); | 60 virtual PassRefPtr<Node> cloneNode(bool deep = true); |
| 61 | 61 |
| 62 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 62 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
| 63 virtual void removedFrom(ContainerNode*) OVERRIDE; | 63 virtual void removedFrom(ContainerNode*) OVERRIDE; |
| 64 | 64 |
| 65 void checkStyleSheet(); | 65 void checkStyleSheet(); |
| 66 virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const
String& charset, const CSSStyleSheetResource*); | 66 virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const
String& charset, const CSSStyleSheetResource*); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 87 | 87 |
| 88 inline ProcessingInstruction* toProcessingInstruction(Node* node) | 88 inline ProcessingInstruction* toProcessingInstruction(Node* node) |
| 89 { | 89 { |
| 90 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->nodeType() == Node::PROCESSI
NG_INSTRUCTION_NODE); | 90 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->nodeType() == Node::PROCESSI
NG_INSTRUCTION_NODE); |
| 91 return static_cast<ProcessingInstruction*>(node); | 91 return static_cast<ProcessingInstruction*>(node); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } //namespace | 94 } //namespace |
| 95 | 95 |
| 96 #endif | 96 #endif |
| OLD | NEW |