Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 23455024: Move ownership of the TextResourceDecoder to DecodedDataDocumentParser (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 TemporaryChange<bool> encodingScope(m_isCurrentlyParsing8BitChunk, parse String.is8Bit()); 867 TemporaryChange<bool> encodingScope(m_isCurrentlyParsing8BitChunk, parse String.is8Bit());
868 parseChunk(context->context(), parseString); 868 parseChunk(context->context(), parseString);
869 869
870 // JavaScript (which may be run under the parseChunk callstack) may 870 // JavaScript (which may be run under the parseChunk callstack) may
871 // cause the parser to be stopped or detached. 871 // cause the parser to be stopped or detached.
872 if (isStopped()) 872 if (isStopped())
873 return; 873 return;
874 } 874 }
875 875
876 // FIXME: Why is this here? And why is it after we process the passed sourc e? 876 // FIXME: Why is this here? And why is it after we process the passed sourc e?
877 if (document()->decoder() && document()->decoder()->sawError()) { 877 if (document()->sawDecodingError()) {
878 // If the decoder saw an error, report it as fatal (stops parsing) 878 // If the decoder saw an error, report it as fatal (stops parsing)
879 TextPosition position(OrdinalNumber::fromOneBasedInt(context->context()- >input->line), OrdinalNumber::fromOneBasedInt(context->context()->input->col)); 879 TextPosition position(OrdinalNumber::fromOneBasedInt(context->context()- >input->line), OrdinalNumber::fromOneBasedInt(context->context()->input->col));
880 handleError(XMLErrors::fatal, "Encoding error", position); 880 handleError(XMLErrors::fatal, "Encoding error", position);
881 } 881 }
882 } 882 }
883 883
884 struct _xmlSAX2Namespace { 884 struct _xmlSAX2Namespace {
885 const xmlChar* prefix; 885 const xmlChar* prefix;
886 const xmlChar* uri; 886 const xmlChar* uri;
887 }; 887 };
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 sax.initialized = XML_SAX2_MAGIC; 1614 sax.initialized = XML_SAX2_MAGIC;
1615 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state); 1615 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state);
1616 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; 1616 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />";
1617 parseChunk(parser->context(), parseString); 1617 parseChunk(parser->context(), parseString);
1618 finishParsing(parser->context()); 1618 finishParsing(parser->context());
1619 attrsOK = state.gotAttributes; 1619 attrsOK = state.gotAttributes;
1620 return state.attributes; 1620 return state.attributes;
1621 } 1621 }
1622 1622
1623 } // namespace WebCore 1623 } // namespace WebCore
OLDNEW
« Source/core/loader/DocumentWriter.cpp ('K') | « Source/core/xml/XSLTProcessor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698