Bug 1690163 - Account for pseudo TableColGroupFrame not being marked as anon wrapper boxes. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D103819
This commit is contained in:
Mats Palmgren
2021-02-04 01:10:29 +00:00
parent 15fb4f10e7
commit 52ebbc1158
3 changed files with 13 additions and 1 deletions

View File

@@ -9328,8 +9328,12 @@ inline void nsCSSFrameConstructor::ConstructFramesFromItemList(
// that information offhand in many cases.
MOZ_ASSERT(ParentIsWrapperAnonBox(aParentFrame) == aParentIsWrapperAnonBox);
// Note: we explicitly exclude TableColGroupFrame because it doesn't
// have the FCDATA_IS_WRAPPER_ANON_BOX on pseudos so aParentIsWrapperAnonBox
// is false for such pseudos (see sPseudoParentData below).
if (!aParentIsWrapperAnonBox && aState.mHasRenderedLegend &&
aParentFrame->GetContent()->IsHTMLElement(nsGkAtoms::fieldset)) {
aParentFrame->GetContent()->IsHTMLElement(nsGkAtoms::fieldset) &&
!aParentFrame->IsTableColGroupFrame()) {
DebugOnly<bool> found = false;
for (FCItemIterator iter(aItems); !iter.IsDone(); iter.Next()) {
if (iter.item().mIsRenderedLegend) {