summaryrefslogtreecommitdiffstats
path: root/dom/html
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-07 20:27:27 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:08 -0500
commitbc8543bf793b5c203600c57565214b5e20f54592 (patch)
treeba44f39310bb1eb1304a36ab60a82bc031306b78 /dom/html
parentce285b6f2d48ce945b194fd7982cd6a5a306e939 (diff)
downloadUXP-bc8543bf793b5c203600c57565214b5e20f54592.tar
UXP-bc8543bf793b5c203600c57565214b5e20f54592.tar.gz
UXP-bc8543bf793b5c203600c57565214b5e20f54592.tar.lz
UXP-bc8543bf793b5c203600c57565214b5e20f54592.tar.xz
UXP-bc8543bf793b5c203600c57565214b5e20f54592.zip
Bug 1271549 - Remove details and summary preference.
Tag UXP Issue #1344
Diffstat (limited to 'dom/html')
-rw-r--r--dom/html/HTMLDetailsElement.cpp30
-rw-r--r--dom/html/HTMLDetailsElement.h2
-rw-r--r--dom/html/HTMLSummaryElement.cpp12
3 files changed, 2 insertions, 42 deletions
diff --git a/dom/html/HTMLDetailsElement.cpp b/dom/html/HTMLDetailsElement.cpp
index ed20b50ca..8619b1450 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()
{
}
diff --git a/dom/html/HTMLDetailsElement.h b/dom/html/HTMLDetailsElement.h
index 5a3af27b4..6adf567bf 100644
--- a/dom/html/HTMLDetailsElement.h
+++ b/dom/html/HTMLDetailsElement.h
@@ -23,8 +23,6 @@ class HTMLDetailsElement final : public nsGenericHTMLElement
public:
using NodeInfo = mozilla::dom::NodeInfo;
- static bool IsDetailsEnabled();
-
explicit HTMLDetailsElement(already_AddRefed<NodeInfo>& aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
diff --git a/dom/html/HTMLSummaryElement.cpp b/dom/html/HTMLSummaryElement.cpp
index ee3c07b20..42ead6b87 100644
--- a/dom/html/HTMLSummaryElement.cpp
+++ b/dom/html/HTMLSummaryElement.cpp
@@ -14,17 +14,7 @@
#include "mozilla/TextEvents.h"
#include "nsFocusManager.h"
-// Expand NS_IMPL_NS_NEW_HTML_ELEMENT(Summary) to add pref check.
-nsGenericHTMLElement*
-NS_NewHTMLSummaryElement(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::HTMLSummaryElement(aNodeInfo);
-}
+NS_IMPL_NS_NEW_HTML_ELEMENT(Summary)
namespace mozilla {
namespace dom {