mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 35168 (Part 1) - Add GetNormalRect to nsIFrame. r=dbaron
This commit is contained in:
parent
9b86ba77e0
commit
7bc9523238
@ -5302,6 +5302,19 @@ nsIFrame::MovePositionBy(const nsPoint& aTranslation)
|
||||
SetPosition(position);
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsIFrame::GetNormalRect() const
|
||||
{
|
||||
// It might be faster to first check
|
||||
// StyleDisplay()->IsRelativelyPositionedStyle().
|
||||
nsPoint* normalPosition = static_cast<nsPoint*>
|
||||
(Properties().Get(NormalPositionProperty()));
|
||||
if (normalPosition) {
|
||||
return nsRect(*normalPosition, GetSize());
|
||||
}
|
||||
return GetRect();
|
||||
}
|
||||
|
||||
nsPoint
|
||||
nsIFrame::GetNormalPosition() const
|
||||
{
|
||||
|
@ -749,6 +749,11 @@ public:
|
||||
MovePositionBy(aTranslation.GetPhysicalPoint(aWritingMode, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return frame's rect without relative positioning
|
||||
*/
|
||||
nsRect GetNormalRect() const;
|
||||
|
||||
/**
|
||||
* Return frame's position without relative positioning
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user