Bug 1405087: Don't use -moz-user-input: disabled to decide event handling stuff. r=smaug

We only set it on disabled form controls anyway, so use the content state
directly.

MozReview-Commit-ID: 7jJ75dvszyC
This commit is contained in:
Emilio Cobos Álvarez
2018-02-10 19:34:10 +01:00
parent 28c2666aa0
commit d6211e6535
10 changed files with 40 additions and 44 deletions

View File

@@ -185,10 +185,8 @@ nsCheckboxRadioFrame::HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
// Check for user-input:none style
const nsStyleUserInterface* uiStyle = StyleUserInterface();
if (uiStyle->mUserInput == StyleUserInput::None ||
uiStyle->mUserInput == StyleUserInput::Disabled) {
// Check for disabled content so that selection works properly (?).
if (IsContentDisabled()) {
return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
}
return NS_OK;