зеркало из https://github.com/mozilla/pjs.git
Modify cursor setting code to check css cursor setting for containers.
This commit is contained in:
Родитель
3f513d4bc8
Коммит
ddbcabb89b
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче