mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Issue #1719 - Make <menuitem> pref-controlled and disable by default.
Resolves #1719
This commit is contained in:
parent
74680d59a1
commit
a828a5f321
12 changed files with 32 additions and 16 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue