mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 63895 (Part 1) - Add helper methods for retrieving overflow areas in the frame's local coordinate space. r=dbaron
This commit is contained in:
parent
ca9066b91c
commit
627688c181
@ -5087,12 +5087,39 @@ nsIFrame::GetOverflowAreas() const
|
||||
nsRect(nsPoint(0, 0), GetSize()));
|
||||
}
|
||||
|
||||
nsOverflowAreas
|
||||
nsIFrame::GetOverflowAreasRelativeToSelf() const
|
||||
{
|
||||
if (IsTransformed()) {
|
||||
nsOverflowAreas* preTransformOverflows = static_cast<nsOverflowAreas*>
|
||||
(Properties().Get(PreTransformOverflowAreasProperty()));
|
||||
if (preTransformOverflows) {
|
||||
return nsOverflowAreas(preTransformOverflows->VisualOverflow(),
|
||||
preTransformOverflows->ScrollableOverflow());
|
||||
}
|
||||
}
|
||||
return nsOverflowAreas(GetVisualOverflowRect(),
|
||||
GetScrollableOverflowRect());
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsIFrame::GetScrollableOverflowRectRelativeToParent() const
|
||||
{
|
||||
return GetScrollableOverflowRect() + mRect.TopLeft();
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsIFrame::GetScrollableOverflowRectRelativeToSelf() const
|
||||
{
|
||||
if (IsTransformed()) {
|
||||
nsOverflowAreas* preTransformOverflows = static_cast<nsOverflowAreas*>
|
||||
(Properties().Get(PreTransformOverflowAreasProperty()));
|
||||
if (preTransformOverflows)
|
||||
return preTransformOverflows->ScrollableOverflow();
|
||||
}
|
||||
return GetScrollableOverflowRect();
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsIFrame::GetVisualOverflowRectRelativeToSelf() const
|
||||
{
|
||||
|
@ -2216,6 +2216,15 @@ public:
|
||||
|
||||
nsOverflowAreas GetOverflowAreas() const;
|
||||
|
||||
/**
|
||||
* Same as GetOverflowAreas, except in this frame's coordinate
|
||||
* system (before transforms are applied).
|
||||
*
|
||||
* @return the overflow areas relative to this frame, before any CSS transforms have
|
||||
* been applied, i.e. in this frame's coordinate system
|
||||
*/
|
||||
nsOverflowAreas GetOverflowAreasRelativeToSelf() const;
|
||||
|
||||
/**
|
||||
* Same as GetScrollableOverflowRect, except relative to the parent
|
||||
* frame.
|
||||
@ -2225,6 +2234,15 @@ public:
|
||||
*/
|
||||
nsRect GetScrollableOverflowRectRelativeToParent() const;
|
||||
|
||||
/**
|
||||
* Same as GetScrollableOverflowRect, except in this frame's coordinate
|
||||
* system (before transforms are applied).
|
||||
*
|
||||
* @return the rect relative to this frame, before any CSS transforms have
|
||||
* been applied, i.e. in this frame's coordinate system
|
||||
*/
|
||||
nsRect GetScrollableOverflowRectRelativeToSelf() const;
|
||||
|
||||
/**
|
||||
* Like GetVisualOverflowRect, except in this frame's
|
||||
* coordinate system (before transforms are applied).
|
||||
|
Loading…
Reference in New Issue
Block a user