Closed Bug 1863670 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 43014 - Use kUnicodeSets (v regexp flag) in URLPattern

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox122 fixed)

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

sisidovski <sisidovski@chromium.org> wrote:

Use kUnicodeSets (v regexp flag) in URLPattern

This CL follows the recent spec update in [1]. After this CL, the
regular expression works with the unicodeSet mode, which allows the API
to interpret set notations, multi-codepoint properties etc.

Actually, this CL ends up only adding the support for set notations. At
the moment the API doesn't accept unicode character class escape (\p{},
\P{}) [2], thus we wouldn't add the multi-codepoint match functionarity.

There are some incompatibility between "u" and "v", some patterns are
privously valid but now errors. However, from UMA the impact looks very
limited, it's only around 0.3% of the total constructor calls.

So this CL changes the default flag to "v". Also add a kill switch.

[1] https://github.com/WICG/urlpattern/issues/178
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape

Change-Id: I14cc3420d57cca44c0c25867d05802a8a666cd8c
Bug: 1482263

Reviewed-on: https://chromium-review.googlesource.com/4861342
WPT-Export-Revision: 03e9822275b8cb7761191ff75251e584205fa1e8

The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b013efd9971 [wpt PR 43014] - Use kUnicodeSets (v regexp flag) in URLPattern, a=testonly
Test result changes from PR not available.
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2cec3494bfe4 [wpt PR 43014] - Use kUnicodeSets (v regexp flag) in URLPattern, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.