Let style override the cursor choice when using an image map

git-svn-id: svn://10.0.0.236/trunk@15182 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1998-11-23 22:21:13 +00:00
parent bf83ca5a6e
commit 8c86fef2cd
2 changed files with 16 additions and 2 deletions

View File

@@ -917,7 +917,14 @@ nsImageFrame::GetCursor(nsIPresContext& aPresContext,
PRInt32 x = NSTwipsToIntPixels((pt.x - inner.x), t2p);
PRInt32 y = NSTwipsToIntPixels((pt.y - inner.y), t2p);
if (NS_OK == map->IsInside(x, y)) {
aCursor = NS_STYLE_CURSOR_POINTER;
// Use style defined cursor if one is provided, otherwise when
// the cursor style is "auto" we use the pointer cursor.
const nsStyleColor* styleColor;
GetStyleData(eStyleStruct_Color, (const nsStyleStruct*&)styleColor);
aCursor = styleColor->mCursor;
if (NS_STYLE_CURSOR_AUTO == aCursor) {
aCursor = NS_STYLE_CURSOR_POINTER;
}
}
NS_RELEASE(map);
return NS_OK;