diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index fce0dcb7df1..0511e10ba03 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -183,6 +183,8 @@ protected: const nsIParserNode& aNode); nsresult ProcessSPACERTag(nsIHTMLContent** aInstancePtrResult, const nsIParserNode& aNode); + nsresult ProcessCOLTag(nsIHTMLContent** aInstancePtrResult, + const nsIParserNode& aNode); nsresult ProcessTEXTAREATag(nsIHTMLContent** aInstancePtrResult, const nsIParserNode& aNode); nsresult ProcessWBRTag(nsIHTMLContent** aInstancePtrResult, @@ -769,10 +771,6 @@ HTMLContentSink::OpenContainer(const nsIParserNode& aNode) rv = NS_NewTableColGroupPart(&container, atom); break; - case eHTMLTag_col: - rv = NS_NewTableColPart(&container, atom); - break; - case eHTMLTag_td: case eHTMLTag_th: rv = NS_NewTableCellPart(&container, atom); @@ -1379,6 +1377,9 @@ NS_IMETHODIMP HTMLContentSink::AddLeaf(const nsIParserNode& aNode) FlushText(); rv = ProcessEMBEDTag(&leaf, aNode); break; + case eHTMLTag_col: + rv = ProcessCOLTag(&leaf, aNode); + break; } break; @@ -1817,6 +1818,19 @@ nsresult HTMLContentSink::ProcessSPACERTag(nsIHTMLContent** aInstancePtrResult, return rv; } +nsresult HTMLContentSink::ProcessCOLTag(nsIHTMLContent** aInstancePtrResult, + const nsIParserNode& aNode) +{ + nsAutoString tmp("COL"); + nsIAtom* atom = NS_NewAtom(tmp); + nsresult rv = NS_NewTableColPart(aInstancePtrResult, atom); + if (NS_OK == rv) { + rv = AddAttributes(aNode, *aInstancePtrResult); + } + NS_RELEASE(atom); + return rv; +} + #define SCRIPT_BUF_SIZE 1024 nsresult HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode) diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index fce0dcb7df1..0511e10ba03 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -183,6 +183,8 @@ protected: const nsIParserNode& aNode); nsresult ProcessSPACERTag(nsIHTMLContent** aInstancePtrResult, const nsIParserNode& aNode); + nsresult ProcessCOLTag(nsIHTMLContent** aInstancePtrResult, + const nsIParserNode& aNode); nsresult ProcessTEXTAREATag(nsIHTMLContent** aInstancePtrResult, const nsIParserNode& aNode); nsresult ProcessWBRTag(nsIHTMLContent** aInstancePtrResult, @@ -769,10 +771,6 @@ HTMLContentSink::OpenContainer(const nsIParserNode& aNode) rv = NS_NewTableColGroupPart(&container, atom); break; - case eHTMLTag_col: - rv = NS_NewTableColPart(&container, atom); - break; - case eHTMLTag_td: case eHTMLTag_th: rv = NS_NewTableCellPart(&container, atom); @@ -1379,6 +1377,9 @@ NS_IMETHODIMP HTMLContentSink::AddLeaf(const nsIParserNode& aNode) FlushText(); rv = ProcessEMBEDTag(&leaf, aNode); break; + case eHTMLTag_col: + rv = ProcessCOLTag(&leaf, aNode); + break; } break; @@ -1817,6 +1818,19 @@ nsresult HTMLContentSink::ProcessSPACERTag(nsIHTMLContent** aInstancePtrResult, return rv; } +nsresult HTMLContentSink::ProcessCOLTag(nsIHTMLContent** aInstancePtrResult, + const nsIParserNode& aNode) +{ + nsAutoString tmp("COL"); + nsIAtom* atom = NS_NewAtom(tmp); + nsresult rv = NS_NewTableColPart(aInstancePtrResult, atom); + if (NS_OK == rv) { + rv = AddAttributes(aNode, *aInstancePtrResult); + } + NS_RELEASE(atom); + return rv; +} + #define SCRIPT_BUF_SIZE 1024 nsresult HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode)