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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 | 967 |
968 const ContainerNode* currentNode = m_currentNode; | 968 const ContainerNode* currentNode = m_currentNode; |
969 if (newElement->hasTagName(HTMLNames::templateTag)) | 969 if (newElement->hasTagName(HTMLNames::templateTag)) |
970 pushCurrentNode(toHTMLTemplateElement(newElement.get())->content()); | 970 pushCurrentNode(toHTMLTemplateElement(newElement.get())->content()); |
971 else | 971 else |
972 pushCurrentNode(newElement.get()); | 972 pushCurrentNode(newElement.get()); |
973 | 973 |
974 if (m_view && currentNode->attached() && !newElement->attached()) | 974 if (m_view && currentNode->attached() && !newElement->attached()) |
975 newElement->attach(); | 975 newElement->attach(); |
976 | 976 |
977 if (newElement->hasTagName(HTMLNames::htmlTag)) | 977 if (isHTMLHtmlElement(newElement.get())) |
978 static_cast<HTMLHtmlElement*>(newElement.get())->insertedByParser(); | 978 toHTMLHtmlElement(newElement.get())->insertedByParser(); |
979 | 979 |
980 if (!m_parsingFragment && isFirstElement && document()->frame()) | 980 if (!m_parsingFragment && isFirstElement && document()->frame()) |
981 document()->frame()->loader()->dispatchDocumentElementAvailable(); | 981 document()->frame()->loader()->dispatchDocumentElementAvailable(); |
982 } | 982 } |
983 | 983 |
984 void XMLDocumentParser::endElementNs() | 984 void XMLDocumentParser::endElementNs() |
985 { | 985 { |
986 if (isStopped()) | 986 if (isStopped()) |
987 return; | 987 return; |
988 | 988 |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1599 sax.initialized = XML_SAX2_MAGIC; | 1599 sax.initialized = XML_SAX2_MAGIC; |
1600 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1600 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
1601 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1601 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
1602 parseChunk(parser->context(), parseString); | 1602 parseChunk(parser->context(), parseString); |
1603 finishParsing(parser->context()); | 1603 finishParsing(parser->context()); |
1604 attrsOK = state.gotAttributes; | 1604 attrsOK = state.gotAttributes; |
1605 return state.attributes; | 1605 return state.attributes; |
1606 } | 1606 } |
1607 | 1607 |
1608 } // namespace WebCore | 1608 } // namespace WebCore |
OLD | NEW |