mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision b'99458bfd6e43f5842a4a510cc5adfd8185e5c64c'
This commit is contained in:
parent
eac515e4ab
commit
ec97b29ff1
334 changed files with 5735 additions and 3175 deletions
|
@ -60,8 +60,28 @@ test(() => {
|
|||
container.setAttribute('dir', 'rtl');
|
||||
container.appendChild(input);
|
||||
|
||||
// Insert the element into the document so that we can also check for
|
||||
// 'direction' in computed style.
|
||||
document.body.appendChild(container);
|
||||
|
||||
assert_true(input.matches(':dir(ltr)'));
|
||||
assert_false(input.matches(':dir(rtl)'));
|
||||
// Per https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering:
|
||||
assert_equals(getComputedStyle(input).direction, 'ltr');
|
||||
|
||||
// Changing to a different type causes the special type=tel rule to no longer apply.
|
||||
input.type = 'text';
|
||||
assert_false(input.matches(':dir(ltr)'));
|
||||
assert_true(input.matches(':dir(rtl)'));
|
||||
assert_equals(getComputedStyle(input).direction, 'rtl');
|
||||
|
||||
// And restoring type=tel brings back that behavior.
|
||||
input.type = 'tel';
|
||||
assert_true(input.matches(':dir(ltr)'));
|
||||
assert_false(input.matches(':dir(rtl)'));
|
||||
assert_equals(getComputedStyle(input).direction, 'ltr');
|
||||
|
||||
document.body.removeChild(container);
|
||||
}, 'input element whose type attribute is in the telephone state in a RTL block');
|
||||
|
||||
for (let type of ['text', 'search', 'url', 'email']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue