diff options
Diffstat (limited to 'docshell/base/nsDocShellTreeOwner.cpp')
-rw-r--r-- | docshell/base/nsDocShellTreeOwner.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/docshell/base/nsDocShellTreeOwner.cpp b/docshell/base/nsDocShellTreeOwner.cpp index 9f1ab23a6c..6d8eb11cc6 100644 --- a/docshell/base/nsDocShellTreeOwner.cpp +++ b/docshell/base/nsDocShellTreeOwner.cpp @@ -18,7 +18,7 @@ #include "nsAtom.h" #include "nsReadableUtils.h" #include "nsUnicharUtils.h" -#include "mozilla/LookAndFeel.h" +#include "mozilla/StaticPrefs_ui.h" // Interfaces needed to be included #include "nsPresContext.h" @@ -1177,16 +1177,15 @@ nsresult ChromeTooltipListener::MouseMove(Event* aMouseEvent) { } if (!mShowingTooltip) { - if (nsCOMPtr<EventTarget> eventTarget = aMouseEvent->GetComposedTarget()) { + if (nsCOMPtr<EventTarget> eventTarget = aMouseEvent->GetOriginalTarget()) { mPossibleTooltipNode = nsINode::FromEventTarget(eventTarget); } if (mPossibleTooltipNode) { nsresult rv = NS_NewTimerWithFuncCallback( getter_AddRefs(mTooltipTimer), sTooltipCallback, this, - LookAndFeel::GetInt(LookAndFeel::IntID::TooltipDelay, 500), - nsITimer::TYPE_ONE_SHOT, "ChromeTooltipListener::MouseMove", - GetMainThreadSerialEventTarget()); + StaticPrefs::ui_tooltip_delay_ms(), nsITimer::TYPE_ONE_SHOT, + "ChromeTooltipListener::MouseMove", GetMainThreadSerialEventTarget()); if (NS_FAILED(rv)) { mPossibleTooltipNode = nullptr; NS_WARNING("Could not create a timer for tooltip tracking"); |