Bug 1743890 Part 1 - Add more log to flex container. r=dholbert

MoveFlexItemToFinalPosition() already has a log printing flex item's position.
This patch adds a log in ReflowFlexItem() to print flex item's position, too.

Differential Revision: https://phabricator.services.mozilla.com/D165191
This commit is contained in:
Ting-Yu Lin 2023-03-31 16:25:30 +00:00
Родитель f2db4726e9
Коммит fafca7f824
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -5471,20 +5471,22 @@ nsReflowStatus nsFlexContainerFrame::ReflowFlexItem(
// Override flex item's main size.
if (aItem.IsInlineAxisMainAxis()) {
sizeOverrides.mStyleISize.emplace(aItem.StyleMainSize());
FLEX_LOGV(" Main size (inline-size) override: %d", aItem.MainSize());
} else {
sizeOverrides.mStyleBSize.emplace(aItem.StyleMainSize());
FLEX_LOGV(" Main size (block-size) override: %d", aItem.MainSize());
}
FLEX_LOGV(" Main size override: %d", aItem.MainSize());
// Override flex item's cross size if it was stretched in the cross axis (in
// which case we're imposing a cross size).
if (aItem.IsStretched()) {
if (aItem.IsInlineAxisCrossAxis()) {
sizeOverrides.mStyleISize.emplace(aItem.StyleCrossSize());
FLEX_LOGV(" Cross size (inline-size) override: %d", aItem.CrossSize());
} else {
sizeOverrides.mStyleBSize.emplace(aItem.StyleCrossSize());
FLEX_LOGV(" Cross size (block-size) override: %d", aItem.CrossSize());
}
FLEX_LOGV(" Cross size override: %d", aItem.CrossSize());
}
if (sizeOverrides.mStyleBSize) {
// We are overriding the block-size. For robustness, we always assume that
@ -5519,6 +5521,9 @@ nsReflowStatus nsFlexContainerFrame::ReflowFlexItem(
// after this point, because some of its methods (e.g. SetComputedWidth)
// internally call InitResizeFlags and stomp on mVResize & mHResize.
FLEX_LOG("Reflowing flex item %p at its desired position %s", aItem.Frame(),
ToString(aFramePos).c_str());
// CachedFlexItemData is stored in item's writing mode, so we pass
// aChildReflowInput into ReflowOutput's constructor.
ReflowOutput childReflowOutput(childReflowInput);