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 | |
parent | ce285b6f2d48ce945b194fd7982cd6a5a306e939 (diff) | |
download | uxp-bc8543bf793b5c203600c57565214b5e20f54592.tar.gz |
Bug 1271549 - Remove details and summary preference.
Tag UXP Issue #1344
Diffstat (limited to 'dom')
-rw-r--r-- | dom/html/HTMLDetailsElement.cpp | 30 | ||||
-rw-r--r-- | dom/html/HTMLDetailsElement.h | 2 | ||||
-rw-r--r-- | dom/html/HTMLSummaryElement.cpp | 12 | ||||
-rw-r--r-- | dom/webidl/EventHandler.webidl | 1 | ||||
-rw-r--r-- | dom/webidl/HTMLDetailsElement.webidl | 1 |
5 files changed, 2 insertions, 44 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() { } diff --git a/dom/html/HTMLDetailsElement.h b/dom/html/HTMLDetailsElement.h index 5a3af27b4e..6adf567bf8 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 ee3c07b20b..42ead6b87f 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 { diff --git a/dom/webidl/EventHandler.webidl b/dom/webidl/EventHandler.webidl index b92e3a2bb0..484a8e95cd 100644 --- a/dom/webidl/EventHandler.webidl +++ b/dom/webidl/EventHandler.webidl @@ -94,7 +94,6 @@ interface GlobalEventHandlers { [Pref="dom.select_events.enabled"] attribute EventHandler onselectstart; - [Pref="dom.details_element.enabled"] attribute EventHandler ontoggle; // Pointer events handlers diff --git a/dom/webidl/HTMLDetailsElement.webidl b/dom/webidl/HTMLDetailsElement.webidl index 133ecf125b..104606eb13 100644 --- a/dom/webidl/HTMLDetailsElement.webidl +++ b/dom/webidl/HTMLDetailsElement.webidl @@ -11,7 +11,6 @@ * and create derivative works of this document. */ -[Pref="dom.details_element.enabled"] interface HTMLDetailsElement : HTMLElement { [SetterThrows] attribute boolean open; |