diff options
author | Moonchild <moonchild@palemoon.org> | 2021-01-29 14:55:20 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-01-29 14:55:20 +0000 |
commit | 745254183c226e5db0caa566ad496d2f0192182e (patch) | |
tree | 467b282ce4e90dba6837dd9d631b6c9082463274 /dom/html/HTMLMenuItemElement.cpp | |
parent | c76214f0b54cf74b69d0fb4afa0d2eca2e898a98 (diff) | |
parent | e1daeef18312a0cb17eda6bed7f363d8748ed4a3 (diff) | |
download | UXP-745254183c226e5db0caa566ad496d2f0192182e.tar UXP-745254183c226e5db0caa566ad496d2f0192182e.tar.gz UXP-745254183c226e5db0caa566ad496d2f0192182e.tar.lz UXP-745254183c226e5db0caa566ad496d2f0192182e.tar.xz UXP-745254183c226e5db0caa566ad496d2f0192182e.zip |
Merge branch 'master' into release
Diffstat (limited to 'dom/html/HTMLMenuItemElement.cpp')
-rw-r--r-- | dom/html/HTMLMenuItemElement.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/dom/html/HTMLMenuItemElement.cpp b/dom/html/HTMLMenuItemElement.cpp index 5c5cf8d76..6cf4eb40c 100644 --- a/dom/html/HTMLMenuItemElement.cpp +++ b/dom/html/HTMLMenuItemElement.cpp @@ -7,12 +7,22 @@ #include "mozilla/BasicEvents.h" #include "mozilla/EventDispatcher.h" +#include "mozilla/Preferences.h" #include "mozilla/dom/HTMLMenuItemElementBinding.h" +#include "mozilla/dom/HTMLUnknownElement.h" #include "nsAttrValueInlines.h" #include "nsContentUtils.h" - -NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(MenuItem) +nsGenericHTMLElement* +NS_NewHTMLMenuItemElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo, + mozilla::dom::FromParser aFromParser) { + RefPtr<mozilla::dom::NodeInfo> nodeInfo(aNodeInfo); + if (mozilla::Preferences::GetBool("dom.menuitem.enabled")) { + return new mozilla::dom::HTMLMenuItemElement(nodeInfo.forget(), aFromParser); + } else { + return new mozilla::dom::HTMLUnknownElement(nodeInfo.forget()); + } +} namespace mozilla { namespace dom { |