From bb74f2ee6abeb9945643cc34decbd38b8dcb8e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Fri, 5 Oct 2018 15:43:53 +0200 Subject: [PATCH] Bug 1496476 - add tabContextChanged stub. r=standard8 --- browser/components/urlbar/UrlbarController.jsm | 8 ++++++++ browser/components/urlbar/UrlbarInput.jsm | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/browser/components/urlbar/UrlbarController.jsm b/browser/components/urlbar/UrlbarController.jsm index 1df8c9d05e8c..d87e04a5758e 100644 --- a/browser/components/urlbar/UrlbarController.jsm +++ b/browser/components/urlbar/UrlbarController.jsm @@ -146,6 +146,14 @@ class UrlbarController { this._listeners.delete(listener); } + /** + * When switching tabs, clear some internal caches to handle cases like + * backspace, autofill or repeated searches. + */ + tabContextChanged() { + // TODO: implementation needed (bug 1496685) + } + /** * Internal function to notify listeners of results. * diff --git a/browser/components/urlbar/UrlbarInput.jsm b/browser/components/urlbar/UrlbarInput.jsm index d311022640f1..775712867e55 100644 --- a/browser/components/urlbar/UrlbarInput.jsm +++ b/browser/components/urlbar/UrlbarInput.jsm @@ -414,6 +414,10 @@ class UrlbarInput { _on_scrollend(event) { this._updateTextOverflow(); } + + _on_TabSelect(event) { + this.controller.tabContextChanged(); + } } /**