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"><linkrel="help"href="https://drafts.csswg.org/css-backgrounds-3/#background-image"><metaname="test"content="background-image supports animation"><scriptsrc="/resources/testharness.js"></script><scriptsrc="/resources/testharnessreport.js"></script><scriptsrc="/css/support/interpolation-testcommon.js"></script><style>.parent{background-image:url(../resources/blue-100.png);background-size:00;}.target{width:100px;height:100px;display:inline-block;border:10pxsolidblack;background-repeat:no-repeat;background-image:url(../resources/blue-100.png);}.expected{border-color:green;margin-right:2px;}</style><body><script>// Neutral to imagevarfrom='url(../resources/blue-100.png)';varto='url(../resources/green-100.png)';test_interpolation({property:'background-image',from:neutralKeyframe,to:to,},[{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// initial to imageto='url(../resources/green-100.png)';test_interpolation({property:'background-image',from:'initial',to:to,},[{at:-0.3,expect:'none'},{at:0,expect:'none'},{at:0.3,expect:'none'},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// inherit to imagefrom='url(../resources/blue-100.png)';to='url(../resources/green-100.png)';test_interpolation({property:'background-image',from:'inherit',to:to,},[{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// unset to imagetest_interpolation({property:'background-image',from:'unset',to:to,},[{at:-0.3,expect:'none'},{at:0,expect:'none'},{at:0.3,expect:'none'},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// Image to imagefrom='url(../resources/blue-100.png)';to='url(../resources/green-100.png)';test_interpolation({property:'background-image',from:from,to:to,},[{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// Image to gradientfrom='url(../resources/blue-100.png)';to='linear-gradient(45deg, blue, orange)';test_interpolation({property:'background-image',from:from,to:to,},[{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// Image to crossfadefrom='url(../resources/blue-100.png)';to='cross-fade(url(../resources/green-100.png), url(../resources/stripes-100.png), 0.5)';test_interpolation({property:'background-image',from:from,to:to,},[{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// Gradient to gradientfrom='linear-gradient(-45deg, red, yellow)';to='linear-gradient(45deg, blue, orange)';test_interpolation({property:'background-image',from:from,to:to,},[{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// Keyword to imagefrom='none';to='url(../resources/green-100.png)';test_interpolation({property:'background-image',from:from,to:to,},[{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// Multiple to multiplevarfromA='url(../resources/stripes-100.png)';varfromB='url(../resources/blue-100.png)';vartoA='url(../resources/blue-100.png)';vartoB='url(../resources/stripes-100.png)';from=fromA+', '+fromB;to=toA+', '+toB;test_interpolation({property:'background-image',from:from,to:to,},[{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// Single to multiplefrom='url(../resources/blue-100.png)';vartoA='url(../resources/stripes-100.png)';vartoB='url(../resources/green-100.png)';to=toA+', '+toB;test_interpolation({property:'background-image',from:from,to:to,},[// The interpolation of different numbers of background-images looks a bit strange here.// Animating background-image is not specified to be possible however we do it for backwards compatibility.// With this in mind we kept the implementation simple at the expense of this corner case because there is// no official specification to support.{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);// Multiple mismatched typesfrom='url(../resources/blue-100.png), none';to='url(../resources/stripes-100.png), url(../resources/green-100.png)';test_interpolation({property:'background-image',from:from,to:to,},[{at:-0.3,expect:from},{at:0,expect:from},{at:0.3,expect:from},{at:0.6,expect:to},{at:1,expect:to},{at:1.5,expect:to},]);</script></body>