Chromium Code Reviews| 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 19 matching lines...) Expand all Loading... | |
| 30 #include <libxml/parserInternals.h> | 30 #include <libxml/parserInternals.h> |
| 31 #include <libxslt/xslt.h> | 31 #include <libxslt/xslt.h> |
| 32 #include <wtf/StringExtras.h> | 32 #include <wtf/StringExtras.h> |
| 33 #include <wtf/text/CString.h> | 33 #include <wtf/text/CString.h> |
| 34 #include <wtf/Threading.h> | 34 #include <wtf/Threading.h> |
| 35 #include <wtf/unicode/UTF8.h> | 35 #include <wtf/unicode/UTF8.h> |
| 36 #include <wtf/UnusedParam.h> | 36 #include <wtf/UnusedParam.h> |
| 37 #include <wtf/Vector.h> | 37 #include <wtf/Vector.h> |
| 38 #include "HTMLNames.h" | 38 #include "HTMLNames.h" |
| 39 #include "XMLNSNames.h" | 39 #include "XMLNSNames.h" |
| 40 #include "bindings/v8/ScriptController.h" | |
| 40 #include "bindings/v8/ScriptSourceCode.h" | 41 #include "bindings/v8/ScriptSourceCode.h" |
| 41 #include "core/dom/CDATASection.h" | 42 #include "core/dom/CDATASection.h" |
| 42 #include "core/dom/Comment.h" | 43 #include "core/dom/Comment.h" |
| 43 #include "core/dom/Document.h" | 44 #include "core/dom/Document.h" |
| 44 #include "core/dom/DocumentFragment.h" | 45 #include "core/dom/DocumentFragment.h" |
| 45 #include "core/dom/DocumentType.h" | 46 #include "core/dom/DocumentType.h" |
| 46 #include "core/dom/ExceptionCodePlaceholder.h" | 47 #include "core/dom/ExceptionCodePlaceholder.h" |
| 47 #include "core/dom/ProcessingInstruction.h" | 48 #include "core/dom/ProcessingInstruction.h" |
| 48 #include "core/dom/ScriptLoader.h" | 49 #include "core/dom/ScriptLoader.h" |
| 49 #include "core/dom/TransformSource.h" | 50 #include "core/dom/TransformSource.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 328 if (isStopped() || m_sawXSLTransform) | 329 if (isStopped() || m_sawXSLTransform) |
| 329 return; | 330 return; |
| 330 | 331 |
| 331 if (m_parserPaused) { | 332 if (m_parserPaused) { |
| 332 m_pendingSrc.append(source); | 333 m_pendingSrc.append(source); |
| 333 return; | 334 return; |
| 334 } | 335 } |
| 335 | 336 |
| 336 doWrite(source.toString()); | 337 doWrite(source.toString()); |
| 337 | 338 |
| 338 // After parsing, go ahead and dispatch image beforeload events. | 339 if (isStopped()) |
| 339 ImageLoader::dispatchPendingBeforeLoadEvents(); | 340 return; |
|
abarth-chromium
2013/07/10 21:33:08
LGTM
| |
| 341 | |
| 342 if (document()->frame() && document()->frame()->script()->canExecuteScripts( NotAboutToExecuteScript)) | |
| 343 ImageLoader::dispatchPendingBeforeLoadEvents(); | |
| 340 } | 344 } |
| 341 | 345 |
| 342 void XMLDocumentParser::handleError(XMLErrors::ErrorType type, const char* forma ttedMessage, TextPosition position) | 346 void XMLDocumentParser::handleError(XMLErrors::ErrorType type, const char* forma ttedMessage, TextPosition position) |
| 343 { | 347 { |
| 344 m_xmlErrors.handleError(type, formattedMessage, position); | 348 m_xmlErrors.handleError(type, formattedMessage, position); |
| 345 if (type != XMLErrors::warning) | 349 if (type != XMLErrors::warning) |
| 346 m_sawError = true; | 350 m_sawError = true; |
| 347 if (type == XMLErrors::fatal) | 351 if (type == XMLErrors::fatal) |
| 348 stopParsing(); | 352 stopParsing(); |
| 349 } | 353 } |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1595 sax.initialized = XML_SAX2_MAGIC; | 1599 sax.initialized = XML_SAX2_MAGIC; |
| 1596 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state); | 1600 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state); |
| 1597 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1601 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1598 parseChunk(parser->context(), parseString); | 1602 parseChunk(parser->context(), parseString); |
| 1599 finishParsing(parser->context()); | 1603 finishParsing(parser->context()); |
| 1600 attrsOK = state.gotAttributes; | 1604 attrsOK = state.gotAttributes; |
| 1601 return state.attributes; | 1605 return state.attributes; |
| 1602 } | 1606 } |
| 1603 | 1607 |
| 1604 } // namespace WebCore | 1608 } // namespace WebCore |
| OLD | NEW |