Chromium Code Reviews| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 StyleSheet* sheet() const { return m_sheet.get(); } | 48 StyleSheet* sheet() const { return m_sheet.get(); } |
| 49 void setCSSStyleSheet(PassRefPtrWillBeRawPtr<CSSStyleSheet>); | 49 void setCSSStyleSheet(PassRefPtrWillBeRawPtr<CSSStyleSheet>); |
| 50 | 50 |
| 51 bool isCSS() const { return m_isCSS; } | 51 bool isCSS() const { return m_isCSS; } |
| 52 bool isXSL() const { return m_isXSL; } | 52 bool isXSL() const { return m_isXSL; } |
| 53 | 53 |
| 54 void didAttributeChanged(); | 54 void didAttributeChanged(); |
| 55 bool isLoading() const; | 55 bool isLoading() const; |
| 56 | 56 |
| 57 // For XSLT | 57 // For XSLT |
| 58 void setEventListenerForXSLT(PassRefPtr<EventListener> listener) { m_listene rForXSLT = listener; } | 58 class PIEventListener { |
|
haraken
2014/11/24 01:17:00
PIEventListener => ProcessingInstructionEventListe
sof
2014/11/24 06:15:39
Renamed.
| |
| 59 EventListener* eventListenerForXSLT() { return m_listenerForXSLT.get(); } | 59 public: |
| 60 void clearEventListenerForXSLT() { m_listenerForXSLT.clear(); } | 60 virtual ~PIEventListener() { } |
| 61 | |
| 62 void ref() { refPIEventListener(); } | |
| 63 void deref() { derefPIEventListener(); } | |
| 64 | |
| 65 virtual EventListener* toEventListener() = 0; | |
| 66 | |
| 67 // Detach event listener from its processing instruction. | |
| 68 virtual void detach() = 0; | |
| 69 | |
| 70 private: | |
| 71 virtual void refPIEventListener() = 0; | |
| 72 virtual void derefPIEventListener() = 0; | |
| 73 }; | |
| 74 | |
| 75 void setEventListenerForXSLT(PassRefPtr<PIEventListener> listener) { m_liste nerForXSLT = listener; } | |
| 76 EventListener* eventListenerForXSLT(); | |
| 77 void clearEventListenerForXSLT(); | |
| 61 | 78 |
| 62 private: | 79 private: |
| 63 ProcessingInstruction(Document&, const String& target, const String& data); | 80 ProcessingInstruction(Document&, const String& target, const String& data); |
| 64 | 81 |
| 65 virtual String nodeName() const override; | 82 virtual String nodeName() const override; |
| 66 virtual NodeType nodeType() const override; | 83 virtual NodeType nodeType() const override; |
| 67 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) override; | 84 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) override; |
| 68 | 85 |
| 69 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; | 86 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 70 virtual void removedFrom(ContainerNode*) override; | 87 virtual void removedFrom(ContainerNode*) override; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 84 String m_localHref; | 101 String m_localHref; |
| 85 String m_title; | 102 String m_title; |
| 86 String m_media; | 103 String m_media; |
| 87 RefPtrWillBeMember<StyleSheet> m_sheet; | 104 RefPtrWillBeMember<StyleSheet> m_sheet; |
| 88 bool m_loading; | 105 bool m_loading; |
| 89 bool m_alternate; | 106 bool m_alternate; |
| 90 bool m_createdByParser; | 107 bool m_createdByParser; |
| 91 bool m_isCSS; | 108 bool m_isCSS; |
| 92 bool m_isXSL; | 109 bool m_isXSL; |
| 93 | 110 |
| 94 RefPtr<EventListener> m_listenerForXSLT; | 111 RefPtr<PIEventListener> m_listenerForXSLT; |
| 95 }; | 112 }; |
| 96 | 113 |
| 97 DEFINE_NODE_TYPE_CASTS(ProcessingInstruction, nodeType() == Node::PROCESSING_INS TRUCTION_NODE); | 114 DEFINE_NODE_TYPE_CASTS(ProcessingInstruction, nodeType() == Node::PROCESSING_INS TRUCTION_NODE); |
| 98 | 115 |
| 99 inline bool isXSLStyleSheet(const Node& node) | 116 inline bool isXSLStyleSheet(const Node& node) |
| 100 { | 117 { |
| 101 return node.nodeType() == Node::PROCESSING_INSTRUCTION_NODE && toProcessingI nstruction(node).isXSL(); | 118 return node.nodeType() == Node::PROCESSING_INSTRUCTION_NODE && toProcessingI nstruction(node).isXSL(); |
| 102 } | 119 } |
| 103 | 120 |
| 104 } // namespace blink | 121 } // namespace blink |
| 105 | 122 |
| 106 #endif // ProcessingInstruction_h | 123 #endif // ProcessingInstruction_h |
| OLD | NEW |