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

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

Issue 25519002: Adding ASSERT for RuntimeEnabled feature XSLT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
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 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 * 20 *
21 */ 21 */
22 22
23 #ifndef XSLTProcessor_h 23 #ifndef XSLTProcessor_h
24 #define XSLTProcessor_h 24 #define XSLTProcessor_h
25 25
26 #include "RuntimeEnabledFeatures.h"
26 #include "bindings/v8/ScriptWrappable.h" 27 #include "bindings/v8/ScriptWrappable.h"
27 #include "core/dom/Node.h" 28 #include "core/dom/Node.h"
28 #include "core/xml/XSLStyleSheet.h" 29 #include "core/xml/XSLStyleSheet.h"
29 #include "wtf/HashMap.h" 30 #include "wtf/HashMap.h"
30 #include "wtf/text/StringHash.h" 31 #include "wtf/text/StringHash.h"
31 32
32 #include <libxml/parserInternals.h> 33 #include <libxml/parserInternals.h>
33 #include <libxslt/documents.h> 34 #include <libxslt/documents.h>
34 35
35 namespace WebCore { 36 namespace WebCore {
36 37
37 class Frame; 38 class Frame;
38 class Document; 39 class Document;
39 class DocumentFragment; 40 class DocumentFragment;
40 41
41 class XSLTProcessor : public RefCounted<XSLTProcessor>, public ScriptWrappable { 42 class XSLTProcessor : public RefCounted<XSLTProcessor>, public ScriptWrappable {
42 public: 43 public:
43 static PassRefPtr<XSLTProcessor> create() { return adoptRef(new XSLTProcesso r); } 44 static PassRefPtr<XSLTProcessor> create()
45 {
46 ASSERT(RuntimeEnabledFeatures::xsltEnabled());
47 return adoptRef(new XSLTProcessor);
48 }
44 ~XSLTProcessor(); 49 ~XSLTProcessor();
45 50
46 void setXSLStyleSheet(PassRefPtr<XSLStyleSheet> styleSheet) { m_stylesheet = styleSheet; } 51 void setXSLStyleSheet(PassRefPtr<XSLStyleSheet> styleSheet) { m_stylesheet = styleSheet; }
47 bool transformToString(Node* source, String& resultMIMEType, String& resultS tring, String& resultEncoding); 52 bool transformToString(Node* source, String& resultMIMEType, String& resultS tring, String& resultEncoding);
48 PassRefPtr<Document> createDocumentFromSource(const String& source, const St ring& sourceEncoding, const String& sourceMIMEType, Node* sourceNode, Frame* fra me); 53 PassRefPtr<Document> createDocumentFromSource(const String& source, const St ring& sourceEncoding, const String& sourceMIMEType, Node* sourceNode, Frame* fra me);
49 54
50 // DOM methods 55 // DOM methods
51 void importStylesheet(PassRefPtr<Node> style) 56 void importStylesheet(PassRefPtr<Node> style)
52 { 57 {
53 if (style) 58 if (style)
(...skipping 24 matching lines...) Expand all
78 } 83 }
79 84
80 RefPtr<XSLStyleSheet> m_stylesheet; 85 RefPtr<XSLStyleSheet> m_stylesheet;
81 RefPtr<Node> m_stylesheetRootNode; 86 RefPtr<Node> m_stylesheetRootNode;
82 ParameterMap m_parameters; 87 ParameterMap m_parameters;
83 }; 88 };
84 89
85 } 90 }
86 91
87 #endif 92 #endif
OLDNEW
« Source/core/fetch/XSLStyleSheetResource.cpp ('K') | « Source/core/xml/XSLTExtensions.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698