mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Create new image cache per document (#36832)
Rather than sharing the full image cache in a script_thread, the image cache is now unique per document. This ensures that CSP factors no longer affect whether the image is retrieved from the cache incorrectly. To do so, the thread_pool is shared across all caches, but the store is fresh. Except for the place_holder{image,url}, which are cloned. That's because the `rippy_data` is only available in the constellation and no longer accessible at the point that we need to create the document in the script_thread. Contrary to the description in #36505, the script_thread still has an image_cache for this reason: so it has access to the store and thread_pool to clone it. With these changes, the two CSP tests no longer flake. Confirmed with running the following commmand: ``` ./mach test-wpt tests/wpt/tests/content-security-policy/generic/ --rerun=10 ``` Fixes #36505 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
3db0194e5a
commit
8a837778d9
14 changed files with 68 additions and 95 deletions
|
@ -1,18 +1,12 @@
|
|||
[invalid-characters-in-policy.html]
|
||||
[Should not load image with 'none' CSP - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[Should not load image with 'none' CSP - HTTP header]
|
||||
expected: FAIL
|
||||
|
||||
[Non-ASCII character in directive value should not affect other directives. - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[Non-ASCII character in directive value should not affect other directives. - HTTP header]
|
||||
expected: FAIL
|
||||
|
||||
[Non-ASCII character in directive name should not affect other directives. - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[Non-ASCII character in directive name should not affect other directives. - HTTP header]
|
||||
expected: FAIL
|
||||
|
||||
[Non-ASCII character in directive value should drop the whole directive. - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[Non-ASCII quote character in directive value should drop the whole directive. - meta tag]
|
||||
expected: FAIL
|
||||
|
|
|
@ -6,50 +6,5 @@
|
|||
[U+000C FF should be properly parsed inside directive value - HTTP header]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Should not load image with 'none' CSP - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[Should not load image with 'none' CSP - HTTP header]
|
||||
expected: FAIL
|
||||
|
||||
[U+0009 TAB should be properly parsed between directive name and value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+0009 TAB should be properly parsed between directive name and value - HTTP header]
|
||||
expected: FAIL
|
||||
|
||||
[U+000C FF should be properly parsed between directive name and value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+000A LF should be properly parsed between directive name and value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+000D CR should be properly parsed between directive name and value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+0020 SPACE should be properly parsed between directive name and value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+0020 SPACE should be properly parsed between directive name and value - HTTP header]
|
||||
expected: FAIL
|
||||
|
||||
[U+0009 TAB should be properly parsed inside directive value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+0009 TAB should be properly parsed inside directive value - HTTP header]
|
||||
expected: FAIL
|
||||
|
||||
[U+000C FF should be properly parsed inside directive value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+000A LF should be properly parsed inside directive value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+000D CR should be properly parsed inside directive value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+0020 SPACE should be properly parsed inside directive value - meta tag]
|
||||
expected: FAIL
|
||||
|
||||
[U+0020 SPACE should be properly parsed inside directive value - HTTP header]
|
||||
[U+00A0 NBSP should not be parsed inside directive value - meta tag]
|
||||
expected: FAIL
|
||||
|
|
|
@ -16,9 +16,3 @@
|
|||
|
||||
[History navigation in iframe: data URL document is navigated back from history cross-origin.]
|
||||
expected: FAIL
|
||||
|
||||
[History navigation in iframe: srcdoc iframe is navigated back from history same-origin.]
|
||||
expected: FAIL
|
||||
|
||||
[History navigation in iframe: srcdoc iframe is navigated back from history cross-origin.]
|
||||
expected: FAIL
|
||||
|
|
|
@ -4,3 +4,15 @@
|
|||
|
||||
[<iframe sandbox src='blob:...'>'s inherits policy. (opaque origin sandbox)]
|
||||
expected: FAIL
|
||||
|
||||
[window about:blank inherits policy.]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe src='blob:...'>'s inherits policy.]
|
||||
expected: FAIL
|
||||
|
||||
[window url='blob:...' inherits policy.]
|
||||
expected: FAIL
|
||||
|
||||
[window url='javascript:...'>'s inherits policy (static <img> is blocked)]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[iframe-srcdoc-inheritance.html]
|
||||
expected: TIMEOUT
|
||||
[Second image should be blocked]
|
||||
expected: NOTRUN
|
|
@ -2,3 +2,6 @@
|
|||
expected: TIMEOUT
|
||||
[location.reload() of srcdoc iframe.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[location.reload() of blob URL iframe.]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[background-image-shared-stylesheet.html]
|
||||
expected: TIMEOUT
|
|
@ -1,4 +1,3 @@
|
|||
[stale-image.html]
|
||||
expected: TIMEOUT
|
||||
[Cache returns stale resource]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
|
|
@ -7,3 +7,6 @@
|
|||
|
||||
[The line height calculation quirk, <table><tr><td id=test><img src="{png}"> <img src="{png}"><tr><td id=ref>x<tr><td id=s_ref>x</table>]
|
||||
expected: FAIL
|
||||
|
||||
[The line height calculation quirk, #test img { padding:1px }<div id=test><img src="{png}"></div><img id=ref src="{png}" height=3><div id=s_ref>x</div>]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
[table-cell-width-calculation.html]
|
||||
[The table cell width calculation quirk, basic]
|
||||
expected: FAIL
|
||||
|
||||
[The table cell width calculation quirk, inline-block]
|
||||
expected: FAIL
|
||||
|
||||
[The table cell width calculation quirk, img in span]
|
||||
expected: FAIL
|
||||
|
||||
[The table cell width calculation quirk, the don't-wrap rule is only for the purpose of calculating the width of the cell]
|
||||
expected: FAIL
|
||||
|
||||
[The table cell width calculation quirk, display:table-cell on span]
|
||||
expected: FAIL
|
||||
|
||||
[The table cell width calculation quirk, display:table-cell on span, wbr]
|
||||
[The table cell width calculation quirk, the quirk shouldn't apply for <video poster>]
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue