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, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 9 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
10 * | 10 * |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 m_pendingCallbacks->appendEndElementNSCallback(); | 846 m_pendingCallbacks->appendEndElementNSCallback(); |
847 return; | 847 return; |
848 } | 848 } |
849 | 849 |
850 // JavaScript can detach the parser. Make sure this is not released | 850 // JavaScript can detach the parser. Make sure this is not released |
851 // before the end of this method. | 851 // before the end of this method. |
852 RefPtr<XMLDocumentParser> protect(this); | 852 RefPtr<XMLDocumentParser> protect(this); |
853 | 853 |
854 exitText(); | 854 exitText(); |
855 | 855 |
856 RefPtr<ContainerNode> n = m_currentNode; | 856 RefPtr<Node> n = m_currentNode; |
857 n->finishParsingChildren(); | 857 n->finishParsingChildren(); |
858 | 858 |
859 if (m_scriptingPermission == FragmentScriptingNotAllowed && n->isElementNode
() && toScriptElement(static_cast<Element*>(n.get()))) { | 859 if (m_scriptingPermission == FragmentScriptingNotAllowed && n->isElementNode
() && toScriptElement(static_cast<Element*>(n.get()))) { |
860 popCurrentNode(); | 860 popCurrentNode(); |
861 ExceptionCode ec; | 861 ExceptionCode ec; |
862 n->remove(ec); | 862 n->remove(ec); |
863 return; | 863 return; |
864 } | 864 } |
865 | 865 |
866 if (!n->isElementNode() || !m_view) { | 866 if (!n->isElementNode() || !m_view) { |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 sax.startElementNs = attributesStartElementNsHandler; | 1515 sax.startElementNs = attributesStartElementNsHandler; |
1516 sax.initialized = XML_SAX2_MAGIC; | 1516 sax.initialized = XML_SAX2_MAGIC; |
1517 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1517 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
1518 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1518 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
1519 xmlParseChunk(parser->context(), reinterpret_cast<const char*>(parseString.c
haracters()), parseString.length() * sizeof(UChar), 1); | 1519 xmlParseChunk(parser->context(), reinterpret_cast<const char*>(parseString.c
haracters()), parseString.length() * sizeof(UChar), 1); |
1520 attrsOK = state.gotAttributes; | 1520 attrsOK = state.gotAttributes; |
1521 return state.attributes; | 1521 return state.attributes; |
1522 } | 1522 } |
1523 | 1523 |
1524 } | 1524 } |
OLD | NEW |