mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 260272 - Remove obsolete code from nsGlobalChromeWindow::SetCursor. r=dbaron,mats
This commit is contained in:
parent
c7fcae548f
commit
3e73901b83
@ -11522,26 +11522,13 @@ nsGlobalChromeWindow::SetCursor(const nsAString& aCursor)
|
|||||||
nsresult rv = NS_OK;
|
nsresult rv = NS_OK;
|
||||||
int32_t cursor;
|
int32_t cursor;
|
||||||
|
|
||||||
// use C strings to keep the code/data size down
|
if (aCursor.EqualsLiteral("auto"))
|
||||||
NS_ConvertUTF16toUTF8 cursorString(aCursor);
|
|
||||||
|
|
||||||
if (cursorString.Equals("auto"))
|
|
||||||
cursor = NS_STYLE_CURSOR_AUTO;
|
cursor = NS_STYLE_CURSOR_AUTO;
|
||||||
else {
|
else {
|
||||||
nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(aCursor);
|
nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(aCursor);
|
||||||
if (eCSSKeyword_UNKNOWN == keyword ||
|
if (eCSSKeyword_UNKNOWN == keyword ||
|
||||||
!nsCSSProps::FindKeyword(keyword, nsCSSProps::kCursorKTable, cursor)) {
|
!nsCSSProps::FindKeyword(keyword, nsCSSProps::kCursorKTable, cursor)) {
|
||||||
// XXX remove the following three values (leave return NS_OK) after 1.8
|
return NS_OK;
|
||||||
// XXX since they should have been -moz- prefixed (covered by FindKeyword).
|
|
||||||
// XXX (also remove |cursorString| at that point?).
|
|
||||||
if (cursorString.Equals("grab"))
|
|
||||||
cursor = NS_STYLE_CURSOR_GRAB;
|
|
||||||
else if (cursorString.Equals("grabbing"))
|
|
||||||
cursor = NS_STYLE_CURSOR_GRABBING;
|
|
||||||
else if (cursorString.Equals("spinning"))
|
|
||||||
cursor = NS_STYLE_CURSOR_SPINNING;
|
|
||||||
else
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user