Bug 1304441 Part 1 - Remove unneeded check when constructing frame for summary.
SummaryFrame had been removed in
bug 1258657, so now HTMLSummaryElement
is always rendered as an ordinary inline or block frame. Therefore, the
check in FindHTMLData is not needed anymore.
MozReview-Commit-ID: Ikxla6QoNLT
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -3556,26 +3556,17 @@ nsCSSFrameConstructor::FindHTMLData(Elem
// <legend> is only special inside fieldset, we only check the frame tree
// parent because the content tree parent may not be a <fieldset> due to
// display:contents, Shadow DOM, or XBL. For floated or absolutely
// positioned legends we want to construct by display type and
// not do special legend stuff.
return nullptr;
}
- if (aTag == nsGkAtoms::details || aTag == nsGkAtoms::summary) {
- if (!HTMLDetailsElement::IsDetailsEnabled()) {
- return nullptr;
- }
- }
-
- if (aTag == nsGkAtoms::summary &&
- (!aParentFrame || aParentFrame->GetType() != nsGkAtoms::detailsFrame)) {
- // <summary> is special only if it is a direct child of <details>. If it
- // isn't, construct it as a normal block frame instead of a summary frame.
+ if (aTag == nsGkAtoms::details && !HTMLDetailsElement::IsDetailsEnabled()) {
return nullptr;
}
static const FrameConstructionDataByTag sHTMLData[] = {
SIMPLE_TAG_CHAIN(img, nsCSSFrameConstructor::FindImgData),
SIMPLE_TAG_CHAIN(mozgeneratedcontentimage,
nsCSSFrameConstructor::FindImgData),
{ &nsGkAtoms::br,