зеркало из https://github.com/mozilla/gecko-dev.git
Use logical coordinates in nsBlockFrame::ReflowBullet. Bug 789096, r=jfkthame
This commit is contained in:
Родитель
db9b36d32e
Коммит
8343f17838
|
@ -6855,25 +6855,23 @@ nsBlockFrame::ReflowBullet(nsIFrame* aBulletFrame,
|
||||||
// the edge of the floats is the content-edge of the block, and place
|
// the edge of the floats is the content-edge of the block, and place
|
||||||
// the bullet at a position offset from there by the block's padding,
|
// the bullet at a position offset from there by the block's padding,
|
||||||
// the block's border, and the bullet frame's margin.
|
// the block's border, and the bullet frame's margin.
|
||||||
nscoord x;
|
|
||||||
if (rs.mStyleVisibility->mDirection == NS_STYLE_DIRECTION_LTR) {
|
// IStart from floatAvailSpace gives us the content/float start edge
|
||||||
// The floatAvailSpace.x gives us the content/float edge. Then we
|
// in the current writing mode. Then we subtract out the start
|
||||||
// subtract out the left border/padding and the bullet's width and
|
// border/padding and the bullet's width and margin to offset the position.
|
||||||
// margin to offset the position.
|
WritingMode wm = rs.GetWritingMode();
|
||||||
x = floatAvailSpace.x - rs.ComputedPhysicalBorderPadding().left
|
LogicalRect logicalFAS(wm, floatAvailSpace, floatAvailSpace.XMost());
|
||||||
- reflowState.ComputedPhysicalMargin().right - aMetrics.Width();
|
nscoord iStart = logicalFAS.IStart(wm) -
|
||||||
} else {
|
rs.ComputedLogicalBorderPadding().IStart(wm)
|
||||||
// The XMost() of the available space give us offsets from the left
|
- reflowState.ComputedLogicalMargin().IEnd(wm) - aMetrics.ISize();
|
||||||
// border edge. Then we add the right border/padding and the
|
|
||||||
// bullet's margin to offset the position.
|
|
||||||
x = floatAvailSpace.XMost() + rs.ComputedPhysicalBorderPadding().right
|
|
||||||
+ reflowState.ComputedPhysicalMargin().left;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Approximate the bullets position; vertical alignment will provide
|
// Approximate the bullets position; vertical alignment will provide
|
||||||
// the final vertical location.
|
// the final vertical location.
|
||||||
nscoord y = aState.mContentArea.y;
|
nscoord bStart = logicalFAS.BStart(wm);
|
||||||
aBulletFrame->SetRect(nsRect(x, y, aMetrics.Width(), aMetrics.Height()));
|
aBulletFrame->SetRect(LogicalRect(wm, LogicalPoint(wm, iStart, bStart),
|
||||||
|
LogicalSize(wm, aMetrics.ISize(),
|
||||||
|
aMetrics.BSize())),
|
||||||
|
floatAvailSpace.XMost());
|
||||||
aBulletFrame->DidReflow(aState.mPresContext, &aState.mReflowState,
|
aBulletFrame->DidReflow(aState.mPresContext, &aState.mReflowState,
|
||||||
nsDidReflowStatus::FINISHED);
|
nsDidReflowStatus::FINISHED);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче