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, 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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 newElement->beginParsingChildren(); | 1002 newElement->beginParsingChildren(); |
| 1003 | 1003 |
| 1004 ScriptLoader* scriptLoader = toScriptLoaderIfPossible(newElement.get()); | 1004 ScriptLoader* scriptLoader = toScriptLoaderIfPossible(newElement.get()); |
| 1005 if (scriptLoader) | 1005 if (scriptLoader) |
| 1006 m_scriptStartPosition = textPosition(); | 1006 m_scriptStartPosition = textPosition(); |
| 1007 | 1007 |
| 1008 m_currentNode->parserAppendChild(newElement.get()); | 1008 m_currentNode->parserAppendChild(newElement.get()); |
| 1009 | 1009 |
| 1010 // Event handlers may synchronously trigger removal of the | |
| 1011 // document and cancellation of this parser. | |
|
haraken
2014/09/22 05:35:23
Just help me understand: What's the relationship b
sof
2014/09/22 07:47:43
The frame might now be detached as a result of syn
| |
| 1012 if (isStopped()) { | |
| 1013 stopParsing(); | |
| 1014 return; | |
| 1015 } | |
| 1016 | |
| 1010 if (isHTMLTemplateElement(*newElement)) | 1017 if (isHTMLTemplateElement(*newElement)) |
| 1011 pushCurrentNode(toHTMLTemplateElement(*newElement).content()); | 1018 pushCurrentNode(toHTMLTemplateElement(*newElement).content()); |
| 1012 else | 1019 else |
| 1013 pushCurrentNode(newElement.get()); | 1020 pushCurrentNode(newElement.get()); |
| 1014 | 1021 |
| 1015 if (isHTMLHtmlElement(*newElement)) | 1022 if (isHTMLHtmlElement(*newElement)) |
| 1016 toHTMLHtmlElement(*newElement).insertedByParser(); | 1023 toHTMLHtmlElement(*newElement).insertedByParser(); |
| 1017 | 1024 |
| 1018 if (!m_parsingFragment && isFirstElement && document()->frame()) | 1025 if (!m_parsingFragment && isFirstElement && document()->frame()) |
| 1019 document()->frame()->loader().dispatchDocumentElementAvailable(); | 1026 document()->frame()->loader().dispatchDocumentElementAvailable(); |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1637 sax.initialized = XML_SAX2_MAGIC; | 1644 sax.initialized = XML_SAX2_MAGIC; |
| 1638 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state); | 1645 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state); |
| 1639 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1646 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
| 1640 parseChunk(parser->context(), parseString); | 1647 parseChunk(parser->context(), parseString); |
| 1641 finishParsing(parser->context()); | 1648 finishParsing(parser->context()); |
| 1642 attrsOK = state.gotAttributes; | 1649 attrsOK = state.gotAttributes; |
| 1643 return state.attributes; | 1650 return state.attributes; |
| 1644 } | 1651 } |
| 1645 | 1652 |
| 1646 } // namespace blink | 1653 } // namespace blink |
| OLD | NEW |