diff --git a/mozilla/content/base/src/nsHTMLContentSerializer.cpp b/mozilla/content/base/src/nsHTMLContentSerializer.cpp
index efdcced3f03..7575afffbf0 100644
--- a/mozilla/content/base/src/nsHTMLContentSerializer.cpp
+++ b/mozilla/content/base/src/nsHTMLContentSerializer.cpp
@@ -664,7 +664,8 @@ nsHTMLContentSerializer::AppendElementStart(nsIDOMElement *aElement,
// The _moz_dirty attribute is emitted by the editor to
// indicate that this element should be pretty printed
// even if we're not in pretty printing mode
- PRBool hasDirtyAttr = HasDirtyAttr(content);
+ PRBool hasDirtyAttr = content->HasAttr(kNameSpaceID_None,
+ nsLayoutAtoms::mozdirty);
nsIAtom *name = content->Tag();
@@ -774,7 +775,8 @@ nsHTMLContentSerializer::AppendElementEnd(nsIDOMElement *aElement,
nsCOMPtr content = do_QueryInterface(aElement);
if (!content) return NS_ERROR_FAILURE;
- PRBool hasDirtyAttr = HasDirtyAttr(content);
+ PRBool hasDirtyAttr = content->HasAttr(kNameSpaceID_None,
+ nsLayoutAtoms::mozdirty);
nsIAtom *name = content->Tag();
@@ -1022,21 +1024,6 @@ nsHTMLContentSerializer::AppendToStringConvertLF(const nsAString& aStr,
}
PRBool
-nsHTMLContentSerializer::HasDirtyAttr(nsIContent* aContent)
-{
- nsAutoString val;
-
- if (NS_CONTENT_ATTR_NOT_THERE != aContent->GetAttr(kNameSpaceID_None,
- nsLayoutAtoms::mozdirty,
- val)) {
- return PR_TRUE;
- }
- else {
- return PR_FALSE;
- }
-}
-
-PRBool
nsHTMLContentSerializer::LineBreakBeforeOpen(nsIAtom* aName,
PRBool aHasDirtyAttr)
{
diff --git a/mozilla/content/base/src/nsHTMLContentSerializer.h b/mozilla/content/base/src/nsHTMLContentSerializer.h
index 508e5275d7c..75847e429db 100644
--- a/mozilla/content/base/src/nsHTMLContentSerializer.h
+++ b/mozilla/content/base/src/nsHTMLContentSerializer.h
@@ -68,7 +68,6 @@ class nsHTMLContentSerializer : public nsXMLContentSerializer {
NS_IMETHOD AppendDocumentStart(nsIDOMDocument *aDocument,
nsAString& aStr);
protected:
- PRBool HasDirtyAttr(nsIContent* aContent);
PRBool LineBreakBeforeOpen(nsIAtom* aName, PRBool aHasDirtyAttr);
PRBool LineBreakAfterOpen(nsIAtom* aName, PRBool aHasDirtyAttr);
PRBool LineBreakBeforeClose(nsIAtom* aName, PRBool aHasDirtyAttr);
diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp
index c360b86ace4..c8c7687c04a 100644
--- a/mozilla/layout/tables/nsTableCellFrame.cpp
+++ b/mozilla/layout/tables/nsTableCellFrame.cpp
@@ -231,9 +231,7 @@ void nsTableCellFrame::SetPass1MaxElementWidth(nscoord aMaxWidth,
styleText->mWhiteSpace != NS_STYLE_WHITESPACE_NOWRAP &&
styleText->mWhiteSpace != NS_STYLE_WHITESPACE_PRE) {
// has fixed width, check the content for nowrap
- nsAutoString nowrap;
- nsresult result = GetContent()->GetAttr(kNameSpaceID_None, nsHTMLAtoms::nowrap, nowrap);
- if(NS_CONTENT_ATTR_NOT_THERE != result) {
+ if (GetContent()->HasAttr(kNameSpaceID_None, nsHTMLAtoms::nowrap)) {
// content has nowrap (is not mapped to style be cause it has width)
// set the max element size to the value of the fixed width (NAV/IE quirk)
maxElemWidth = NS_MAX(maxElemWidth, stylePosition->mWidth.GetCoordValue());