|
Lines 42-47
a/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp_sec1
|
| 42 |
#include "HTMLLinkElement.h" |
42 |
#include "HTMLLinkElement.h" |
| 43 |
#include "HTMLNames.h" |
43 |
#include "HTMLNames.h" |
| 44 |
#include "HTMLStyleElement.h" |
44 |
#include "HTMLStyleElement.h" |
|
|
45 |
#include "HTMLTemplateElement.h" |
| 45 |
#include "ProcessingInstruction.h" |
46 |
#include "ProcessingInstruction.h" |
| 46 |
#include "ResourceError.h" |
47 |
#include "ResourceError.h" |
| 47 |
#include "ResourceHandle.h" |
48 |
#include "ResourceHandle.h" |
|
Lines 788-794
void XMLDocumentParser::startElementNs(const xmlChar* xmlLocalName, const xmlCha
a/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp_sec2
|
| 788 |
m_sawFirstElement = true; |
789 |
m_sawFirstElement = true; |
| 789 |
|
790 |
|
| 790 |
QualifiedName qName(prefix, localName, uri); |
791 |
QualifiedName qName(prefix, localName, uri); |
| 791 |
RefPtr<Element> newElement = document()->createElement(qName, true); |
792 |
RefPtr<Element> newElement = m_currentNode->document()->createElement(qName, true); |
| 792 |
if (!newElement) { |
793 |
if (!newElement) { |
| 793 |
stopParsing(); |
794 |
stopParsing(); |
| 794 |
return; |
795 |
return; |
|
Lines 818-824
void XMLDocumentParser::startElementNs(const xmlChar* xmlLocalName, const xmlCha
a/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp_sec3
|
| 818 |
|
819 |
|
| 819 |
m_currentNode->parserAppendChild(newElement.get()); |
820 |
m_currentNode->parserAppendChild(newElement.get()); |
| 820 |
|
821 |
|
|
|
822 |
#if ENABLE(TEMPLATE_ELEMENT) |
| 823 |
if (newElement->hasTagName(HTMLNames::templateTag)) |
| 824 |
pushCurrentNode(toHTMLTemplateElement(newElement.get())->content()); |
| 825 |
else |
| 826 |
pushCurrentNode(newElement.get()); |
| 827 |
#else |
| 821 |
pushCurrentNode(newElement.get()); |
828 |
pushCurrentNode(newElement.get()); |
|
|
829 |
#endif |
| 830 |
|
| 822 |
if (m_view && !newElement->attached()) |
831 |
if (m_view && !newElement->attached()) |
| 823 |
newElement->attach(); |
832 |
newElement->attach(); |
| 824 |
|
833 |
|
|
Lines 961-967
void XMLDocumentParser::processingInstruction(const xmlChar* target, const xmlCh
a/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp_sec4
|
| 961 |
|
970 |
|
| 962 |
// ### handle exceptions |
971 |
// ### handle exceptions |
| 963 |
ExceptionCode ec = 0; |
972 |
ExceptionCode ec = 0; |
| 964 |
RefPtr<ProcessingInstruction> pi = document()->createProcessingInstruction( |
973 |
RefPtr<ProcessingInstruction> pi = m_currentNode->document()->createProcessingInstruction( |
| 965 |
toString(target), toString(data), ec); |
974 |
toString(target), toString(data), ec); |
| 966 |
if (ec) |
975 |
if (ec) |
| 967 |
return; |
976 |
return; |
|
Lines 995-1001
void XMLDocumentParser::cdataBlock(const xmlChar* s, int len)
a/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp_sec5
|
| 995 |
|
1004 |
|
| 996 |
exitText(); |
1005 |
exitText(); |
| 997 |
|
1006 |
|
| 998 |
RefPtr<CDATASection> newNode = CDATASection::create(document(), toString(s, len)); |
1007 |
RefPtr<CDATASection> newNode = CDATASection::create(m_currentNode->document(), toString(s, len)); |
| 999 |
m_currentNode->parserAppendChild(newNode.get()); |
1008 |
m_currentNode->parserAppendChild(newNode.get()); |
| 1000 |
if (m_view && !newNode->attached()) |
1009 |
if (m_view && !newNode->attached()) |
| 1001 |
newNode->attach(); |
1010 |
newNode->attach(); |
|
Lines 1013-1019
void XMLDocumentParser::comment(const xmlChar* s)
a/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp_sec6
|
| 1013 |
|
1022 |
|
| 1014 |
exitText(); |
1023 |
exitText(); |
| 1015 |
|
1024 |
|
| 1016 |
RefPtr<Comment> newNode = Comment::create(document(), toString(s)); |
1025 |
RefPtr<Comment> newNode = Comment::create(m_currentNode->document(), toString(s)); |
| 1017 |
m_currentNode->parserAppendChild(newNode.get()); |
1026 |
m_currentNode->parserAppendChild(newNode.get()); |
| 1018 |
if (m_view && !newNode->attached()) |
1027 |
if (m_view && !newNode->attached()) |
| 1019 |
newNode->attach(); |
1028 |
newNode->attach(); |