mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #2790 - Part 1: Add: event state, pseudo-class mapping, SetAutofilled methods
This commit is contained in:
parent
2855cd6ded
commit
13d1054046
9 changed files with 73 additions and 0 deletions
|
|
@ -366,6 +366,16 @@ HTMLTextAreaElement::SetUserInput(const nsAString& aValue)
|
|||
return SetValueInternal(aValue, nsTextEditorState::eSetValue_BySetUserInput);
|
||||
}
|
||||
|
||||
void
|
||||
HTMLTextAreaElement::SetAutofilled(bool aAutofilled)
|
||||
{
|
||||
if (aAutofilled) {
|
||||
AddStates(NS_EVENT_STATE_AUTOFILL);
|
||||
} else {
|
||||
RemoveStates(NS_EVENT_STATE_AUTOFILL);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTextAreaElement::SetValueChanged(bool aValueChanged)
|
||||
{
|
||||
|
|
@ -1633,6 +1643,11 @@ HTMLTextAreaElement::OnValueChanged(bool aNotify, bool aWasInteractiveUserChange
|
|||
{
|
||||
mLastValueChangeWasInteractive = aWasInteractiveUserChange;
|
||||
|
||||
// Clear autofilled state if this was an interactive user change
|
||||
if (aWasInteractiveUserChange && State().HasState(NS_EVENT_STATE_AUTOFILL)) {
|
||||
RemoveStates(NS_EVENT_STATE_AUTOFILL);
|
||||
}
|
||||
|
||||
// Update the validity state
|
||||
bool validBefore = IsValid();
|
||||
UpdateTooLongValidityState();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue