Modify cursor setting code to check css cursor setting for containers.

git-svn-id: svn://10.0.0.236/trunk@14636 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joki%netscape.com 1998-11-13 23:58:52 +00:00
parent 44efd97f78
commit 0d29052c82
2 changed files with 16 additions and 16 deletions

View File

@ -132,6 +132,14 @@ nsHTMLContainerFrame::GetCursorAndContentAt(nsIPresContext& aPresContext,
mStyleContext->GetStyleData(eStyleStruct_Color);
PRInt32 myCursor = styleColor->mCursor;
if (NS_STYLE_CURSOR_INHERIT != myCursor) {
// If this container has a particular cursor, use it, otherwise
// let the child decide.
*aFrame = this;
aCursor = myCursor;
return NS_OK;
}
// Get child's cursor, if any
nsContainerFrame::GetCursorAndContentAt(aPresContext, aPoint, aFrame, aContent, aCursor);
if (aCursor != NS_STYLE_CURSOR_INHERIT) {
@ -150,14 +158,6 @@ nsHTMLContainerFrame::GetCursorAndContentAt(nsIPresContext& aPresContext,
return NS_OK;
}
if (NS_STYLE_CURSOR_INHERIT != myCursor) {
// If this container has a particular cursor, use it, otherwise
// let the child decide.
*aFrame = this;
aCursor = myCursor;
return NS_OK;
}
// No specific cursor for us
aCursor = NS_STYLE_CURSOR_INHERIT;
return NS_OK;

View File

@ -132,6 +132,14 @@ nsHTMLContainerFrame::GetCursorAndContentAt(nsIPresContext& aPresContext,
mStyleContext->GetStyleData(eStyleStruct_Color);
PRInt32 myCursor = styleColor->mCursor;
if (NS_STYLE_CURSOR_INHERIT != myCursor) {
// If this container has a particular cursor, use it, otherwise
// let the child decide.
*aFrame = this;
aCursor = myCursor;
return NS_OK;
}
// Get child's cursor, if any
nsContainerFrame::GetCursorAndContentAt(aPresContext, aPoint, aFrame, aContent, aCursor);
if (aCursor != NS_STYLE_CURSOR_INHERIT) {
@ -150,14 +158,6 @@ nsHTMLContainerFrame::GetCursorAndContentAt(nsIPresContext& aPresContext,
return NS_OK;
}
if (NS_STYLE_CURSOR_INHERIT != myCursor) {
// If this container has a particular cursor, use it, otherwise
// let the child decide.
*aFrame = this;
aCursor = myCursor;
return NS_OK;
}
// No specific cursor for us
aCursor = NS_STYLE_CURSOR_INHERIT;
return NS_OK;