OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) |
3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2008 Holger Hans Peter Freyther | 7 * Copyright (C) 2008 Holger Hans Peter Freyther |
8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 10 matching lines...) Expand all Loading... |
21 * along with this library; see the file COPYING.LIB. If not, write to | 21 * along with this library; see the file COPYING.LIB. If not, write to |
22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 * Boston, MA 02110-1301, USA. | 23 * Boston, MA 02110-1301, USA. |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/xml/parser/XMLDocumentParser.h" | 27 #include "core/xml/parser/XMLDocumentParser.h" |
28 | 28 |
29 #include "FetchInitiatorTypeNames.h" | 29 #include "FetchInitiatorTypeNames.h" |
30 #include "HTMLNames.h" | 30 #include "HTMLNames.h" |
| 31 #include "RuntimeEnabledFeatures.h" |
31 #include "XMLNSNames.h" | 32 #include "XMLNSNames.h" |
32 #include "bindings/v8/ExceptionState.h" | 33 #include "bindings/v8/ExceptionState.h" |
33 #include "bindings/v8/ExceptionStatePlaceholder.h" | 34 #include "bindings/v8/ExceptionStatePlaceholder.h" |
34 #include "bindings/v8/ScriptController.h" | 35 #include "bindings/v8/ScriptController.h" |
35 #include "bindings/v8/ScriptSourceCode.h" | 36 #include "bindings/v8/ScriptSourceCode.h" |
36 #include "core/dom/CDATASection.h" | 37 #include "core/dom/CDATASection.h" |
37 #include "core/dom/Comment.h" | 38 #include "core/dom/Comment.h" |
38 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
39 #include "core/dom/DocumentFragment.h" | 40 #include "core/dom/DocumentFragment.h" |
40 #include "core/dom/DocumentType.h" | 41 #include "core/dom/DocumentType.h" |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 return; | 1149 return; |
1149 | 1150 |
1150 pi->setCreatedByParser(true); | 1151 pi->setCreatedByParser(true); |
1151 | 1152 |
1152 m_currentNode->parserAppendChild(pi.get()); | 1153 m_currentNode->parserAppendChild(pi.get()); |
1153 | 1154 |
1154 pi->finishParsingChildren(); | 1155 pi->finishParsingChildren(); |
1155 | 1156 |
1156 if (pi->isCSS()) | 1157 if (pi->isCSS()) |
1157 m_sawCSS = true; | 1158 m_sawCSS = true; |
| 1159 |
| 1160 if (!RuntimeEnabledFeatures::xsltEnabled()) |
| 1161 return; |
| 1162 |
1158 m_sawXSLTransform = !m_sawFirstElement && pi->isXSL(); | 1163 m_sawXSLTransform = !m_sawFirstElement && pi->isXSL(); |
1159 if (m_sawXSLTransform && !document()->transformSourceDocument()) | 1164 if (m_sawXSLTransform && !document()->transformSourceDocument()) |
1160 stopParsing(); | 1165 stopParsing(); |
1161 } | 1166 } |
1162 | 1167 |
1163 void XMLDocumentParser::cdataBlock(const String& text) | 1168 void XMLDocumentParser::cdataBlock(const String& text) |
1164 { | 1169 { |
1165 if (isStopped()) | 1170 if (isStopped()) |
1166 return; | 1171 return; |
1167 | 1172 |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1624 sax.initialized = XML_SAX2_MAGIC; | 1629 sax.initialized = XML_SAX2_MAGIC; |
1625 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1630 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
1626 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1631 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
1627 parseChunk(parser->context(), parseString); | 1632 parseChunk(parser->context(), parseString); |
1628 finishParsing(parser->context()); | 1633 finishParsing(parser->context()); |
1629 attrsOK = state.gotAttributes; | 1634 attrsOK = state.gotAttributes; |
1630 return state.attributes; | 1635 return state.attributes; |
1631 } | 1636 } |
1632 | 1637 |
1633 } // namespace WebCore | 1638 } // namespace WebCore |
OLD | NEW |