Bug
1871766: Fix WPT content-computed.html to not send actual image requests to example.com. r=layout-reviewers,emilio
This WPT puts CSS like the following on a test element:
content: url("https://www.example.com/picture.svg")
That is effecively equivalent to inserting an element like the following:
<img src="https://www.example.com/picture.svg">
In particular, it triggers an actual web request to example.com, in an attempt
to load the actual image. Firefox's test harness configuration detects this
remote network-request and insta-crashes instead of executing it, which is why
this test was flagged as crashing in Firefox. Really, the test needs to be
fixed to avoid generating this image request entirely.
So, this patch adds `display:none` to the target element, which is sufficient
to prevent the browser from loading images for that element. (This change
doesn't impact the behavior that the test is actually trying to exercise, which
is just parsing, not image loading and rendering.)
As part of this, I'm updating Firefox's in-tree test-failure annotations from
a crash to a pile of subtest-failures, which are all due to
https://bugzilla.mozilla.org/show_bug.cgi?id=
1281158
Differential Revision: https://phabricator.services.mozilla.com/
D198341