| 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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 TemporaryChange<bool> encodingScope(m_isCurrentlyParsing8BitChunk, parse
String.is8Bit()); | 878 TemporaryChange<bool> encodingScope(m_isCurrentlyParsing8BitChunk, parse
String.is8Bit()); |
| 879 parseChunk(context->context(), parseString); | 879 parseChunk(context->context(), parseString); |
| 880 | 880 |
| 881 // JavaScript (which may be run under the parseChunk callstack) may | 881 // JavaScript (which may be run under the parseChunk callstack) may |
| 882 // cause the parser to be stopped or detached. | 882 // cause the parser to be stopped or detached. |
| 883 if (isStopped()) | 883 if (isStopped()) |
| 884 return; | 884 return; |
| 885 } | 885 } |
| 886 | 886 |
| 887 // FIXME: Why is this here? And why is it after we process the passed sourc
e? | 887 // FIXME: Why is this here? And why is it after we process the passed sourc
e? |
| 888 if (document()->decoder() && document()->decoder()->sawError()) { | 888 if (document()->sawDecodingError()) { |
| 889 // If the decoder saw an error, report it as fatal (stops parsing) | 889 // If the decoder saw an error, report it as fatal (stops parsing) |
| 890 TextPosition position(OrdinalNumber::fromOneBasedInt(context->context()-
>input->line), OrdinalNumber::fromOneBasedInt(context->context()->input->col)); | 890 TextPosition position(OrdinalNumber::fromOneBasedInt(context->context()-
>input->line), OrdinalNumber::fromOneBasedInt(context->context()->input->col)); |
| 891 handleError(XMLErrors::fatal, "Encoding error", position); | 891 handleError(XMLErrors::fatal, "Encoding error", position); |
| 892 } | 892 } |
| 893 } | 893 } |
| 894 | 894 |
| 895 struct _xmlSAX2Namespace { | 895 struct _xmlSAX2Namespace { |
| 896 const xmlChar* prefix; | 896 const xmlChar* prefix; |
| 897 const xmlChar* uri; | 897 const xmlChar* uri; |
| 898 }; | 898 }; |
| (...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1634 sax.initialized = XML_SAX2_MAGIC; | 1634 sax.initialized = XML_SAX2_MAGIC; |
| 1635 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1635 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
| 1636 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1636 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1637 parseChunk(parser->context(), parseString); | 1637 parseChunk(parser->context(), parseString); |
| 1638 finishParsing(parser->context()); | 1638 finishParsing(parser->context()); |
| 1639 attrsOK = state.gotAttributes; | 1639 attrsOK = state.gotAttributes; |
| 1640 return state.attributes; | 1640 return state.attributes; |
| 1641 } | 1641 } |
| 1642 | 1642 |
| 1643 } // namespace WebCore | 1643 } // namespace WebCore |
| OLD | NEW |