OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DocumentXSLT_h |
| 6 #define DocumentXSLT_h |
| 7 |
| 8 #include "core/dom/DocumentSupplementable.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/RefPtr.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class Document; |
| 15 class EventListener; |
| 16 class ExecutionContext; |
| 17 class ProcessingInstruction; |
| 18 |
| 19 class DocumentXSLT final : public NoBaseWillBeGarbageCollected<DocumentXSLT>, pu
blic DocumentSupplement { |
| 20 WTF_MAKE_NONCOPYABLE(DocumentXSLT); |
| 21 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DocumentXSLT); |
| 22 public: |
| 23 Document* transformSourceDocument() |
| 24 { |
| 25 return m_transformSourceDocument.get(); |
| 26 } |
| 27 |
| 28 void setTransformSourceDocument(Document* document) |
| 29 { |
| 30 ASSERT(document); |
| 31 m_transformSourceDocument = document; |
| 32 } |
| 33 |
| 34 static DocumentXSLT& from(DocumentSupplementable&); |
| 35 static const char* supplementName(); |
| 36 |
| 37 // The following static methods don't use any instance of DocumentXSLT. |
| 38 // They are just using DocumentXSLT namespace. |
| 39 static void applyXSLTransform(Document&, ProcessingInstruction*); |
| 40 static ProcessingInstruction* findXSLStyleSheet(Document&); |
| 41 static bool processingInstructionInsertedIntoDocument(Document&, ProcessingI
nstruction*); |
| 42 static bool processingInstructionRemovedFromDocument(Document&, ProcessingIn
struction*); |
| 43 static bool sheetLoaded(Document&, ProcessingInstruction*); |
| 44 static bool hasTransformSourceDocument(Document&); |
| 45 |
| 46 virtual void trace(Visitor*) override; |
| 47 |
| 48 private: |
| 49 DocumentXSLT(); |
| 50 |
| 51 RefPtrWillBeMember<Document> m_transformSourceDocument; |
| 52 }; |
| 53 |
| 54 } // namespace blink |
| 55 |
| 56 #endif |
OLD | NEW |