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 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 } | 1064 } |
1065 | 1065 |
1066 if (isHTMLTemplateElement(*newElement)) | 1066 if (isHTMLTemplateElement(*newElement)) |
1067 pushCurrentNode(toHTMLTemplateElement(*newElement).content()); | 1067 pushCurrentNode(toHTMLTemplateElement(*newElement).content()); |
1068 else | 1068 else |
1069 pushCurrentNode(newElement.get()); | 1069 pushCurrentNode(newElement.get()); |
1070 | 1070 |
1071 if (isHTMLHtmlElement(*newElement)) | 1071 if (isHTMLHtmlElement(*newElement)) |
1072 toHTMLHtmlElement(*newElement).insertedByParser(); | 1072 toHTMLHtmlElement(*newElement).insertedByParser(); |
1073 | 1073 |
1074 if (!m_parsingFragment && isFirstElement && document()->frame()) | 1074 if (!m_parsingFragment && isFirstElement && document()->frame()) { |
1075 document()->frame()->loader().dispatchDocumentElementAvailable(); | 1075 document()->frame()->loader().dispatchDocumentElementAvailable(); |
| 1076 document()->frame()->loader().runScriptsAtDocumentElementAvailable(); |
| 1077 // runScriptsAtDocumentElementAvailable might have invalidated the docum
ent. |
| 1078 } |
1076 } | 1079 } |
1077 | 1080 |
1078 void XMLDocumentParser::endElementNs() | 1081 void XMLDocumentParser::endElementNs() |
1079 { | 1082 { |
1080 if (isStopped()) | 1083 if (isStopped()) |
1081 return; | 1084 return; |
1082 | 1085 |
1083 if (m_parserPaused) { | 1086 if (m_parserPaused) { |
1084 m_pendingCallbacks.append(adoptPtr(new PendingEndElementNSCallback(m_scr
iptStartPosition))); | 1087 m_pendingCallbacks.append(adoptPtr(new PendingEndElementNSCallback(m_scr
iptStartPosition))); |
1085 return; | 1088 return; |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1695 sax.initialized = XML_SAX2_MAGIC; | 1698 sax.initialized = XML_SAX2_MAGIC; |
1696 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1699 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
1697 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1700 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
1698 parseChunk(parser->context(), parseString); | 1701 parseChunk(parser->context(), parseString); |
1699 finishParsing(parser->context()); | 1702 finishParsing(parser->context()); |
1700 attrsOK = state.gotAttributes; | 1703 attrsOK = state.gotAttributes; |
1701 return state.attributes; | 1704 return state.attributes; |
1702 } | 1705 } |
1703 | 1706 |
1704 } // namespace blink | 1707 } // namespace blink |
OLD | NEW |