зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
47123c689e
Коммит
bc6a4b6a6b
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче