Open Bug 1883032 Opened 9 months ago Updated 2 days ago

getComputedStyle WPT failures in query-encoding/attributes.sub.html

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

People

(Reporter: valentin, Assigned: edgul)

Details

Attachments

(1 file)

https://wpt.fyi/results/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html%3Fencoding%3Dwindows-1252?label=master&label=experimental&aligned

FAIL message: assert_true: url("http://web-platform.test:8000/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html?%C3%BF") did not end with ?%FF") expected true got false

Failing tests:
getComputedStyle <body background>
getComputedStyle <table background>
getComputedStyle <thead background>
getComputedStyle <tbody background>
getComputedStyle <tfoot background>
getComputedStyle <tr background>
getComputedStyle <td background>
getComputedStyle <th background>

I think this is coming from here: https://searchfox.org/mozilla-central/rev/c036a209f5a2c3163d1277ee2b7becaab2f79dbd/layout/style/nsStyleStruct.cpp#92,109

We should also pass the pages's/Element encoding into the method.

(In reply to Valentin Gosu [:valentin] (he/him) from comment #1)

I think this is coming from here: https://searchfox.org/mozilla-central/rev/c036a209f5a2c3163d1277ee2b7becaab2f79dbd/layout/style/nsStyleStruct.cpp#92,109

This test is about the URL query, not fragment (local ref). So I think the relevant code will be somewhere else (but the same issue, we're just assuming utf-8 and not respecting the page's encoding).

Severity: -- → S3
Assignee: nobody → edgul

Looking at all the places in layout/style that call NS_NewURI these are:
mozilla::GlobalStyleSheetCache::LoadSheetFromSharedMemory
mozilla::GlobalStyleSheetCache::LoadSheetURL
mozilla::StyleCssUrl::GetURI
mozilla::StyleSheet::Constructor

As far as I can tell, none of these pass in a charset attribute.

No longer blocks: interop-2024-url
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: