Index: Source/core/xml/DocumentXSLT.h |
diff --git a/Source/core/xml/DocumentXSLT.h b/Source/core/xml/DocumentXSLT.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7ff4dca62c46385ef7ec40465f9893d1933bd9c4 |
--- /dev/null |
+++ b/Source/core/xml/DocumentXSLT.h |
@@ -0,0 +1,55 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef DocumentXSLT_h |
+#define DocumentXSLT_h |
+ |
+#include "core/dom/DocumentSupplementable.h" |
+#include "platform/heap/Handle.h" |
+#include "wtf/RefPtr.h" |
+ |
+namespace blink { |
+ |
+class Document; |
+class EventListener; |
+class ExecutionContext; |
+class ProcessingInstruction; |
+ |
+class DocumentXSLT final : public NoBaseWillBeGarbageCollected<DocumentXSLT>, public DocumentSupplement { |
+ WTF_MAKE_NONCOPYABLE(DocumentXSLT); |
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DocumentXSLT); |
+public: |
+ PassRefPtrWillBeRawPtr<Document> transformSourceDocument() |
haraken
2014/11/19 09:01:36
Does this need to be a PassRefPtr? Probably Docume
tasak
2014/11/19 09:23:03
This code is the same as the original code:
PassRe
haraken
2014/11/19 09:33:59
ok, but this looks not nice. Given that transformS
tasak
2014/11/19 11:12:35
Done.
|
+ { |
+ return m_transformSourceDocument; |
+ } |
+ |
+ void setTransformSourceDocument(Document* document) |
+ { |
+ ASSERT(document); |
+ m_transformSourceDocument = document; |
+ } |
+ |
+ static DocumentXSLT& from(DocumentSupplementable&); |
+ static const char* supplementName(); |
+ |
+ // The following static methods doesn't use any instance of DocumentXSLT. |
haraken
2014/11/19 09:01:36
doesn't => don't
tasak
2014/11/19 09:23:03
Done.
|
+ // Just they are just using DocumetnXSLT namespace. |
haraken
2014/11/19 09:01:36
Just they are => they are
tasak
2014/11/19 09:23:03
Done.
Also fixed Documetn => Document
|
+ static PassRefPtr<EventListener> addDOMContentLoadedListenerForXSLT(Document&, ProcessingInstruction*); |
+ static void applyXSLTransform(Document&, ProcessingInstruction*); |
+ static ProcessingInstruction* findXSLStyleSheet(Document&); |
+ static void sheetLoaded(Document&, ProcessingInstruction*); |
+ static bool hasTransformSourceDocument(Document&); |
+ |
+ virtual void trace(Visitor*) override; |
+ |
+private: |
+ DocumentXSLT(); |
+ |
+ RefPtrWillBeMember<Document> m_transformSourceDocument; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif |