Fix for bug 150566 (Readonly text fields aren't read-only)

Use kNameSpaceID_None when calling GetAttr() so that the
backend find attribute code in the content module matches
against atoms.

Removed calls to GetNameSpaceID().

r=jkeiser@netscape.com  sr=jst@netscape.com
This commit is contained in:
kin%netscape.com 2002-06-14 06:01:29 +00:00
Родитель 47123c689e
Коммит bc6a4b6a6b
1 изменённых файлов: 2 добавлений и 13 удалений

Просмотреть файл

@ -2136,13 +2136,6 @@ nsGfxTextControlFrame2::CreateAnonymousContent(nsIPresContext* aPresContext,
{ {
rv = mEditor->GetFlags(&editorFlags); rv = mEditor->GetFlags(&editorFlags);
if (NS_FAILED(rv))
return rv;
PRInt32 nameSpaceID;
rv = mContent->GetNameSpaceID(nameSpaceID);
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return rv; return rv;
@ -2150,7 +2143,7 @@ nsGfxTextControlFrame2::CreateAnonymousContent(nsIPresContext* aPresContext,
// Check if the readonly attribute is set. // 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)) if (NS_FAILED(rv))
return rv; return rv;
@ -2160,7 +2153,7 @@ nsGfxTextControlFrame2::CreateAnonymousContent(nsIPresContext* aPresContext,
// Check if the disabled attribute is set. // 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)) if (NS_FAILED(rv))
return rv; return rv;
@ -2276,10 +2269,6 @@ nsGfxTextControlFrame2::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize)
PropagateDebug(aState); 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.width = 0;
aSize.height = 0; aSize.height = 0;