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:
@@ -46,15 +46,14 @@ HTMLOptGroupElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
|
||||
aVisitor.mCanHandle = false;
|
||||
// Do not process any DOM events if the element is disabled
|
||||
// XXXsmaug This is not the right thing to do. But what is?
|
||||
if (HasAttr(kNameSpaceID_None, nsGkAtoms::disabled)) {
|
||||
if (IsDisabled()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIFrame* frame = GetPrimaryFrame();
|
||||
if (frame) {
|
||||
const nsStyleUserInterface* uiStyle = frame->StyleUserInterface();
|
||||
if (uiStyle->mUserInput == StyleUserInput::None ||
|
||||
uiStyle->mUserInput == StyleUserInput::Disabled) {
|
||||
if (nsIFrame* frame = GetPrimaryFrame()) {
|
||||
// FIXME(emilio): This poking at the style of the frame is broken unless we
|
||||
// flush before every event handling, which we don't really want to.
|
||||
if (frame->StyleUserInterface()->mUserInput == StyleUserInput::None) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user