diff --git a/layout/style/GeckoBindings.cpp b/layout/style/GeckoBindings.cpp index b48fe0adb2d4..9ec29b9a2299 100644 --- a/layout/style/GeckoBindings.cpp +++ b/layout/style/GeckoBindings.cpp @@ -1192,7 +1192,12 @@ void Gecko_GetComputedImageURLSpec(const StyleComputedUrl* aURL, } } - aOut->AssignLiteral("about:invalid"); + // Empty URL computes to empty, per spec: + if (aURL->SpecifiedSerialization().IsEmpty()) { + aOut->Truncate(); + } else { + aOut->AssignLiteral("about:invalid"); + } } bool Gecko_IsSupportedImageMimeType(const uint8_t* aMimeType, diff --git a/testing/web-platform/meta/css/css-values/urls/empty.html.ini b/testing/web-platform/meta/css/css-values/urls/empty.html.ini deleted file mode 100644 index ebdc17c25b8e..000000000000 --- a/testing/web-platform/meta/css/css-values/urls/empty.html.ini +++ /dev/null @@ -1,20 +0,0 @@ -[empty.html] - [empty URL: inline-unquoted] - expected: - if (os == "mac") and not debug: [FAIL, PASS] - FAIL - - [empty URL: inline-quoted] - expected: - if (os == "mac") and not debug: [FAIL, PASS] - FAIL - - [empty URL: external-unquoted] - expected: - if (os == "mac") and not debug: [FAIL, PASS] - FAIL - - [empty URL: external-quoted] - expected: - if (os == "mac") and not debug: [FAIL, PASS] - FAIL