Closed Bug 1481585 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 12344 - Fix some minor feature policy parsing issues

Categories

(Core :: DOM: Core & HTML, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 12344 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/12344
Details from upstream follow.

Ehsan Karamad <ekaramad@chromium.org> wrote:
>  Fix some minor feature policy parsing issues
>  
>  This CL makes the following changes to the feature policy parsing code:
>  
>    1- ParsedFeaturePolicyDeclaration holds a sorted vector of unique
>       |origins|.
>    2- AllowList uses std::set instead of std::vector.
>    3- When parsing for list of origins, in case of matching all origins
>       (*), the current set of origins is cleared.
>    4- When comparing ParsedFeaturePolicyDeclaration, if both
>       declarations include '*' then the set of origins are not compared.
>  
>  The noticeable outcome of the CL is that parsed policy will ignore
>  repeated origins and will be sorted. This would make the feature lookup
>  algorithm more efficient.
>  
>  Bug: 710324
>  Change-Id: I5c67ee2d6cff891304781bea0998e07739006a2e
>  Reviewed-on: https://chromium-review.googlesource.com/1161753
>  WPT-Export-Revision: 69bd0d94211c1137cfdcd39dd43eeb87d3230ccf
Component: web-platform-tests → DOM
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Ran 2 tests and 14 subtests
OK     : 2
PASS   : 13
FAIL   : 1
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/deed5aad26b3
[wpt PR 12344] - Fix some minor feature policy parsing issues, a=testonly
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8be996ec799f
[wpt PR 12344] - Fix some minor feature policy parsing issues, a=testonly
https://hg.mozilla.org/mozilla-central/rev/8be996ec799f
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.