diff options
author | Moonchild <moonchild@palemoon.org> | 2020-01-28 23:03:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 23:03:48 +0000 |
commit | ed88b99849156004c04e4a0c87ea9b2360ef19b6 (patch) | |
tree | 85910991cfd39dc19da5e6ed5526d1a6e6c5ff0a /dom/html/nsGenericHTMLElement.cpp | |
parent | c4b0715baaffc541670fd1158557aa7e61e521d3 (diff) | |
parent | 7a697172f36656126d6e415d91b4e260229ee37f (diff) | |
download | UXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.tar UXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.tar.gz UXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.tar.lz UXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.tar.xz UXP-ed88b99849156004c04e4a0c87ea9b2360ef19b6.zip |
Merge pull request #1357 from athenian200/form-disabled-issue
Forms: Click() isn't executing properly when elements are defined disabled
Diffstat (limited to 'dom/html/nsGenericHTMLElement.cpp')
-rw-r--r-- | dom/html/nsGenericHTMLElement.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/dom/html/nsGenericHTMLElement.cpp b/dom/html/nsGenericHTMLElement.cpp index cbf97f1ea..78e4d5b95 100644 --- a/dom/html/nsGenericHTMLElement.cpp +++ b/dom/html/nsGenericHTMLElement.cpp @@ -2109,14 +2109,6 @@ nsGenericHTMLFormElement::PreHandleEvent(EventChainPreVisitor& aVisitor) return nsGenericHTMLElement::PreHandleEvent(aVisitor); } -/* virtual */ -bool -nsGenericHTMLFormElement::IsDisabled() const -{ - return HasAttr(kNameSpaceID_None, nsGkAtoms::disabled) || - (mFieldSet && mFieldSet->IsDisabled()); -} - void nsGenericHTMLFormElement::ForgetFieldSet(nsIContent* aFieldset) { @@ -2308,14 +2300,13 @@ nsGenericHTMLFormElement::IsElementDisabledForEvents(EventMessage aMessage, break; } - bool disabled = IsDisabled(); - if (!disabled && aFrame) { - const nsStyleUserInterface* uiStyle = aFrame->StyleUserInterface(); - disabled = uiStyle->mUserInput == StyleUserInput::None || - uiStyle->mUserInput == StyleUserInput::Disabled; - + // FIXME(emilio): This poking at the style of the frame is slightly bogus + // unless we flush before every event, which we don't really want to do. + if (aFrame && + aFrame->StyleUserInterface()->mUserInput == StyleUserInput::None) { + return true; } - return disabled; + return IsDisabled(); } void |