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

Side by Side Diff: Source/core/xml/XSLTProcessor.h

Issue 166903010: Oilpan: Move core/xml/ to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * This file is part of the XSL implementation. 2 * This file is part of the XSL implementation.
3 * 3 *
4 * Copyright (C) 2004, 2007, 2008 Apple, Inc. All rights reserved. 4 * Copyright (C) 2004, 2007, 2008 Apple, Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 21 matching lines...) Expand all
32 32
33 #include <libxml/parserInternals.h> 33 #include <libxml/parserInternals.h>
34 #include <libxslt/documents.h> 34 #include <libxslt/documents.h>
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 class Frame; 38 class Frame;
39 class Document; 39 class Document;
40 class DocumentFragment; 40 class DocumentFragment;
41 41
42 class XSLTProcessor : public RefCounted<XSLTProcessor>, public ScriptWrappable { 42 class XSLTProcessor : public RefCountedWillBeGarbageCollectedFinalized<XSLTProce ssor>, public ScriptWrappable {
43 DECLARE_GC_INFO;
43 public: 44 public:
44 static PassRefPtr<XSLTProcessor> create() 45 static PassRefPtrWillBeRawPtr<XSLTProcessor> create()
45 { 46 {
46 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); 47 ASSERT(RuntimeEnabledFeatures::xsltEnabled());
47 return adoptRef(new XSLTProcessor); 48 return adoptRefWillBeNoop(new XSLTProcessor);
48 } 49 }
49 ~XSLTProcessor(); 50 ~XSLTProcessor();
50 51
51 void setXSLStyleSheet(PassRefPtr<XSLStyleSheet> styleSheet) { m_stylesheet = styleSheet; } 52 void setXSLStyleSheet(PassRefPtr<XSLStyleSheet> styleSheet) { m_stylesheet = styleSheet; }
52 bool transformToString(Node* source, String& resultMIMEType, String& resultS tring, String& resultEncoding); 53 bool transformToString(Node* source, String& resultMIMEType, String& resultS tring, String& resultEncoding);
53 PassRefPtr<Document> createDocumentFromSource(const String& source, const St ring& sourceEncoding, const String& sourceMIMEType, Node* sourceNode, Frame* fra me); 54 PassRefPtr<Document> createDocumentFromSource(const String& source, const St ring& sourceEncoding, const String& sourceMIMEType, Node* sourceNode, Frame* fra me);
54 55
55 // DOM methods 56 // DOM methods
56 void importStylesheet(PassRefPtr<Node> style) 57 void importStylesheet(PassRefPtr<Node> style)
57 { 58 {
(...skipping 11 matching lines...) Expand all
69 void reset(); 70 void reset();
70 71
71 static void parseErrorFunc(void* userData, xmlError*); 72 static void parseErrorFunc(void* userData, xmlError*);
72 static void genericErrorFunc(void* userData, const char* msg, ...); 73 static void genericErrorFunc(void* userData, const char* msg, ...);
73 74
74 // Only for libXSLT callbacks 75 // Only for libXSLT callbacks
75 XSLStyleSheet* xslStylesheet() const { return m_stylesheet.get(); } 76 XSLStyleSheet* xslStylesheet() const { return m_stylesheet.get(); }
76 77
77 typedef HashMap<String, String> ParameterMap; 78 typedef HashMap<String, String> ParameterMap;
78 79
80 void trace(Visitor*) { }
81
79 private: 82 private:
80 XSLTProcessor() 83 XSLTProcessor()
81 { 84 {
82 ScriptWrappable::init(this); 85 ScriptWrappable::init(this);
83 } 86 }
84 87
85 RefPtr<XSLStyleSheet> m_stylesheet; 88 RefPtr<XSLStyleSheet> m_stylesheet;
86 RefPtr<Node> m_stylesheetRootNode; 89 RefPtr<Node> m_stylesheetRootNode;
87 ParameterMap m_parameters; 90 ParameterMap m_parameters;
88 }; 91 };
89 92
90 } 93 }
91 94
92 #endif 95 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698