Bug 1487168: Give ShouldShowFocusRingIfFocusedByMouse() an #ifndef guard to match its caller & to avoid -Wunused-function build warning. r=smaug
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 29 Aug 2018 18:01:12 +0000
changeset 482321 1d6495af4aa99c430e42a32551a488a9449201fb
parent 482320 b6f8a968931e0b5791f557f95d492d6f750f4e32
child 482322 000a3f46f36c9c400d35af815c7b19a9db6f7a9a
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewerssmaug
bugs1487168
milestone63.0a1
Bug 1487168: Give ShouldShowFocusRingIfFocusedByMouse() an #ifndef guard to match its caller & to avoid -Wunused-function build warning. r=smaug Differential Revision: https://phabricator.services.mozilla.com/D4583
dom/base/nsGlobalWindowInner.cpp
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -4420,24 +4420,26 @@ nsGlobalWindowInner::DisableVRUpdates()
 void
 nsGlobalWindowInner::ResetVRTelemetry(bool aUpdate)
 {
   if (mVREventObserver) {
     mVREventObserver->UpdateSpentTimeIn2DTelemetry(aUpdate);
   }
 }
 
+#ifndef XP_WIN // This guard should match the guard at the callsite.
 static bool ShouldShowFocusRingIfFocusedByMouse(nsIContent* aNode)
 {
   if (!aNode) {
     return true;
   }
   return !nsContentUtils::ContentIsLink(aNode) &&
     !aNode->IsAnyOfHTMLElements(nsGkAtoms::video, nsGkAtoms::audio);
 }
+#endif
 
 void
 nsGlobalWindowInner::SetFocusedElement(Element* aElement,
                                        uint32_t aFocusMethod,
                                        bool aNeedsFocus)
 {
   if (aElement && aElement->GetComposedDoc() != mDoc) {
     NS_WARNING("Trying to set focus to a node from a wrong document");