diff options
author | athenian200 <athenian200@outlook.com> | 2020-05-20 23:25:37 -0500 |
---|---|---|
committer | athenian200 <athenian200@outlook.com> | 2020-05-20 23:25:37 -0500 |
commit | a965486fcbf3f199b5c7564bfc0526df72c862d5 (patch) | |
tree | b6238d784e74ab2912a35ab14caabe96734bd469 /dom/html/HTMLOptGroupElement.cpp | |
parent | 3da22ea943f6e7840558ddd1e4b473bef5837873 (diff) | |
download | UXP-a965486fcbf3f199b5c7564bfc0526df72c862d5.tar UXP-a965486fcbf3f199b5c7564bfc0526df72c862d5.tar.gz UXP-a965486fcbf3f199b5c7564bfc0526df72c862d5.tar.lz UXP-a965486fcbf3f199b5c7564bfc0526df72c862d5.tar.xz UXP-a965486fcbf3f199b5c7564bfc0526df72c862d5.zip |
Revert "Merge pull request #1357 from athenian200/form-disabled-issue"
This reverts commit ed88b99849156004c04e4a0c87ea9b2360ef19b6, reversing
changes made to c4b0715baaffc541670fd1158557aa7e61e521d3.
Diffstat (limited to 'dom/html/HTMLOptGroupElement.cpp')
-rw-r--r-- | dom/html/HTMLOptGroupElement.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/dom/html/HTMLOptGroupElement.cpp b/dom/html/HTMLOptGroupElement.cpp index 63af4e39f..7467c5da3 100644 --- a/dom/html/HTMLOptGroupElement.cpp +++ b/dom/html/HTMLOptGroupElement.cpp @@ -53,14 +53,15 @@ 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 (IsDisabled()) { + if (HasAttr(kNameSpaceID_None, nsGkAtoms::disabled)) { return NS_OK; } - 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) { + nsIFrame* frame = GetPrimaryFrame(); + if (frame) { + const nsStyleUserInterface* uiStyle = frame->StyleUserInterface(); + if (uiStyle->mUserInput == StyleUserInput::None || + uiStyle->mUserInput == StyleUserInput::Disabled) { return NS_OK; } } |