| 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 19 matching lines...) Expand all Loading... |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 class StyleSheet; | 32 class StyleSheet; |
| 33 class CSSStyleSheet; | 33 class CSSStyleSheet; |
| 34 class EventListener; | 34 class EventListener; |
| 35 | 35 |
| 36 class ProcessingInstruction final : public CharacterData, private ResourceOwner<
StyleSheetResource> { | 36 class ProcessingInstruction final : public CharacterData, private ResourceOwner<
StyleSheetResource> { |
| 37 DEFINE_WRAPPERTYPEINFO(); | 37 DEFINE_WRAPPERTYPEINFO(); |
| 38 public: | 38 public: |
| 39 static PassRefPtrWillBeRawPtr<ProcessingInstruction> create(Document&, const
String& target, const String& data); | 39 static PassRefPtrWillBeRawPtr<ProcessingInstruction> create(Document&, const
String& target, const String& data); |
| 40 virtual ~ProcessingInstruction(); | 40 ~ProcessingInstruction() override; |
| 41 DECLARE_VIRTUAL_TRACE(); | 41 DECLARE_VIRTUAL_TRACE(); |
| 42 | 42 |
| 43 const String& target() const { return m_target; } | 43 const String& target() const { return m_target; } |
| 44 | 44 |
| 45 void setCreatedByParser(bool createdByParser) { m_createdByParser = createdB
yParser; } | 45 void setCreatedByParser(bool createdByParser) { m_createdByParser = createdB
yParser; } |
| 46 | 46 |
| 47 const String& localHref() const { return m_localHref; } | 47 const String& localHref() const { return m_localHref; } |
| 48 StyleSheet* sheet() const { return m_sheet.get(); } | 48 StyleSheet* sheet() const { return m_sheet.get(); } |
| 49 | 49 |
| 50 bool isCSS() const { return m_isCSS; } | 50 bool isCSS() const { return m_isCSS; } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 71 virtual void derefDetachableEventListener() = 0; | 71 virtual void derefDetachableEventListener() = 0; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 void setEventListenerForXSLT(PassRefPtr<DetachableEventListener> listener) {
m_listenerForXSLT = listener; } | 74 void setEventListenerForXSLT(PassRefPtr<DetachableEventListener> listener) {
m_listenerForXSLT = listener; } |
| 75 EventListener* eventListenerForXSLT(); | 75 EventListener* eventListenerForXSLT(); |
| 76 void clearEventListenerForXSLT(); | 76 void clearEventListenerForXSLT(); |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 ProcessingInstruction(Document&, const String& target, const String& data); | 79 ProcessingInstruction(Document&, const String& target, const String& data); |
| 80 | 80 |
| 81 virtual String nodeName() const override; | 81 String nodeName() const override; |
| 82 virtual NodeType nodeType() const override; | 82 NodeType nodeType() const override; |
| 83 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) override; | 83 PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) override; |
| 84 | 84 |
| 85 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; | 85 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 86 virtual void removedFrom(ContainerNode*) override; | 86 void removedFrom(ContainerNode*) override; |
| 87 | 87 |
| 88 bool checkStyleSheet(String& href, String& charset); | 88 bool checkStyleSheet(String& href, String& charset); |
| 89 void process(const String& href, const String& charset); | 89 void process(const String& href, const String& charset); |
| 90 | 90 |
| 91 virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const
String& charset, const CSSStyleSheetResource*) override; | 91 void setCSSStyleSheet(const String& href, const KURL& baseURL, const String&
charset, const CSSStyleSheetResource*) override; |
| 92 virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const
String& sheet) override; | 92 void setXSLStyleSheet(const String& href, const KURL& baseURL, const String&
sheet) override; |
| 93 | 93 |
| 94 virtual bool sheetLoaded() override; | 94 bool sheetLoaded() override; |
| 95 | 95 |
| 96 void parseStyleSheet(const String& sheet); | 96 void parseStyleSheet(const String& sheet); |
| 97 void clearSheet(); | 97 void clearSheet(); |
| 98 | 98 |
| 99 String m_target; | 99 String m_target; |
| 100 String m_localHref; | 100 String m_localHref; |
| 101 String m_title; | 101 String m_title; |
| 102 String m_media; | 102 String m_media; |
| 103 RefPtrWillBeMember<StyleSheet> m_sheet; | 103 RefPtrWillBeMember<StyleSheet> m_sheet; |
| 104 bool m_loading; | 104 bool m_loading; |
| 105 bool m_alternate; | 105 bool m_alternate; |
| 106 bool m_createdByParser; | 106 bool m_createdByParser; |
| 107 bool m_isCSS; | 107 bool m_isCSS; |
| 108 bool m_isXSL; | 108 bool m_isXSL; |
| 109 | 109 |
| 110 RefPtr<DetachableEventListener> m_listenerForXSLT; | 110 RefPtr<DetachableEventListener> m_listenerForXSLT; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 DEFINE_NODE_TYPE_CASTS(ProcessingInstruction, nodeType() == Node::PROCESSING_INS
TRUCTION_NODE); | 113 DEFINE_NODE_TYPE_CASTS(ProcessingInstruction, nodeType() == Node::PROCESSING_INS
TRUCTION_NODE); |
| 114 | 114 |
| 115 inline bool isXSLStyleSheet(const Node& node) | 115 inline bool isXSLStyleSheet(const Node& node) |
| 116 { | 116 { |
| 117 return node.nodeType() == Node::PROCESSING_INSTRUCTION_NODE && toProcessingI
nstruction(node).isXSL(); | 117 return node.nodeType() == Node::PROCESSING_INSTRUCTION_NODE && toProcessingI
nstruction(node).isXSL(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace blink | 120 } // namespace blink |
| 121 | 121 |
| 122 #endif // ProcessingInstruction_h | 122 #endif // ProcessingInstruction_h |
| OLD | NEW |