mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 14:54:25 +00:00
Issue #1757 - Reinstate "dom.details_element.enabled" preference
The removal of this preference was botched, all other surrounding plumbing changes appear to be working okay. The ability to use prefs to control this stylesheet might be useful in the future, so perhaps this is one of those "if it ain't broke, don't fix it" bugs where leaving well enough alone in the first place would have been the best choice.
This commit is contained in:
@@ -3580,6 +3580,10 @@ nsCSSFrameConstructor::FindHTMLData(Element* aElement,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (aTag == nsGkAtoms::details && !HTMLDetailsElement::IsDetailsEnabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static const FrameConstructionDataByTag sHTMLData[] = {
|
||||
SIMPLE_TAG_CHAIN(img, nsCSSFrameConstructor::FindImgData),
|
||||
SIMPLE_TAG_CHAIN(mozgeneratedcontentimage,
|
||||
@@ -5791,7 +5795,7 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
|
||||
// ::before and ::after); we always want to create "internal" anonymous
|
||||
// content.
|
||||
auto* details = HTMLDetailsElement::FromContentOrNull(parent);
|
||||
if (details && !details->Open() &&
|
||||
if (details && details->IsDetailsEnabled() && !details->Open() &&
|
||||
(!aContent->IsRootOfNativeAnonymousSubtree() ||
|
||||
aContent->IsGeneratedContentContainerForBefore() ||
|
||||
aContent->IsGeneratedContentContainerForAfter())) {
|
||||
@@ -5959,7 +5963,7 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
|
||||
}
|
||||
|
||||
FrameConstructionItem* item = nullptr;
|
||||
if (details && details->Open()) {
|
||||
if (details && details->IsDetailsEnabled() && details->Open()) {
|
||||
auto* summary = HTMLSummaryElement::FromContentOrNull(aContent);
|
||||
if (summary && summary->IsMainSummary()) {
|
||||
// If details is open, the main summary needs to be rendered as if it is
|
||||
|
||||
Reference in New Issue
Block a user