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:
@@ -925,16 +925,11 @@ nsListControlFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
if (nsEventStatus_eConsumeNoDefault == *aEventStatus)
|
||||
return NS_OK;
|
||||
|
||||
// do we have style that affects how we are selected?
|
||||
// do we have user-input style?
|
||||
const nsStyleUserInterface* uiStyle = StyleUserInterface();
|
||||
if (uiStyle->mUserInput == StyleUserInput::None ||
|
||||
uiStyle->mUserInput == StyleUserInput::Disabled) {
|
||||
// disabled state affects how we're selected, but we don't want to go through
|
||||
// nsHTMLScrollFrame if we're disabled.
|
||||
if (IsContentDisabled()) {
|
||||
return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
|
||||
}
|
||||
EventStates eventStates = mContent->AsElement()->State();
|
||||
if (eventStates.HasState(NS_EVENT_STATE_DISABLED))
|
||||
return NS_OK;
|
||||
|
||||
return nsHTMLScrollFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user