Backed out changeset 4c7dab5cb50c (bug 1864291) for causing multiple failures on test_input_color_picker_popup.html / forms/browser_selectpopup_invoke.js CLOSED TREE

This commit is contained in:
Sandor Molnar
2023-11-15 19:44:05 +02:00
parent 0fa17ecfc5
commit 0c4309d7be
9 changed files with 3 additions and 142 deletions

View File

@@ -5755,22 +5755,10 @@ void HTMLInputElement::ShowPicker(ErrorResult& aRv) {
//
// https://html.spec.whatwg.org/multipage/input.html#show-the-picker,-if-applicable
// To show the picker, if applicable for an input element element:
ShowThePickerIfApplicable();
}
void HTMLInputElement::ShowThePickerIfApplicable() {
// https://html.spec.whatwg.org/multipage/input.html#show-the-picker,-if-applicable
// To show the picker, if applicable for an input element element:
// Step 1. Assert: element's relevant global object has transient activation.
if (!OwnerDoc()->HasValidTransientUserGestureActivation()) {
return;
}
// Step 2. If element is not mutable, then return.
if (!IsMutable()) {
return;
}
// (See above.)
// Step 3. If element's type attribute is in the File Upload state, then run
// these steps in parallel:
@@ -7336,23 +7324,6 @@ void HTMLInputElement::MaybeFireInputPasswordRemoved() {
ChromeOnlyDispatch::eYes);
}
void HTMLInputElement::HandleInvokeInternal(nsAtom* aAction, ErrorResult& aRv) {
// If this's relevant settings object's origin is not same origin with
// this's relevant settings object's top-level origin, [...], then return.
nsPIDOMWindowInner* window = OwnerDoc()->GetInnerWindow();
WindowGlobalChild* windowGlobalChild =
window ? window->GetWindowGlobalChild() : nullptr;
if (!windowGlobalChild || !windowGlobalChild->SameOriginWithTop()) {
return;
}
// If action is an ASCII case-insensitive match for "showPicker"
// then show the picker, if applicable for this.
if (nsContentUtils::EqualsIgnoreASCIICase(aAction, nsGkAtoms::showPicker)) {
ShowThePickerIfApplicable();
}
}
} // namespace mozilla::dom
#undef NS_ORIGINAL_CHECKED_VALUE