зеркало из https://github.com/mozilla/pjs.git
overflow area implementation for table frames (infrastructure), bug 173277 r=jkeiser sr=dbaron
This commit is contained in:
Родитель
69ee0bef07
Коммит
ef1b9d43d9
|
@ -97,6 +97,7 @@ struct NS_GFX nsRect {
|
|||
void MoveTo(nscoord aX, nscoord aY) {x = aX; y = aY;}
|
||||
void MoveTo(const nsPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
|
||||
void MoveBy(nscoord aDx, nscoord aDy) {x += aDx; y += aDy;}
|
||||
void MoveBy(const nsPoint& aPoint) {x += aPoint.x; y += aPoint.y;}
|
||||
void SizeTo(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}
|
||||
void SizeTo(const nsSize& aSize) {SizeTo(aSize.width, aSize.height);}
|
||||
void SizeBy(nscoord aDeltaWidth, nscoord aDeltaHeight) {width += aDeltaWidth;
|
||||
|
|
|
@ -4352,6 +4352,24 @@ nsFrame::StoreOverflow(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsFrame::ConsiderChildOverflow(nsIPresContext* aPresContext,
|
||||
nsRect& aOverflowArea,
|
||||
nsIFrame* aChildFrame)
|
||||
{
|
||||
if (GetStyleDisplay()->mOverflow != NS_STYLE_OVERFLOW_HIDDEN) {
|
||||
nsRect* overflowArea = aChildFrame->GetOverflowAreaProperty(aPresContext);
|
||||
if (overflowArea) {
|
||||
nsRect childOverflow(*overflowArea);
|
||||
childOverflow.MoveBy(aChildFrame->GetPosition());
|
||||
aOverflowArea.UnionRect(aOverflowArea, childOverflow);
|
||||
}
|
||||
else {
|
||||
aOverflowArea.UnionRect(aOverflowArea, aChildFrame->GetRect());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrame::GetParentStyleContextFrame(nsIPresContext* aPresContext,
|
||||
nsIFrame** aProviderFrame,
|
||||
|
|
|
@ -376,6 +376,12 @@ public:
|
|||
void StoreOverflow(nsIPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics);
|
||||
|
||||
// incorporate the child overflow area into the parent overflow area
|
||||
// if the child does not have a overflow use the child area
|
||||
void ConsiderChildOverflow(nsIPresContext* aPresContext,
|
||||
nsRect& aOverflowArea,
|
||||
nsIFrame* aChildFrame);
|
||||
|
||||
//Mouse Capturing code used by the frames to tell the view to capture all the following events
|
||||
NS_IMETHOD CaptureMouse(nsIPresContext* aPresContext, PRBool aGrabMouseEvents);
|
||||
PRBool IsMouseCaptured(nsIPresContext* aPresContext);
|
||||
|
|
|
@ -4352,6 +4352,24 @@ nsFrame::StoreOverflow(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsFrame::ConsiderChildOverflow(nsIPresContext* aPresContext,
|
||||
nsRect& aOverflowArea,
|
||||
nsIFrame* aChildFrame)
|
||||
{
|
||||
if (GetStyleDisplay()->mOverflow != NS_STYLE_OVERFLOW_HIDDEN) {
|
||||
nsRect* overflowArea = aChildFrame->GetOverflowAreaProperty(aPresContext);
|
||||
if (overflowArea) {
|
||||
nsRect childOverflow(*overflowArea);
|
||||
childOverflow.MoveBy(aChildFrame->GetPosition());
|
||||
aOverflowArea.UnionRect(aOverflowArea, childOverflow);
|
||||
}
|
||||
else {
|
||||
aOverflowArea.UnionRect(aOverflowArea, aChildFrame->GetRect());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrame::GetParentStyleContextFrame(nsIPresContext* aPresContext,
|
||||
nsIFrame** aProviderFrame,
|
||||
|
|
|
@ -376,6 +376,12 @@ public:
|
|||
void StoreOverflow(nsIPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics);
|
||||
|
||||
// incorporate the child overflow area into the parent overflow area
|
||||
// if the child does not have a overflow use the child area
|
||||
void ConsiderChildOverflow(nsIPresContext* aPresContext,
|
||||
nsRect& aOverflowArea,
|
||||
nsIFrame* aChildFrame);
|
||||
|
||||
//Mouse Capturing code used by the frames to tell the view to capture all the following events
|
||||
NS_IMETHOD CaptureMouse(nsIPresContext* aPresContext, PRBool aGrabMouseEvents);
|
||||
PRBool IsMouseCaptured(nsIPresContext* aPresContext);
|
||||
|
|
Загрузка…
Ссылка в новой задаче