Bug 1853378 [wpt PR 41983] - Fix dir attribute matching for text-based input, a=testonly
commit96481a9bd17ea7e2e5b780fe660fa1cf1c794e91
authorDi Zhang <dizhangg@chromium.org>
Wed, 27 Sep 2023 12:01:21 +0000 (27 12:01 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Thu, 28 Sep 2023 14:57:15 +0000 (28 14:57 +0000)
tree2da5edcb64846472344aaf5a57df71f67adb5a49
parent19801e8701d532f924461ef2ce214633f220e03e
Bug 1853378 [wpt PR 41983] - Fix dir attribute matching for text-based input, a=testonly

Automatic update from web-platform-tests
Fix dir attribute matching for text-based input

To comply with HTML standard, we need to make two changes:
1. If dir attribute is undefined and it is the telephone input element,
   return "ltr" [1].
2. If dir attribute is auto and element is textarea or input type text,
   search, telephone, url or email then follow step 1 at [2].

[1] https://html.spec.whatwg.org/multipage/dom.html#attr-dir-undefined-state
[2] https://html.spec.whatwg.org/multipage/dom.html#auto-directionality

Change-Id: I7bc1ba4fd0eb19de6bca7f36985119b627edcaab
Bug: 1420655
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4851878
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1196769}

--

wpt-commits: f503578b0a7f62b8dc1ff0207fb57982ac4c0619
wpt-pr: 41983
testing/web-platform/tests/css/selectors/dir-pseudo-on-input-element.html