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

Side by Side Diff: Source/WebCore/xml/parser/XMLDocumentParserQt.cpp

Issue 11833048: Merge 138863 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 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 * 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 m_sawFirstElement = false; 197 m_sawFirstElement = false;
198 } 198 }
199 199
200 void XMLDocumentParser::doEnd() 200 void XMLDocumentParser::doEnd()
201 { 201 {
202 #if ENABLE(XSLT) 202 #if ENABLE(XSLT)
203 if (m_sawXSLTransform) { 203 if (m_sawXSLTransform) {
204 document()->setTransformSource(adoptPtr(new TransformSource(m_originalSo urceForTransform.toString()))); 204 document()->setTransformSource(adoptPtr(new TransformSource(m_originalSo urceForTransform.toString())));
205 document()->setParsing(false); // Make the doc think it's done, so it wi ll apply xsl sheets. 205 document()->setParsing(false); // Make the doc think it's done, so it wi ll apply xsl sheets.
206 document()->styleResolverChanged(RecalcStyleImmediately); 206 document()->styleResolverChanged(RecalcStyleImmediately);
207
208 // styleResolverChanged() call can detach the parser and null out its do cument.
209 // In that case, we just bail out.
210 if (isDetached())
211 return;
212
207 document()->setParsing(true); 213 document()->setParsing(true);
208 DocumentParser::stopParsing(); 214 DocumentParser::stopParsing();
209 } 215 }
210 #endif 216 #endif
211 217
212 if (m_stream.error() == QXmlStreamReader::PrematureEndOfDocumentError 218 if (m_stream.error() == QXmlStreamReader::PrematureEndOfDocumentError
213 || (m_wroteText && !m_sawFirstElement && !m_sawXSLTransform && !m_sawErr or)) 219 || (m_wroteText && !m_sawFirstElement && !m_sawXSLTransform && !m_sawErr or))
214 handleError(XMLErrors::fatal, qPrintable(m_stream.errorString()), textPo sition()); 220 handleError(XMLErrors::fatal, qPrintable(m_stream.errorString()), textPo sition());
215 } 221 }
216 222
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 || (publicId == QLatin1String("-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN ")) 639 || (publicId == QLatin1String("-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN "))
634 || (publicId == QLatin1String("-//W3C//DTD XHTML 1.1 plus MathML 2.0 plu s SVG 1.1//EN")) 640 || (publicId == QLatin1String("-//W3C//DTD XHTML 1.1 plus MathML 2.0 plu s SVG 1.1//EN"))
635 || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.0//EN")) 641 || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.0//EN"))
636 ) 642 )
637 setIsXHTMLDocument(true); // controls if we replace entities or not. 643 setIsXHTMLDocument(true); // controls if we replace entities or not.
638 if (!m_parsingFragment) 644 if (!m_parsingFragment)
639 document()->parserAppendChild(DocumentType::create(document(), name, pub licId, systemId)); 645 document()->parserAppendChild(DocumentType::create(document(), name, pub licId, systemId));
640 646
641 } 647 }
642 } 648 }
OLDNEW
« no previous file with comments | « Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698