Backed out 2 changesets (bug 1431041) for failing dom/html/test/forms/test_input_number_placeholder_shown.html. on a CLOSED TREE
Backed out changeset 57641ee7058f (bug 1431041) Backed out changeset 7a4c3ab0ade8 (bug 1431041)
This commit is contained in:
@@ -6600,7 +6600,7 @@ HTMLInputElement::IntrinsicState() const
|
||||
|
||||
if (PlaceholderApplies() &&
|
||||
HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder) &&
|
||||
ShouldShowPlaceholder()) {
|
||||
IsValueEmpty()) {
|
||||
state |= NS_EVENT_STATE_PLACEHOLDERSHOWN;
|
||||
}
|
||||
|
||||
@@ -6611,24 +6611,6 @@ HTMLInputElement::IntrinsicState() const
|
||||
return state;
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLInputElement::ShouldShowPlaceholder() const
|
||||
{
|
||||
MOZ_ASSERT(PlaceholderApplies());
|
||||
|
||||
if (IsValueEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// For number controls, even though the (sanitized) value is empty, there may
|
||||
// be text in the anon text control.
|
||||
if (nsNumberControlFrame* frame = do_QueryFrame(GetPrimaryFrame())) {
|
||||
return frame->AnonTextControlIsEmpty();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLInputElement::AddStates(EventStates aStates)
|
||||
{
|
||||
@@ -7044,7 +7026,7 @@ HTMLInputElement::PlaceholderApplies() const
|
||||
return false;
|
||||
}
|
||||
|
||||
return IsSingleLineTextOrNumberControl(false);
|
||||
return IsSingleLineTextControl(false);
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user