Bug 1069015 - Restore code for :placeholder-shown pseudo-class. r=dbaron

This commit is contained in:
Thomas Wisniewski
2016-08-31 14:21:44 -04:00
parent 1aba2010b6
commit eb97b29c77
12 changed files with 106 additions and 1 deletions

View File

@@ -1208,6 +1208,11 @@ HTMLTextAreaElement::IntrinsicState() const
}
}
if (HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder) &&
IsValueEmpty()) {
state |= NS_EVENT_STATE_PLACEHOLDERSHOWN;
}
return state;
}
@@ -1617,7 +1622,8 @@ HTMLTextAreaElement::OnValueChanged(bool aNotify, bool aWasInteractiveUserChange
UpdateTooShortValidityState();
UpdateValueMissingValidityState();
if (validBefore != IsValid()) {
if (validBefore != IsValid() ||
HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder)) {
UpdateState(aNotify);
}
}