Bug 1966586 - Reuse other browser windows when opening _blank links in Taskbar Tabs windows. r=nrishel
This doesn't affect other tab additions, nor does it stop the tab bar
from appearing altogether. The idea is that _if_ another tab is somehow
made, the user should see it; but we should not create new tabs if we
can avoid it.
This also adds tests for opening URIs in popups and taskbar tabs to make
it less likely that this breaks in future.
Differential Revision: https://phabricator.services.mozilla.com/D253726
<!DOCTYPE html><metacharset="utf-8"><title>CSS Values: Viewport units are computed correctly after font load.</title><linkrel="author"title="Emilio Cobos Álvarez"href="mailto:emilio@crisal.io"><linkrel="author"title="Mozilla"href="https://mozilla.org"><linkrel="help"href="https://www.w3.org/TR/css-values-3/#viewport-relative-lengths"><linkrel="help"href="https://bugzilla.mozilla.org/show_bug.cgi?id=1620359"><scriptsrc="/resources/testharness.js"></script><scriptsrc="/resources/testharnessreport.js"></script><iframewidth=300height=300scrolling=nosrcdoc=""></iframe><script>lett=async_test("Viewport units are correctly updated after resize even if a font load has happened before");letiframe=document.querySelector("iframe");onload=t.step_func(function(){letdoc=iframe.contentDocument;letwin=iframe.contentWindow;doc.body.innerHTML=` <div style="width: 100vw; height: 100vh; background: green"></div> `;letdiv=doc.querySelector("div");letoldWidth=win.getComputedStyle(div).width;letoldHeight=win.getComputedStyle(div).height;assert_equals(oldWidth,win.innerWidth+"px","Should fill the viewport");assert_equals(oldHeight,win.innerHeight+"px","Should fill the viewport");letlink=doc.createElement("link");link.rel="stylesheet";link.href="/fonts/ahem.css";link.onload=t.step_func(function(){iframe.width=400;win.requestAnimationFrame(t.step_func(function(){win.requestAnimationFrame(t.step_func_done(function(){letnewWidth=win.getComputedStyle(div).width;letnewHeight=win.getComputedStyle(div).height;assert_equals(newWidth,win.innerWidth+"px","Should fill the viewport");assert_equals(newHeight,win.innerHeight+"px","Should fill the viewport");assert_equals(newHeight,oldHeight,"Height shouldn't have changed");assert_not_equals(newWidth,oldWidth,"Width should have changed");}));}));});doc.body.appendChild(link);});</script>