Bug 1089388 - Followup to add a LogicalPoint version of nsIFrame::MovePositionBy, and use this in SlideLine. r=smontagu

This commit is contained in:
Jonathan Kew 2014-11-13 08:58:03 +00:00
Родитель 150a68da5c
Коммит c8bcdce921
2 изменённых файлов: 12 добавлений и 4 удалений

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

@ -2745,12 +2745,11 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState,
}
WritingMode wm = GetWritingMode();
nsPoint physicalDelta =
LogicalPoint(wm, 0, aDeltaBCoord).GetPhysicalPoint(wm, 0);
LogicalPoint translation(wm, 0, aDeltaBCoord);
if (aLine->IsBlock()) {
if (aDeltaBCoord) {
kid->MovePositionBy(physicalDelta);
kid->MovePositionBy(wm, translation);
}
// Make sure the frame's view and any child views are updated
@ -2764,7 +2763,7 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState,
int32_t n = aLine->GetChildCount();
while (--n >= 0) {
if (aDeltaBCoord) {
kid->MovePositionBy(physicalDelta);
kid->MovePositionBy(wm, translation);
}
// Make sure the frame's view and any child views are updated
nsContainerFrame::PlaceFrameView(kid);

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

@ -744,6 +744,15 @@ public:
*/
void MovePositionBy(const nsPoint& aTranslation);
/**
* As above, using a logical-point delta in a given writing mode.
*/
void MovePositionBy(mozilla::WritingMode aWritingMode,
const mozilla::LogicalPoint& aTranslation)
{
MovePositionBy(aTranslation.GetPhysicalPoint(aWritingMode, 0));
}
/**
* Return frame's position without relative positioning
*/