| 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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 // before the end of this method. | 1010 // before the end of this method. |
| 1011 RefPtr<XMLDocumentParser> protect(this); | 1011 RefPtr<XMLDocumentParser> protect(this); |
| 1012 | 1012 |
| 1013 exitText(); | 1013 exitText(); |
| 1014 | 1014 |
| 1015 RefPtr<ContainerNode> n = m_currentNode; | 1015 RefPtr<ContainerNode> n = m_currentNode; |
| 1016 n->finishParsingChildren(); | 1016 n->finishParsingChildren(); |
| 1017 | 1017 |
| 1018 if (!scriptingContentIsAllowed(parserContentPolicy()) && n->isElementNode()
&& toScriptLoaderIfPossible(toElement(n.get()))) { | 1018 if (!scriptingContentIsAllowed(parserContentPolicy()) && n->isElementNode()
&& toScriptLoaderIfPossible(toElement(n.get()))) { |
| 1019 popCurrentNode(); | 1019 popCurrentNode(); |
| 1020 n->remove(IGNORE_EXCEPTION_STATE); | 1020 n->remove(IGNORE_EXCEPTION); |
| 1021 return; | 1021 return; |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 if (!n->isElementNode() || !m_view) { | 1024 if (!n->isElementNode() || !m_view) { |
| 1025 popCurrentNode(); | 1025 popCurrentNode(); |
| 1026 return; | 1026 return; |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 Element* element = toElement(n.get()); | 1029 Element* element = toElement(n.get()); |
| 1030 | 1030 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 | 1193 |
| 1194 void XMLDocumentParser::startDocument(const String& version, const String& encod
ing, int standalone) | 1194 void XMLDocumentParser::startDocument(const String& version, const String& encod
ing, int standalone) |
| 1195 { | 1195 { |
| 1196 StandaloneInfo standaloneInfo = (StandaloneInfo)standalone; | 1196 StandaloneInfo standaloneInfo = (StandaloneInfo)standalone; |
| 1197 if (standaloneInfo == NoXMlDeclaration) { | 1197 if (standaloneInfo == NoXMlDeclaration) { |
| 1198 document()->setHasXMLDeclaration(false); | 1198 document()->setHasXMLDeclaration(false); |
| 1199 return; | 1199 return; |
| 1200 } | 1200 } |
| 1201 | 1201 |
| 1202 if (!version.isNull()) | 1202 if (!version.isNull()) |
| 1203 document()->setXMLVersion(version, ASSERT_NO_EXCEPTION_STATE); | 1203 document()->setXMLVersion(version, ASSERT_NO_EXCEPTION); |
| 1204 if (standalone != StandaloneUnspecified) | 1204 if (standalone != StandaloneUnspecified) |
| 1205 document()->setXMLStandalone(standaloneInfo == StandaloneYes, ASSERT_NO_
EXCEPTION_STATE); | 1205 document()->setXMLStandalone(standaloneInfo == StandaloneYes, ASSERT_NO_
EXCEPTION); |
| 1206 if (!encoding.isNull()) | 1206 if (!encoding.isNull()) |
| 1207 document()->setXMLEncoding(encoding); | 1207 document()->setXMLEncoding(encoding); |
| 1208 document()->setHasXMLDeclaration(true); | 1208 document()->setHasXMLDeclaration(true); |
| 1209 } | 1209 } |
| 1210 | 1210 |
| 1211 void XMLDocumentParser::endDocument() | 1211 void XMLDocumentParser::endDocument() |
| 1212 { | 1212 { |
| 1213 exitText(); | 1213 exitText(); |
| 1214 } | 1214 } |
| 1215 | 1215 |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 sax.initialized = XML_SAX2_MAGIC; | 1616 sax.initialized = XML_SAX2_MAGIC; |
| 1617 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1617 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
| 1618 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1618 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1619 parseChunk(parser->context(), parseString); | 1619 parseChunk(parser->context(), parseString); |
| 1620 finishParsing(parser->context()); | 1620 finishParsing(parser->context()); |
| 1621 attrsOK = state.gotAttributes; | 1621 attrsOK = state.gotAttributes; |
| 1622 return state.attributes; | 1622 return state.attributes; |
| 1623 } | 1623 } |
| 1624 | 1624 |
| 1625 } // namespace WebCore | 1625 } // namespace WebCore |
| OLD | NEW |