зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 241b4b54e654 (bug 1824374) for causing failures at popover-invoking-attribute.html.
This commit is contained in:
Родитель
2a95baf7c9
Коммит
fdef98b00c
|
@ -3202,11 +3202,12 @@ Element* nsINode::GetNearestInclusiveTargetPopoverForInvoker() const {
|
|||
nsGenericHTMLElement* nsINode::GetEffectivePopoverTargetElement() const {
|
||||
const auto* formControl =
|
||||
nsGenericHTMLFormControlElementWithState::FromNode(this);
|
||||
if (!formControl || formControl->IsDisabled() ||
|
||||
!formControl->IsButtonControl()) {
|
||||
if (!formControl || !formControl->IsConceptButton() ||
|
||||
formControl->IsDisabled() ||
|
||||
(formControl->GetForm() && formControl->IsSubmitControl())) {
|
||||
return nullptr;
|
||||
}
|
||||
if (auto* popover = nsGenericHTMLElement::FromNodeOrNull(
|
||||
if (auto* popover = nsGenericHTMLElement::FromNode(
|
||||
formControl->GetPopoverTargetElement())) {
|
||||
if (popover->GetPopoverState() != PopoverState::None) {
|
||||
return popover;
|
||||
|
|
|
@ -253,7 +253,6 @@ nsresult HTMLButtonElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
|
|||
// NS_FORM_BUTTON_BUTTON do nothing.
|
||||
return rv;
|
||||
}
|
||||
HandlePopoverTargetAction();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4083,10 +4083,7 @@ nsresult HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
|
|||
default:
|
||||
break;
|
||||
} // switch
|
||||
if (IsButtonControl()) {
|
||||
HandlePopoverTargetAction();
|
||||
}
|
||||
} // click or outer activate event
|
||||
} // click or outer activate event
|
||||
} else if ((aVisitor.mItemFlags & NS_IN_SUBMIT_CLICK) &&
|
||||
(oldType == FormControlType::InputSubmit ||
|
||||
oldType == FormControlType::InputImage)) {
|
||||
|
|
|
@ -181,12 +181,6 @@ class nsIFormControl : public nsISupports {
|
|||
*/
|
||||
inline bool IsConceptButton() const;
|
||||
|
||||
/**
|
||||
* Returns whether this is an ordinal button or a concept button that has no
|
||||
* form associated.
|
||||
*/
|
||||
inline bool IsButtonControl() const;
|
||||
|
||||
/**
|
||||
* Returns whether this form control can have draggable children.
|
||||
* @return whether this form control can have draggable children.
|
||||
|
@ -273,10 +267,6 @@ bool nsIFormControl::IsConceptButton() const {
|
|||
return IsSubmitControl() || IsButtonElement(ControlType());
|
||||
}
|
||||
|
||||
bool nsIFormControl::IsButtonControl() const {
|
||||
return IsConceptButton() && (!GetForm() || !IsSubmitControl());
|
||||
}
|
||||
|
||||
bool nsIFormControl::AllowDraggableChildren() const {
|
||||
auto type = ControlType();
|
||||
return type == FormControlType::Object || type == FormControlType::Fieldset ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче