зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1079154 patch 2: add SetPosition with a LogicalPoint to nsIFrame, r=jfkthame
This commit is contained in:
Родитель
999a094a1f
Коммит
4aff46b627
|
@ -726,6 +726,15 @@ public:
|
|||
SetRect(nsRect(mRect.TopLeft(), aSize));
|
||||
}
|
||||
void SetPosition(const nsPoint& aPt) { mRect.MoveTo(aPt); }
|
||||
void SetPosition(mozilla::WritingMode aWritingMode,
|
||||
const mozilla::LogicalPoint& aPt,
|
||||
nscoord aContainerWidth) {
|
||||
// We subtract mRect.width from the container width to account for
|
||||
// the fact that logical origins in RTL coordinate systems are at
|
||||
// the top right of the frame instead of the top left.
|
||||
mRect.MoveTo(aPt.GetPhysicalPoint(aWritingMode,
|
||||
aContainerWidth - mRect.width));
|
||||
}
|
||||
|
||||
/**
|
||||
* Move the frame, accounting for relative positioning. Use this when
|
||||
|
|
Загрузка…
Ссылка в новой задаче