diff --git a/layout/html/forms/src/nsGfxTextControlFrame2.cpp b/layout/html/forms/src/nsGfxTextControlFrame2.cpp
index de25336230c..18db3827826 100644
--- a/layout/html/forms/src/nsGfxTextControlFrame2.cpp
+++ b/layout/html/forms/src/nsGfxTextControlFrame2.cpp
@@ -2136,13 +2136,6 @@ nsGfxTextControlFrame2::CreateAnonymousContent(nsIPresContext* aPresContext,
{
rv = mEditor->GetFlags(&editorFlags);
- if (NS_FAILED(rv))
- return rv;
-
- PRInt32 nameSpaceID;
-
- rv = mContent->GetNameSpaceID(nameSpaceID);
-
if (NS_FAILED(rv))
return rv;
@@ -2150,7 +2143,7 @@ nsGfxTextControlFrame2::CreateAnonymousContent(nsIPresContext* aPresContext,
// Check if the readonly attribute is set.
- rv = mContent->GetAttr(nameSpaceID, nsHTMLAtoms::readonly, resultValue);
+ rv = mContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::readonly, resultValue);
if (NS_FAILED(rv))
return rv;
@@ -2160,7 +2153,7 @@ nsGfxTextControlFrame2::CreateAnonymousContent(nsIPresContext* aPresContext,
// Check if the disabled attribute is set.
- rv = mContent->GetAttr(nameSpaceID, nsHTMLAtoms::disabled, resultValue);
+ rv = mContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, resultValue);
if (NS_FAILED(rv))
return rv;
@@ -2276,10 +2269,6 @@ nsGfxTextControlFrame2::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize)
PropagateDebug(aState);
- // navquirk can only happen if we are in the HTML namespace. It does not apply in XUL.
- PRInt32 nameSpaceID;
- mContent->GetNameSpaceID(nameSpaceID);
-
aSize.width = 0;
aSize.height = 0;