Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2025-07-04 22:28:17 +08:00
commit 9175504ffc
25 changed files with 75 additions and 75 deletions

View file

@ -2198,13 +2198,13 @@ nsGenericHTMLFormElement::IntrinsicState() const
}
// Make the text controls read-write
if (!state.HasState(NS_EVENT_STATE_MOZ_READWRITE) &&
if (!state.HasState(NS_EVENT_STATE_READWRITE) &&
IsTextOrNumberControl(/*aExcludePassword*/ false)) {
bool roState = GetBoolAttr(nsGkAtoms::readonly);
if (!roState) {
state |= NS_EVENT_STATE_MOZ_READWRITE;
state &= ~NS_EVENT_STATE_MOZ_READONLY;
state |= NS_EVENT_STATE_READWRITE;
state &= ~NS_EVENT_STATE_READONLY;
}
}

View file

@ -45,9 +45,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=535043
/** Test for Bug 1264157 **/
SimpleTest.waitForFocus(function() {
// Check the initial values.
let active = [].slice.call(document.querySelectorAll("input:not(:disabled):not(:-moz-read-only)"));
let active = [].slice.call(document.querySelectorAll("input:not(:disabled):not(:read-only)"));
let disabled = [].slice.call(document.querySelectorAll("input:disabled"));
let readonly = [].slice.call(document.querySelectorAll("input:-moz-read-only"));
let readonly = [].slice.call(document.querySelectorAll("input:read-only"));
ok(active.length == 2, "Test is messed up: missing non-disabled/non-readonly inputs");
ok(disabled.length == 2, "Test is messed up: missing disabled inputs");
ok(readonly.length == 2, "Test is messed up: missing readonly inputs");