Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: Source/core/xml/DocumentXSLT.h

Issue 730003002: Refactoring XSLT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed ASSERT crashes when xsltEnabled() returns false Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/xml/DocumentXSLT.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1dfb26493a843c37e015fe57b738e4079174d047
--- /dev/null
+++ b/Source/core/xml/DocumentXSLT.h
@@ -0,0 +1,56 @@
+// 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:
+ Document* transformSourceDocument()
+ {
+ return m_transformSourceDocument.get();
+ }
+
+ void setTransformSourceDocument(Document* document)
+ {
+ ASSERT(document);
+ m_transformSourceDocument = document;
+ }
+
+ static DocumentXSLT& from(DocumentSupplementable&);
+ static const char* supplementName();
+
+ // The following static methods don't use any instance of DocumentXSLT.
+ // They are just using DocumentXSLT namespace.
+ static void applyXSLTransform(Document&, ProcessingInstruction*);
+ static ProcessingInstruction* findXSLStyleSheet(Document&);
+ static bool processingInstructionInsertedIntoDocument(Document&, ProcessingInstruction*);
+ static bool processingInstructionRemovedFromDocument(Document&, ProcessingInstruction*);
+ static bool sheetLoaded(Document&, ProcessingInstruction*);
+ static bool hasTransformSourceDocument(Document&);
+
+ virtual void trace(Visitor*) override;
+
+private:
+ DocumentXSLT();
+
+ RefPtrWillBeMember<Document> m_transformSourceDocument;
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/xml/DocumentXSLT.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698