Walk up the content-parent so that style is applied appropriately for cursor selection

This commit is contained in:
kipp@netscape.com
1998-11-23 22:20:50 +00:00
parent 643de3c438
commit f859403773
2 changed files with 10 additions and 6 deletions

View File

@@ -1128,14 +1128,16 @@ void nsFrame::AdjustPointsInSameContent(nsIPresContext& aPresContext,
}
NS_IMETHODIMP
nsFrame::GetCursor(nsIPresContext& aPresContext, nsPoint& aPoint, PRInt32& aCursor)
nsFrame::GetCursor(nsIPresContext& aPresContext,
nsPoint& aPoint,
PRInt32& aCursor)
{
const nsStyleColor* styleColor;
GetStyleData(eStyleStruct_Color, (const nsStyleStruct*&)styleColor);
aCursor = styleColor->mCursor;
if (NS_STYLE_CURSOR_AUTO == aCursor && nsnull != mGeometricParent) {
mGeometricParent->GetCursor(aPresContext, aPoint, aCursor);
if ((NS_STYLE_CURSOR_AUTO == aCursor) && (nsnull != mContentParent)) {
mContentParent->GetCursor(aPresContext, aPoint, aCursor);
}
return NS_OK;