Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / xml / DocumentXSLT.h
blob3b62f5757181002765d5ab784f2ea593dbba5c1f
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.
5 #ifndef DocumentXSLT_h
6 #define DocumentXSLT_h
8 #include "core/dom/Document.h"
9 #include "platform/heap/Handle.h"
10 #include "wtf/RefPtr.h"
12 namespace blink {
14 class Document;
15 class ProcessingInstruction;
17 class DocumentXSLT final : public NoBaseWillBeGarbageCollected<DocumentXSLT>, public WillBeHeapSupplement<Document> {
18 WTF_MAKE_NONCOPYABLE(DocumentXSLT);
19 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DocumentXSLT);
20 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(DocumentXSLT);
21 public:
22 Document* transformSourceDocument()
24 return m_transformSourceDocument.get();
27 void setTransformSourceDocument(Document* document)
29 ASSERT(document);
30 m_transformSourceDocument = document;
33 static DocumentXSLT& from(WillBeHeapSupplementable<Document>&);
34 static const char* supplementName();
36 // The following static methods don't use any instance of DocumentXSLT.
37 // They are just using DocumentXSLT namespace.
38 static void applyXSLTransform(Document&, ProcessingInstruction*);
39 static ProcessingInstruction* findXSLStyleSheet(Document&);
40 static bool processingInstructionInsertedIntoDocument(Document&, ProcessingInstruction*);
41 static bool processingInstructionRemovedFromDocument(Document&, ProcessingInstruction*);
42 static bool sheetLoaded(Document&, ProcessingInstruction*);
43 static bool hasTransformSourceDocument(Document&);
45 DECLARE_VIRTUAL_TRACE();
47 private:
48 DocumentXSLT();
50 RefPtrWillBeMember<Document> m_transformSourceDocument;
53 } // namespace blink
55 #endif