commit d68d2b68366af9456adf8c152e127ec5c10344c5 Author: Arthur Edelstein arthuredelstein@gmail.com Date: Tue Aug 22 12:06:21 2017 -0700
Bug 20375: Warn users after entering fullscreen mode.
When the browser window is maximized, we show users a notification warning that maximizing the screen is fingerprintable. We should show this warning when the window enters fullscreen mode as well. This change is especially important for macOS, which uses window.STATE_FULLSCREEN instead of window.STATE_MAXIMIZED when the user clicks the "maximize" button on the window title bar. --- src/chrome/content/torbutton.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js index 11f4b61..db6b694 100644 --- a/src/chrome/content/torbutton.js +++ b/src/chrome/content/torbutton.js @@ -2126,7 +2126,8 @@ var torbutton_resizelistener = m_tb_resize_handler = async function() { // Wait for end of execution queue to ensure we have correct windowState. await new Promise(resolve => setTimeout(resolve, 0)); - if (window.windowState === 1) { + if (window.windowState === window.STATE_MAXIMIZED || + window.windowState === window.STATE_FULLSCREEN) { if (m_tb_prefs. getIntPref("extensions.torbutton.maximize_warnings_remaining") > 0) {
tbb-commits@lists.torproject.org