mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 20:22:00 +00:00
bug 280889 prevent use of uninitialized 'cursor', r/sr=bzbarsky
This commit is contained in:
parent
dcdd036dc0
commit
d3bc41de0a
@ -2312,7 +2312,7 @@ nsEventStateManager::UpdateCursor(nsPresContext* aPresContext,
|
||||
nsEvent* aEvent, nsIFrame* aTargetFrame,
|
||||
nsEventStatus* aStatus)
|
||||
{
|
||||
PRInt32 cursor;
|
||||
PRInt32 cursor = NS_STYLE_CURSOR_DEFAULT;
|
||||
imgIContainer* container = nsnull;
|
||||
|
||||
//If cursor is locked just use the locked one
|
||||
@ -2326,12 +2326,8 @@ nsEventStateManager::UpdateCursor(nsPresContext* aPresContext,
|
||||
targetContent = mCurrentTarget->GetContent();
|
||||
}
|
||||
|
||||
//Check if the current target is disabled. If so use the default pointer.
|
||||
if (targetContent && CheckDisabled(targetContent)) {
|
||||
cursor = NS_STYLE_CURSOR_DEFAULT;
|
||||
}
|
||||
//If not disabled, check for the right cursor.
|
||||
else {
|
||||
if (!targetContent || !CheckDisabled(targetContent)) {
|
||||
if (aTargetFrame) {
|
||||
nsIFrame::Cursor framecursor;
|
||||
if (NS_FAILED(aTargetFrame->GetCursor(aEvent->point, framecursor)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user