mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-21 03:43:16 +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
|
|
@ -2832,6 +2832,16 @@ HTMLInputElement::SetUserInput(const nsAString& aValue)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLInputElement::SetAutofilled(bool aAutofilled)
|
||||
{
|
||||
if (aAutofilled) {
|
||||
AddStates(NS_EVENT_STATE_AUTOFILL);
|
||||
} else {
|
||||
RemoveStates(NS_EVENT_STATE_AUTOFILL);
|
||||
}
|
||||
}
|
||||
|
||||
nsIEditor*
|
||||
HTMLInputElement::GetEditor()
|
||||
{
|
||||
|
|
@ -8507,6 +8517,11 @@ HTMLInputElement::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);
|
||||
}
|
||||
|
||||
UpdateAllValidityStates(aNotify);
|
||||
|
||||
if (HasDirAuto()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue