Bug 1869722 Part 1 - Cleanup after fixing tables as flex items. r=dholbert

Flex containers do not need the `alignCB` tweak for table frames in
`ReflowInput::InitConstraints`, so I remove the comment, and improve it so that
we don't need to call `alignCB->GetParent()` multiple times.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D196257
This commit is contained in:
Ting-Yu Lin
2023-12-13 22:50:36 +00:00
parent 85b741ad7f
commit ddf5d31d31
4 changed files with 6 additions and 8 deletions

View File

@@ -2365,11 +2365,10 @@ void ReflowInput::InitConstraints(
}
nsIFrame* alignCB = mFrame->GetParent();
if (alignCB->IsTableWrapperFrame() && alignCB->GetParent()) {
// XXX grid-specific for now; maybe remove this check after we address
// bug 799725
if (alignCB->GetParent()->IsGridContainerFrame()) {
alignCB = alignCB->GetParent();
if (alignCB->IsTableWrapperFrame()) {
nsIFrame* alignCBParent = alignCB->GetParent();
if (alignCBParent && alignCBParent->IsGridContainerFrame()) {
alignCB = alignCBParent;
}
}
if (alignCB->IsGridContainerFrame()) {