зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1861539 - Use logical ReflowChild() and FinishReflowChild() to reflow table column group & table column. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D192041
This commit is contained in:
Родитель
5e8c456621
Коммит
84409099da
|
@ -338,22 +338,21 @@ void nsTableColGroupFrame::Reflow(nsPresContext* aPresContext,
|
|||
if (collapseGroup) {
|
||||
GetTableFrame()->SetNeedToCollapse(true);
|
||||
}
|
||||
// for every content child that (is a column thingy and does not already have
|
||||
// a frame) create a frame and adjust it's style
|
||||
|
||||
for (nsIFrame* kidFrame = mFrames.FirstChild(); kidFrame;
|
||||
kidFrame = kidFrame->GetNextSibling()) {
|
||||
const WritingMode wm = GetWritingMode();
|
||||
for (nsIFrame* kidFrame : mFrames) {
|
||||
// Give the child frame a chance to reflow, even though we know it'll have 0
|
||||
// size
|
||||
ReflowOutput kidSize(aReflowInput);
|
||||
ReflowInput kidReflowInput(aPresContext, aReflowInput, kidFrame,
|
||||
LogicalSize(kidFrame->GetWritingMode()));
|
||||
|
||||
const LogicalPoint dummyPos(wm);
|
||||
const nsSize dummyContainerSize;
|
||||
nsReflowStatus status;
|
||||
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowInput, 0, 0,
|
||||
ReflowChildFlags::Default, status);
|
||||
FinishReflowChild(kidFrame, aPresContext, kidSize, &kidReflowInput, 0, 0,
|
||||
ReflowChildFlags::Default);
|
||||
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowInput, wm, dummyPos,
|
||||
dummyContainerSize, ReflowChildFlags::Default, status);
|
||||
FinishReflowChild(kidFrame, aPresContext, kidSize, &kidReflowInput, wm,
|
||||
dummyPos, dummyContainerSize, ReflowChildFlags::Default);
|
||||
}
|
||||
|
||||
aDesiredSize.ClearSize();
|
||||
|
|
|
@ -3046,17 +3046,22 @@ void nsTableFrame::ReflowChildren(TableReflowInput& aReflowInput,
|
|||
|
||||
void nsTableFrame::ReflowColGroups(gfxContext* aRenderingContext) {
|
||||
if (!GetPrevInFlow() && !HaveReflowedColGroups()) {
|
||||
ReflowOutput kidMet(GetWritingMode());
|
||||
const WritingMode wm = GetWritingMode();
|
||||
nsPresContext* presContext = PresContext();
|
||||
for (nsIFrame* kidFrame : mColGroups) {
|
||||
if (kidFrame->IsSubtreeDirty()) {
|
||||
// The column groups don't care about dimensions or reflow inputs.
|
||||
ReflowOutput kidSize(wm);
|
||||
ReflowInput kidReflowInput(presContext, kidFrame, aRenderingContext,
|
||||
LogicalSize(kidFrame->GetWritingMode()));
|
||||
nsReflowStatus cgStatus;
|
||||
ReflowChild(kidFrame, presContext, kidMet, kidReflowInput, 0, 0,
|
||||
ReflowChildFlags::Default, cgStatus);
|
||||
FinishReflowChild(kidFrame, presContext, kidMet, &kidReflowInput, 0, 0,
|
||||
const LogicalPoint dummyPos(wm);
|
||||
const nsSize dummyContainerSize;
|
||||
ReflowChild(kidFrame, presContext, kidSize, kidReflowInput, wm,
|
||||
dummyPos, dummyContainerSize, ReflowChildFlags::Default,
|
||||
cgStatus);
|
||||
FinishReflowChild(kidFrame, presContext, kidSize, &kidReflowInput, wm,
|
||||
dummyPos, dummyContainerSize,
|
||||
ReflowChildFlags::Default);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче