summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLDetailsElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html/HTMLDetailsElement.cpp')
-rw-r--r--dom/html/HTMLDetailsElement.cpp30
1 files changed, 1 insertions, 29 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()
{
}