diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-01-07 20:27:27 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-01-26 15:50:08 -0500 |
commit | bc8543bf793b5c203600c57565214b5e20f54592 (patch) | |
tree | ba44f39310bb1eb1304a36ab60a82bc031306b78 /dom/html/HTMLDetailsElement.cpp | |
parent | ce285b6f2d48ce945b194fd7982cd6a5a306e939 (diff) | |
download | uxp-bc8543bf793b5c203600c57565214b5e20f54592.tar.gz |
Bug 1271549 - Remove details and summary preference.
Tag UXP Issue #1344
Diffstat (limited to 'dom/html/HTMLDetailsElement.cpp')
-rw-r--r-- | dom/html/HTMLDetailsElement.cpp | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/dom/html/HTMLDetailsElement.cpp b/dom/html/HTMLDetailsElement.cpp index ed20b50caa..8619b14508 100644 --- a/dom/html/HTMLDetailsElement.cpp +++ b/dom/html/HTMLDetailsElement.cpp @@ -6,39 +6,11 @@ #include "mozilla/dom/HTMLDetailsElement.h" #include "mozilla/dom/HTMLDetailsElementBinding.h" -#include "mozilla/dom/HTMLUnknownElement.h" -#include "mozilla/Preferences.h" - -// Expand NS_IMPL_NS_NEW_HTML_ELEMENT(Details) to add pref check. -nsGenericHTMLElement* -NS_NewHTMLDetailsElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo, - mozilla::dom::FromParser aFromParser) -{ - if (!mozilla::dom::HTMLDetailsElement::IsDetailsEnabled()) { - return new mozilla::dom::HTMLUnknownElement(aNodeInfo); - } - - return new mozilla::dom::HTMLDetailsElement(aNodeInfo); -} +NS_IMPL_NS_NEW_HTML_ELEMENT(Details) namespace mozilla { namespace dom { -/* static */ bool -HTMLDetailsElement::IsDetailsEnabled() -{ - static bool isDetailsEnabled = false; - static bool added = false; - - if (!added) { - Preferences::AddBoolVarCache(&isDetailsEnabled, - "dom.details_element.enabled"); - added = true; - } - - return isDetailsEnabled; -} - HTMLDetailsElement::~HTMLDetailsElement() { } |