diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 812abfe3f5e..bb0d7b0bdd4 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -61,7 +61,6 @@ #include "nsHTMLAtoms.h" #include "nsHTMLValue.h" #include "nsIDOMEvent.h" -#include "nsIDOMHTMLTableCellElement.h" #include "nsIHTMLContent.h" #include "prprf.h" #include "nsLayoutAtoms.h" @@ -6568,9 +6567,12 @@ nsBlockFrame::IsTDTableCellBlock(nsIFrame& aFrame) if (nsLayoutAtoms::tableCellFrame == frameType) { nsCOMPtr content; aFrame.GetContent(getter_AddRefs(content)); - nsCOMPtr cellContent(do_QueryInterface(content)); - if (cellContent) { - return PR_TRUE; + if (content && content->IsContentOfType(nsIContent::eHTML)) { + nsCOMPtr tag; + content->GetTag(*getter_AddRefs(tag)); + if (tag == nsHTMLAtoms::td) { + return PR_TRUE; + } } } } diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 812abfe3f5e..bb0d7b0bdd4 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -61,7 +61,6 @@ #include "nsHTMLAtoms.h" #include "nsHTMLValue.h" #include "nsIDOMEvent.h" -#include "nsIDOMHTMLTableCellElement.h" #include "nsIHTMLContent.h" #include "prprf.h" #include "nsLayoutAtoms.h" @@ -6568,9 +6567,12 @@ nsBlockFrame::IsTDTableCellBlock(nsIFrame& aFrame) if (nsLayoutAtoms::tableCellFrame == frameType) { nsCOMPtr content; aFrame.GetContent(getter_AddRefs(content)); - nsCOMPtr cellContent(do_QueryInterface(content)); - if (cellContent) { - return PR_TRUE; + if (content && content->IsContentOfType(nsIContent::eHTML)) { + nsCOMPtr tag; + content->GetTag(*getter_AddRefs(tag)); + if (tag == nsHTMLAtoms::td) { + return PR_TRUE; + } } } }