| 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, 2014 Apple Inc. All rights reserved. | 3 * Copyright (C) 2005, 2006, 2008, 2014 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 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 if (!prefix.isNull()) | 972 if (!prefix.isNull()) |
| 973 adjustedURI = m_prefixToNamespaceMap.get(prefix); | 973 adjustedURI = m_prefixToNamespaceMap.get(prefix); |
| 974 else | 974 else |
| 975 adjustedURI = m_defaultNamespaceURI; | 975 adjustedURI = m_defaultNamespaceURI; |
| 976 } | 976 } |
| 977 | 977 |
| 978 bool isFirstElement = !m_sawFirstElement; | 978 bool isFirstElement = !m_sawFirstElement; |
| 979 m_sawFirstElement = true; | 979 m_sawFirstElement = true; |
| 980 | 980 |
| 981 QualifiedName qName(prefix, localName, adjustedURI); | 981 QualifiedName qName(prefix, localName, adjustedURI); |
| 982 Element* newElement = m_currentNode->document().createElement(qName, true); | 982 Element* newElement = m_currentNode->document().createElement(qName, Created
ByParser); |
| 983 if (!newElement) { | 983 if (!newElement) { |
| 984 stopParsing(); | 984 stopParsing(); |
| 985 return; | 985 return; |
| 986 } | 986 } |
| 987 | 987 |
| 988 Vector<Attribute> prefixedAttributes; | 988 Vector<Attribute> prefixedAttributes; |
| 989 TrackExceptionState exceptionState; | 989 TrackExceptionState exceptionState; |
| 990 handleNamespaceAttributes(prefixedAttributes, libxmlNamespaces, nbNamespaces
, exceptionState); | 990 handleNamespaceAttributes(prefixedAttributes, libxmlNamespaces, nbNamespaces
, exceptionState); |
| 991 if (exceptionState.hadException()) { | 991 if (exceptionState.hadException()) { |
| 992 setAttributes(newElement, prefixedAttributes, getParserContentPolicy()); | 992 setAttributes(newElement, prefixedAttributes, getParserContentPolicy()); |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 sax.initialized = XML_SAX2_MAGIC; | 1637 sax.initialized = XML_SAX2_MAGIC; |
| 1638 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1638 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
| 1639 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1639 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1640 parseChunk(parser->context(), parseString); | 1640 parseChunk(parser->context(), parseString); |
| 1641 finishParsing(parser->context()); | 1641 finishParsing(parser->context()); |
| 1642 attrsOK = state.gotAttributes; | 1642 attrsOK = state.gotAttributes; |
| 1643 return state.attributes; | 1643 return state.attributes; |
| 1644 } | 1644 } |
| 1645 | 1645 |
| 1646 } // namespace blink | 1646 } // namespace blink |
| OLD | NEW |