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

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

Issue 19002005: Share Custom Element registration contexts between related documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tweak the test to do lazy wrapping in both cases. Created 7 years, 5 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
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/core/xml/XSLTProcessor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "bindings/v8/ScriptWrappable.h" 26 #include "bindings/v8/ScriptWrappable.h"
27 #include "core/dom/CustomElementRegistrationContextualizer.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() { return adoptRef(new XSLTProcesso r); }
44 ~XSLTProcessor(); 45 ~XSLTProcessor();
45 46
46 void setXSLStyleSheet(PassRefPtr<XSLStyleSheet> styleSheet) { m_stylesheet = styleSheet; } 47 void setXSLStyleSheet(PassRefPtr<XSLStyleSheet> styleSheet) { m_stylesheet = styleSheet; }
47 bool transformToString(Node* source, String& resultMIMEType, String& resultS tring, String& resultEncoding); 48 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); 49 PassRefPtr<Document> createDocumentFromSource(const String& source, const St ring& sourceEncoding, const String& sourceMIMEType, Node* sourceNode, Frame*, Cu stomElementRegistrationContextualizer::DocumentCreationReason);
49 50
50 // DOM methods 51 // DOM methods
51 void importStylesheet(PassRefPtr<Node> style) 52 void importStylesheet(PassRefPtr<Node> style)
52 { 53 {
53 if (style) 54 if (style)
54 m_stylesheetRootNode = style; 55 m_stylesheetRootNode = style;
55 } 56 }
56 PassRefPtr<DocumentFragment> transformToFragment(Node* source, Document* oup utDoc); 57 PassRefPtr<DocumentFragment> transformToFragment(Node* source, Document* oup utDoc);
57 PassRefPtr<Document> transformToDocument(Node* source); 58 PassRefPtr<Document> transformToDocument(Node* source);
58 59
(...skipping 19 matching lines...) Expand all
78 } 79 }
79 80
80 RefPtr<XSLStyleSheet> m_stylesheet; 81 RefPtr<XSLStyleSheet> m_stylesheet;
81 RefPtr<Node> m_stylesheetRootNode; 82 RefPtr<Node> m_stylesheetRootNode;
82 ParameterMap m_parameters; 83 ParameterMap m_parameters;
83 }; 84 };
84 85
85 } 86 }
86 87
87 #endif 88 #endif
OLDNEW
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/core/xml/XSLTProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698