mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=427245 backing-out the previous patch, because qm-centos5-01 becomes oragne.
This commit is contained in:
parent
6af397de71
commit
4c89e70f45
@ -1916,24 +1916,17 @@ nsGenericHTMLFormElement::UpdateEditableFormControlState()
|
||||
}
|
||||
|
||||
nsIContent *parent = GetParent();
|
||||
PRBool editable = parent && parent->HasFlag(NODE_IS_EDITABLE);
|
||||
|
||||
if (parent && parent->HasFlag(NODE_IS_EDITABLE)) {
|
||||
SetEditableFlag(PR_TRUE);
|
||||
return;
|
||||
if (!editable) {
|
||||
// If not contentEditable we still need to check the readonly attribute.
|
||||
PRBool roState;
|
||||
GetBoolAttr(nsGkAtoms::readonly, &roState);
|
||||
|
||||
editable = !roState;
|
||||
}
|
||||
|
||||
PRInt32 formType = GetType();
|
||||
if (formType != NS_FORM_INPUT_PASSWORD && formType != NS_FORM_INPUT_TEXT &&
|
||||
formType != NS_FORM_TEXTAREA) {
|
||||
SetEditableFlag(PR_FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
// If not contentEditable we still need to check the readonly attribute.
|
||||
PRBool roState;
|
||||
GetBoolAttr(nsGkAtoms::readonly, &roState);
|
||||
|
||||
SetEditableFlag(!roState);
|
||||
SetEditableFlag(editable);
|
||||
}
|
||||
|
||||
|
||||
|
@ -563,15 +563,7 @@ nsHTMLInputElement::AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
||||
// now.
|
||||
nsIDocument* document = GetCurrentDoc();
|
||||
MOZ_AUTO_DOC_UPDATE(document, UPDATE_CONTENT_STATE, aNotify);
|
||||
|
||||
UpdateEditableState();
|
||||
if (document) {
|
||||
MOZ_AUTO_DOC_UPDATE(document, UPDATE_CONTENT_STATE, PR_TRUE);
|
||||
document->ContentStatesChanged(this, nsnull,
|
||||
NS_EVENT_STATE_MOZ_READONLY |
|
||||
NS_EVENT_STATE_MOZ_READWRITE);
|
||||
}
|
||||
|
||||
|
||||
if (!aValue) {
|
||||
// We're now a text input. Note that we have to handle this manually,
|
||||
// since removing an attribute (which is what happened, since aValue is
|
||||
|
Loading…
Reference in New Issue
Block a user