Backed out changeset 2f394b22e31d (bug 1108425) for causing failures on bidi/726420-1.html. CLOSED TREE

This commit is contained in:
Natalia Csoregi
2023-05-16 18:47:45 +03:00
parent 2c053f4fae
commit 5a99179621
8 changed files with 120 additions and 91 deletions

View File

@@ -667,16 +667,6 @@ nsresult HTMLTextAreaElement::SetValueFromSetRangeText(
ValueSetterOption::SetValueChanged});
}
void HTMLTextAreaElement::SetDirectionFromValue(bool aNotify,
const nsAString* aKnownValue) {
nsAutoString value;
if (!aKnownValue) {
GetValue(value);
aKnownValue = &value;
}
SetDirectionalityFromValue(this, *aKnownValue, aNotify);
}
nsresult HTMLTextAreaElement::Reset() {
nsAutoString resetVal;
GetDefaultValue(resetVal, IgnoreErrors());
@@ -807,11 +797,6 @@ nsresult HTMLTextAreaElement::BindToTree(BindContext& aContext,
nsGenericHTMLFormControlElementWithState::BindToTree(aContext, aParent);
NS_ENSURE_SUCCESS(rv, rv);
// Set direction based on value if dir=auto
if (HasDirAuto()) {
SetDirectionFromValue(false);
}
// If there is a disabled fieldset in the parent chain, the element is now
// barred from constraint validation and can't suffer from value missing.
UpdateValueMissingValidityState();
@@ -938,9 +923,6 @@ void HTMLTextAreaElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
if (nsTextControlFrame* f = do_QueryFrame(GetPrimaryFrame())) {
f->PlaceholderChanged(aOldValue, aValue);
}
} else if (aName == nsGkAtoms::dir && aValue &&
aValue->Equals(nsGkAtoms::_auto, eIgnoreCase)) {
SetDirectionFromValue(aNotify);
}
}
@@ -1133,7 +1115,7 @@ void HTMLTextAreaElement::InitializeKeyboardEventListeners() {
void HTMLTextAreaElement::OnValueChanged(ValueChangeKind aKind,
bool aNewValueEmpty,
const nsAString* aKnownNewValue) {
const nsAString*) {
if (aKind != ValueChangeKind::Internal) {
mLastValueChangeWasInteractive = aKind == ValueChangeKind::UserInteraction;
}
@@ -1151,10 +1133,6 @@ void HTMLTextAreaElement::OnValueChanged(ValueChangeKind aKind,
UpdateTooShortValidityState();
UpdateValueMissingValidityState();
if (HasDirAuto()) {
SetDirectionFromValue(true, aKnownNewValue);
}
if (validBefore != IsValid() ||
(emptyBefore != IsValueEmpty() && HasAttr(nsGkAtoms::placeholder))) {
UpdateState(true);