Bug 1556351 - Part 3: Rename nsGenericHTMLFormElementWithState to nsGenericHTMLFormControlElementWithState; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D124786
This commit is contained in:
@@ -158,7 +158,7 @@ HTMLTextAreaElement::SelectAll(nsPresContext* aPresContext) {
|
||||
|
||||
bool HTMLTextAreaElement::IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
|
||||
int32_t* aTabIndex) {
|
||||
if (nsGenericHTMLFormElementWithState::IsHTMLFocusable(
|
||||
if (nsGenericHTMLFormControlElementWithState::IsHTMLFocusable(
|
||||
aWithMouse, aIsFocusable, aTabIndex)) {
|
||||
return true;
|
||||
}
|
||||
@@ -398,17 +398,17 @@ void HTMLTextAreaElement::MapAttributesIntoRule(
|
||||
}
|
||||
}
|
||||
|
||||
nsGenericHTMLFormElementWithState::MapDivAlignAttributeInto(aAttributes,
|
||||
aDecls);
|
||||
nsGenericHTMLFormElementWithState::MapCommonAttributesInto(aAttributes,
|
||||
aDecls);
|
||||
nsGenericHTMLFormControlElementWithState::MapDivAlignAttributeInto(
|
||||
aAttributes, aDecls);
|
||||
nsGenericHTMLFormControlElementWithState::MapCommonAttributesInto(aAttributes,
|
||||
aDecls);
|
||||
}
|
||||
|
||||
nsChangeHint HTMLTextAreaElement::GetAttributeChangeHint(
|
||||
const nsAtom* aAttribute, int32_t aModType) const {
|
||||
nsChangeHint retval =
|
||||
nsGenericHTMLFormElementWithState::GetAttributeChangeHint(aAttribute,
|
||||
aModType);
|
||||
nsGenericHTMLFormControlElementWithState::GetAttributeChangeHint(
|
||||
aAttribute, aModType);
|
||||
|
||||
const bool isAdditionOrRemoval =
|
||||
aModType == MutationEvent_Binding::ADDITION ||
|
||||
@@ -470,7 +470,7 @@ void HTMLTextAreaElement::GetEventTargetParent(EventChainPreVisitor& aVisitor) {
|
||||
aVisitor.mWantsPreHandleEvent = true;
|
||||
}
|
||||
|
||||
nsGenericHTMLFormElementWithState::GetEventTargetParent(aVisitor);
|
||||
nsGenericHTMLFormControlElementWithState::GetEventTargetParent(aVisitor);
|
||||
}
|
||||
|
||||
nsresult HTMLTextAreaElement::PreHandleEvent(EventChainVisitor& aVisitor) {
|
||||
@@ -478,7 +478,7 @@ nsresult HTMLTextAreaElement::PreHandleEvent(EventChainVisitor& aVisitor) {
|
||||
// Fire onchange (if necessary), before we do the blur, bug 370521.
|
||||
FireChangeEventIfNeeded();
|
||||
}
|
||||
return nsGenericHTMLFormElementWithState::PreHandleEvent(aVisitor);
|
||||
return nsGenericHTMLFormControlElementWithState::PreHandleEvent(aVisitor);
|
||||
}
|
||||
|
||||
void HTMLTextAreaElement::FireChangeEventIfNeeded() {
|
||||
@@ -756,7 +756,8 @@ bool HTMLTextAreaElement::RestoreState(PresState* aState) {
|
||||
}
|
||||
|
||||
EventStates HTMLTextAreaElement::IntrinsicState() const {
|
||||
EventStates state = nsGenericHTMLFormElementWithState::IntrinsicState();
|
||||
EventStates state =
|
||||
nsGenericHTMLFormControlElementWithState::IntrinsicState();
|
||||
|
||||
if (IsCandidateForConstraintValidation()) {
|
||||
if (IsValid()) {
|
||||
@@ -795,7 +796,7 @@ EventStates HTMLTextAreaElement::IntrinsicState() const {
|
||||
nsresult HTMLTextAreaElement::BindToTree(BindContext& aContext,
|
||||
nsINode& aParent) {
|
||||
nsresult rv =
|
||||
nsGenericHTMLFormElementWithState::BindToTree(aContext, aParent);
|
||||
nsGenericHTMLFormControlElementWithState::BindToTree(aContext, aParent);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// If there is a disabled fieldset in the parent chain, the element is now
|
||||
@@ -810,7 +811,7 @@ nsresult HTMLTextAreaElement::BindToTree(BindContext& aContext,
|
||||
}
|
||||
|
||||
void HTMLTextAreaElement::UnbindFromTree(bool aNullParent) {
|
||||
nsGenericHTMLFormElementWithState::UnbindFromTree(aNullParent);
|
||||
nsGenericHTMLFormControlElementWithState::UnbindFromTree(aNullParent);
|
||||
|
||||
// We might be no longer disabled because of parent chain changed.
|
||||
UpdateValueMissingValidityState();
|
||||
@@ -828,8 +829,8 @@ nsresult HTMLTextAreaElement::BeforeSetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
mDisabledChanged = true;
|
||||
}
|
||||
|
||||
return nsGenericHTMLFormElementWithState::BeforeSetAttr(aNameSpaceID, aName,
|
||||
aValue, aNotify);
|
||||
return nsGenericHTMLFormControlElementWithState::BeforeSetAttr(
|
||||
aNameSpaceID, aName, aValue, aNotify);
|
||||
}
|
||||
|
||||
void HTMLTextAreaElement::CharacterDataChanged(nsIContent* aContent,
|
||||
@@ -902,12 +903,12 @@ nsresult HTMLTextAreaElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
}
|
||||
}
|
||||
|
||||
return nsGenericHTMLFormElementWithState::AfterSetAttr(
|
||||
return nsGenericHTMLFormControlElementWithState::AfterSetAttr(
|
||||
aNameSpaceID, aName, aValue, aOldValue, aSubjectPrincipal, aNotify);
|
||||
}
|
||||
|
||||
nsresult HTMLTextAreaElement::CopyInnerTo(Element* aDest) {
|
||||
nsresult rv = nsGenericHTMLFormElementWithState::CopyInnerTo(aDest);
|
||||
nsresult rv = nsGenericHTMLFormControlElementWithState::CopyInnerTo(aDest);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (aDest->OwnerDoc()->IsStaticDocument()) {
|
||||
@@ -1121,7 +1122,7 @@ void HTMLTextAreaElement::FieldSetDisabledChanged(bool aNotify) {
|
||||
// This *has* to be called before UpdateBarredFromConstraintValidation and
|
||||
// UpdateValueMissingValidityState because these two functions depend on our
|
||||
// disabled state.
|
||||
nsGenericHTMLFormElementWithState::FieldSetDisabledChanged(aNotify);
|
||||
nsGenericHTMLFormControlElementWithState::FieldSetDisabledChanged(aNotify);
|
||||
|
||||
UpdateValueMissingValidityState();
|
||||
UpdateBarredFromConstraintValidation();
|
||||
|
||||
Reference in New Issue
Block a user