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 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 Handle<const ContainerNode> currentNode = adoptRawResult(m_currentNode); | 1011 Handle<const ContainerNode> currentNode = adoptRawResult(m_currentNode); |
1012 if (newElement->hasTagName(HTMLNames::templateTag)) | 1012 if (newElement->hasTagName(HTMLNames::templateTag)) |
1013 pushCurrentNode(Handle<HTMLTemplateElement>::cast(newElement)->content()
); | 1013 pushCurrentNode(Handle<HTMLTemplateElement>::cast(newElement)->content()
); |
1014 else | 1014 else |
1015 pushCurrentNode(adoptRawResult(newElement.raw())); | 1015 pushCurrentNode(adoptRawResult(newElement.raw())); |
1016 | 1016 |
1017 if (m_view && currentNode->attached() && !newElement->attached()) | 1017 if (m_view && currentNode->attached() && !newElement->attached()) |
1018 newElement->attach(); | 1018 newElement->attach(); |
1019 | 1019 |
1020 if (newElement->hasTagName(HTMLNames::htmlTag)) | 1020 if (newElement->hasTagName(HTMLNames::htmlTag)) |
1021 static_cast<HTMLHtmlElement*>(newElement.raw())->insertedByParser(); | 1021 Handle<HTMLHtmlElement>::cast(newElement)->insertedByParser(); |
1022 | 1022 |
1023 if (!m_parsingFragment && isFirstElement && document()->frame()) | 1023 if (!m_parsingFragment && isFirstElement && document()->frame()) |
1024 document()->frame()->loader()->dispatchDocumentElementAvailable(); | 1024 document()->frame()->loader()->dispatchDocumentElementAvailable(); |
1025 } | 1025 } |
1026 | 1026 |
1027 void XMLDocumentParser::endElementNs() | 1027 void XMLDocumentParser::endElementNs() |
1028 { | 1028 { |
1029 if (isStopped()) | 1029 if (isStopped()) |
1030 return; | 1030 return; |
1031 | 1031 |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 sax.startElementNs = attributesStartElementNsHandler; | 1681 sax.startElementNs = attributesStartElementNsHandler; |
1682 sax.initialized = XML_SAX2_MAGIC; | 1682 sax.initialized = XML_SAX2_MAGIC; |
1683 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1683 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
1684 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1684 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
1685 xmlParseChunk(parser->context(), reinterpret_cast<const char*>(parseString.c
haracters()), parseString.length() * sizeof(UChar), 1); | 1685 xmlParseChunk(parser->context(), reinterpret_cast<const char*>(parseString.c
haracters()), parseString.length() * sizeof(UChar), 1); |
1686 attrsOK = state.gotAttributes; | 1686 attrsOK = state.gotAttributes; |
1687 return state.attributes; | 1687 return state.attributes; |
1688 } | 1688 } |
1689 | 1689 |
1690 } // namespace WebCore | 1690 } // namespace WebCore |
OLD | NEW |