mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 17:03:07 +09: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:
parent
be539ad8fc
commit
618fa768c8
15 changed files with 111 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue