summaryrefslogtreecommitdiffstats
path: root/layout/forms/nsImageControlFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/forms/nsImageControlFrame.cpp')
-rw-r--r--layout/forms/nsImageControlFrame.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/layout/forms/nsImageControlFrame.cpp b/layout/forms/nsImageControlFrame.cpp
index 8aef41538..212fa9356 100644
--- a/layout/forms/nsImageControlFrame.cpp
+++ b/layout/forms/nsImageControlFrame.cpp
@@ -150,9 +150,15 @@ nsImageControlFrame::HandleEvent(nsPresContext* aPresContext,
return NS_OK;
}
- if (IsContentDisabled()) {
+ // do we have user-input style?
+ const nsStyleUserInterface* uiStyle = StyleUserInterface();
+ if (uiStyle->mUserInput == StyleUserInput::None ||
+ uiStyle->mUserInput == StyleUserInput::Disabled) {
return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
}
+ if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled)) { // XXX cache disabled
+ return NS_OK;
+ }
*aEventStatus = nsEventStatus_eIgnore;