mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Bug 1271549 - Remove details and summary preference.
Tag UXP Issue #1344
This commit is contained in:
parent
e8e20e994d
commit
a2e1955dc6
20 changed files with 21 additions and 121 deletions
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue