mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 755971 - Add a nsGenericElement::GetPaddingRectSize to return the size of the padding rect. r=bz
This commit is contained in:
parent
0cf219076d
commit
af54e9aaa6
@ -2033,6 +2033,20 @@ nsGenericElement::GetOffsetRect(nsRect& aRect, nsIContent** aOffsetParent)
|
||||
aRect.height = nsPresContext::AppUnitsToIntCSSPixels(rcFrame.height);
|
||||
}
|
||||
|
||||
nsIntSize
|
||||
nsGenericElement::GetPaddingRectSize()
|
||||
{
|
||||
nsIFrame* frame = GetStyledFrame();
|
||||
if (!frame) {
|
||||
return nsIntSize(0, 0);
|
||||
}
|
||||
|
||||
NS_ASSERTION(frame->GetParent(), "Styled frame has no parent");
|
||||
nsRect rcFrame = nsLayoutUtils::GetAllInFlowPaddingRectsUnion(frame, frame->GetParent());
|
||||
return nsIntSize(nsPresContext::AppUnitsToIntCSSPixels(rcFrame.width),
|
||||
nsPresContext::AppUnitsToIntCSSPixels(rcFrame.height));
|
||||
}
|
||||
|
||||
nsIScrollableFrame*
|
||||
nsGenericElement::GetScrollFrame(nsIFrame **aStyledFrame)
|
||||
{
|
||||
|
@ -777,6 +777,13 @@ protected:
|
||||
*/
|
||||
virtual void GetOffsetRect(nsRect& aRect, nsIContent** aOffsetParent);
|
||||
|
||||
/**
|
||||
* Retrieve the size of the padding rect of this element.
|
||||
*
|
||||
* @param aSize the size of the padding rect
|
||||
*/
|
||||
nsIntSize GetPaddingRectSize();
|
||||
|
||||
nsIFrame* GetStyledFrame();
|
||||
|
||||
virtual mozilla::dom::Element* GetNameSpaceElement()
|
||||
|
Loading…
Reference in New Issue
Block a user