зеркало из https://github.com/mozilla/pjs.git
back out tooltip change for bug 181961 for 1.3b as it is reported to be somehow resulting in a crash on osx for bug 184363, r+sr=jag, a=dbaron
This commit is contained in:
Родитель
04ad29e519
Коммит
08c16b9202
|
@ -62,17 +62,11 @@
|
|||
//// nsISupports
|
||||
|
||||
nsXULTooltipListener::nsXULTooltipListener()
|
||||
: mRootBox(nsnull)
|
||||
, mSourceNode(nsnull)
|
||||
, mTargetNode(nsnull)
|
||||
, mCurrentTooltip(nsnull)
|
||||
, mTooltipTimer(nsnull)
|
||||
, mMouseClientX(0)
|
||||
, mMouseClientY(0)
|
||||
, mAutoHideTimer(nsnull)
|
||||
, mIsSourceTree(PR_FALSE)
|
||||
, mNeedTitletip(PR_FALSE)
|
||||
, mLastTreeRow(-1)
|
||||
: mSourceNode(nsnull), mTargetNode(nsnull),
|
||||
mCurrentTooltip(nsnull),
|
||||
mMouseClientX(0), mMouseClientY(0),
|
||||
mIsSourceTree(PR_FALSE), mNeedTitletip(PR_FALSE),
|
||||
mLastTreeRow(-1)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -119,6 +113,7 @@ nsXULTooltipListener::MouseOut(nsIDOMEvent* aMouseEvent)
|
|||
// show the tooltip if we move the mouse out of the window
|
||||
if (mTooltipTimer && !mCurrentTooltip) {
|
||||
mTooltipTimer->Cancel();
|
||||
mTooltipTimer = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -192,8 +187,7 @@ nsXULTooltipListener::MouseMove(nsIDOMEvent* aMouseEvent)
|
|||
// go away only if it times out or leaves the target node. If nothing is
|
||||
// showing, though, we have to do the work.
|
||||
if (!mCurrentTooltip) {
|
||||
if (!mTooltipTimer) // re-use, if available
|
||||
mTooltipTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
mTooltipTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
if (mTooltipTimer) {
|
||||
nsCOMPtr<nsIDOMEventTarget> eventTarget;
|
||||
aMouseEvent->GetTarget(getter_AddRefs(eventTarget));
|
||||
|
@ -651,6 +645,7 @@ nsXULTooltipListener::DestroyTooltip()
|
|||
KillTooltipTimer();
|
||||
if (mAutoHideTimer) {
|
||||
mAutoHideTimer->Cancel();
|
||||
mAutoHideTimer = nsnull;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -661,6 +656,7 @@ nsXULTooltipListener::KillTooltipTimer()
|
|||
{
|
||||
if (mTooltipTimer) {
|
||||
mTooltipTimer->Cancel();
|
||||
mTooltipTimer = nsnull;
|
||||
mTargetNode = nsnull;
|
||||
}
|
||||
}
|
||||
|
@ -670,13 +666,12 @@ nsXULTooltipListener::CreateAutoHideTimer()
|
|||
{
|
||||
if (mAutoHideTimer) {
|
||||
mAutoHideTimer->Cancel();
|
||||
mAutoHideTimer = nsnull;
|
||||
}
|
||||
|
||||
if (!mAutoHideTimer) // re-use, if available
|
||||
mAutoHideTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
if (mAutoHideTimer)
|
||||
mAutoHideTimer->InitWithFuncCallback(sAutoHideCallback, this,
|
||||
kTooltipAutoHideTime,
|
||||
mAutoHideTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
if ( mAutoHideTimer )
|
||||
mAutoHideTimer->InitWithFuncCallback(sAutoHideCallback, this, kTooltipAutoHideTime,
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче