зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1854424 - Add a LogicalMargin method returning an offset to start-sides. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D188847
This commit is contained in:
Родитель
b1c916c2f3
Коммит
0319ff2c6b
|
@ -135,9 +135,8 @@ void nsDateTimeControlFrame::Reflow(nsPresContext* aPresContext,
|
|||
LogicalMargin childMargin = childReflowInput.ComputedLogicalMargin(myWM);
|
||||
|
||||
// offsets of input area frame within this frame:
|
||||
LogicalPoint childOffset(
|
||||
myWM, borderPadding.IStart(myWM) + childMargin.IStart(myWM),
|
||||
borderPadding.BStart(myWM) + childMargin.BStart(myWM));
|
||||
LogicalPoint childOffset =
|
||||
borderPadding.StartOffset(myWM) + childMargin.StartOffset(myWM);
|
||||
|
||||
nsReflowStatus childStatus;
|
||||
// We initially reflow the child with a dummy containerSize; positioning
|
||||
|
|
|
@ -1341,6 +1341,15 @@ class LogicalMargin {
|
|||
return LogicalSize(aWritingMode, IStartEnd(), BStartEnd());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a LogicalPoint representing an offset to the start-sides, i.e.
|
||||
* inline-start and block-start.
|
||||
*/
|
||||
LogicalPoint StartOffset(WritingMode aWritingMode) const {
|
||||
CHECK_WRITING_MODE(aWritingMode);
|
||||
return LogicalPoint(aWritingMode, IStart(), BStart());
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessors for physical margins, using our writing mode to convert from
|
||||
* logical values.
|
||||
|
|
|
@ -840,11 +840,10 @@ void nsAbsoluteContainingBlock::ReflowAbsoluteFrame(
|
|||
}
|
||||
|
||||
LogicalRect rect(outerWM,
|
||||
border.IStart(outerWM) + offsets.IStart(outerWM) +
|
||||
margin.IStart(outerWM),
|
||||
border.BStart(outerWM) + offsets.BStart(outerWM) +
|
||||
margin.BStart(outerWM),
|
||||
kidSize.ISize(outerWM), kidSize.BSize(outerWM));
|
||||
border.StartOffset(outerWM) +
|
||||
offsets.StartOffset(outerWM) +
|
||||
margin.StartOffset(outerWM),
|
||||
kidSize);
|
||||
nsRect r = rect.GetPhysicalRect(
|
||||
outerWM, logicalCBSize.GetPhysicalSize(wm) +
|
||||
border.Size(outerWM).GetPhysicalSize(outerWM));
|
||||
|
|
|
@ -5400,8 +5400,8 @@ std::tuple<nscoord, bool> nsFlexContainerFrame::ReflowChildren(
|
|||
// flex container's content box (with respect to its border-box), so that
|
||||
// we can compute our flex item's final positions.
|
||||
WritingMode flexWM = aReflowInput.GetWritingMode();
|
||||
const LogicalPoint containerContentBoxOrigin(
|
||||
flexWM, aBorderPadding.IStart(flexWM), aBorderPadding.BStart(flexWM));
|
||||
const LogicalPoint containerContentBoxOrigin =
|
||||
aBorderPadding.StartOffset(flexWM);
|
||||
|
||||
// The block-end of children is relative to the flex container's border-box.
|
||||
nscoord maxBlockEndEdgeOfChildren = containerContentBoxOrigin.B(flexWM);
|
||||
|
|
Загрузка…
Ссылка в новой задаче