| 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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 if (!m_context) | 863 if (!m_context) |
| 864 initializeParserContext(); | 864 initializeParserContext(); |
| 865 | 865 |
| 866 // Protect the libxml context from deletion during a callback | 866 // Protect the libxml context from deletion during a callback |
| 867 RefPtr<XMLParserContext> context = m_context; | 867 RefPtr<XMLParserContext> context = m_context; |
| 868 | 868 |
| 869 // libXML throws an error if you try to switch the encoding for an empty | 869 // libXML throws an error if you try to switch the encoding for an empty |
| 870 // string. | 870 // string. |
| 871 if (parseString.length()) { | 871 if (parseString.length()) { |
| 872 XMLDocumentParserScope scope(document()); | 872 XMLDocumentParserScope scope(document()); |
| 873 TemporaryChange<bool> encodingScope(m_isCurrentlyParsing8BitChunk, parse
String.is8Bit()); | 873 TemporaryChange<bool> encodingScope(&m_isCurrentlyParsing8BitChunk, pars
eString.is8Bit()); |
| 874 parseChunk(context->context(), parseString); | 874 parseChunk(context->context(), parseString); |
| 875 | 875 |
| 876 // JavaScript (which may be run under the parseChunk callstack) may | 876 // JavaScript (which may be run under the parseChunk callstack) may |
| 877 // cause the parser to be stopped or detached. | 877 // cause the parser to be stopped or detached. |
| 878 if (isStopped()) | 878 if (isStopped()) |
| 879 return; | 879 return; |
| 880 } | 880 } |
| 881 | 881 |
| 882 // FIXME: Why is this here? And why is it after we process the passed | 882 // FIXME: Why is this here? And why is it after we process the passed |
| 883 // source? | 883 // source? |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 sax.initialized = XML_SAX2_MAGIC; | 1640 sax.initialized = XML_SAX2_MAGIC; |
| 1641 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1641 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
| 1642 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1642 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1643 parseChunk(parser->context(), parseString); | 1643 parseChunk(parser->context(), parseString); |
| 1644 finishParsing(parser->context()); | 1644 finishParsing(parser->context()); |
| 1645 attrsOK = state.gotAttributes; | 1645 attrsOK = state.gotAttributes; |
| 1646 return state.attributes; | 1646 return state.attributes; |
| 1647 } | 1647 } |
| 1648 | 1648 |
| 1649 } // namespace blink | 1649 } // namespace blink |
| OLD | NEW |