summaryrefslogtreecommitdiffstats
path: root/dom/html/nsGenericHTMLElement.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-01-28 23:03:48 +0000
committerGitHub <noreply@github.com>2020-01-28 23:03:48 +0000
commited88b99849156004c04e4a0c87ea9b2360ef19b6 (patch)
tree85910991cfd39dc19da5e6ed5526d1a6e6c5ff0a /dom/html/nsGenericHTMLElement.cpp
parentc4b0715baaffc541670fd1158557aa7e61e521d3 (diff)
parent7a697172f36656126d6e415d91b4e260229ee37f (diff)
downloadUXP-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.cpp21
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