diff options
author | Moonchild <moonchild@palemoon.org> | 2021-01-25 23:18:58 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-01-25 23:18:58 +0000 |
commit | 874330d4538bd4704730d57fa35fd678c7d6fbf2 (patch) | |
tree | 3b89c8f0a55a99a90aef812e73966a9e2ba6cbb9 /dom/html/HTMLMenuElement.cpp | |
parent | 1126548deecfd736755f1e1b7e7d551b42e73780 (diff) | |
download | UXP-874330d4538bd4704730d57fa35fd678c7d6fbf2.tar UXP-874330d4538bd4704730d57fa35fd678c7d6fbf2.tar.gz UXP-874330d4538bd4704730d57fa35fd678c7d6fbf2.tar.lz UXP-874330d4538bd4704730d57fa35fd678c7d6fbf2.tar.xz UXP-874330d4538bd4704730d57fa35fd678c7d6fbf2.zip |
Issue #1719 - Make <menuitem> pref-controlled and disable by default.
Resolves #1719
Diffstat (limited to 'dom/html/HTMLMenuElement.cpp')
-rw-r--r-- | dom/html/HTMLMenuElement.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dom/html/HTMLMenuElement.cpp b/dom/html/HTMLMenuElement.cpp index 6c096084a..a099a5289 100644 --- a/dom/html/HTMLMenuElement.cpp +++ b/dom/html/HTMLMenuElement.cpp @@ -137,9 +137,9 @@ HTMLMenuElement::ParseAttribute(int32_t aNamespaceID, const nsAString& aValue, nsAttrValue& aResult) { - if (aNamespaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::type) { - bool success = aResult.ParseEnumValue(aValue, kMenuTypeTable, - false); + if (aNamespaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::type && + Preferences::GetBool("dom.menuitem.enabled")) { + bool success = aResult.ParseEnumValue(aValue, kMenuTypeTable, false); if (success) { mType = aResult.GetEnumValue(); } else { |