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.
8 #include "core/dom/Document.h"
9 #include "platform/heap/Handle.h"
10 #include "wtf/RefPtr.h"
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
);
22 Document
* transformSourceDocument()
24 return m_transformSourceDocument
.get();
27 void setTransformSourceDocument(Document
* 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();
50 RefPtrWillBeMember
<Document
> m_transformSourceDocument
;