Skip to content

Commit 4f350ab

Browse files
tkent-googlemoz-wptsync-bot
authored andcommitted
Bug 1858630 [wpt PR 42505] - Rename form-sizing CSS property to field-sizing, a=testonly
Automatic update from web-platform-tests Rename `form-sizing` CSS property to `field-sizing` w3c/csswg-drafts#7542 (comment) Bug: 1447058 Change-Id: Ia87e0fde1bd47eda5102da937365be268c9f92f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4930938 Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Auto-Submit: Kent Tamura <tkent@chromium.org> Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/main@{#1208923} -- wpt-commits: e93c967a027f4829a3a372f6f77788b84350a872 wpt-pr: 42505
1 parent 5647687 commit 4f350ab

8 files changed

+41
-41
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<title>CSS UI: getComputedStyle().formSizing</title>
2+
<title>CSS UI: getComputedStyle().fieldSizing</title>
33
<link rel="help" href="https://github.com/w3c/csswg-drafts/pull/9251">
44
<link rel="author" title="Kent Tamura" href="mailto:tkent@chromium.org">
55
<script src="/resources/testharness.js"></script>
@@ -8,7 +8,7 @@
88
<body>
99
<div id="target"></div>
1010
<script>
11-
test_computed_value('form-sizing', 'fixed');
12-
test_computed_value('form-sizing', 'content');
11+
test_computed_value('field-sizing', 'fixed');
12+
test_computed_value('field-sizing', 'content');
1313
</script>
1414
</body>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<title>CSS UI: parsing field-sizing with invalid values</title>
3+
<link rel="help" href="https://github.com/w3c/csswg-drafts/pull/9251">
4+
<link rel="author" title="Kent Tamura" href="mailto:tkent@chromium.org">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/css/support/parsing-testcommon.js"></script>
8+
<body>
9+
<script>
10+
test_invalid_value('field-sizing', 'none');
11+
test_invalid_value('field-sizing', 'legacy');
12+
test_invalid_value('field-sizing', 'auto');
13+
test_invalid_value('field-sizing', 'normal');
14+
test_invalid_value('field-sizing', 'normal auto');
15+
test_invalid_value('field-sizing', '100%');
16+
test_invalid_value('field-sizing', '10px');
17+
</script>
18+
</body>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!DOCTYPE html>
2-
<title>CSS UI: parsing form-sizing with valid values</title>
2+
<title>CSS UI: parsing field-sizing with valid values</title>
33
<link rel="help" href="https://github.com/w3c/csswg-drafts/pull/9251">
44
<link rel="author" title="Kent Tamura" href="mailto:tkent@chromium.org">
55
<script src="/resources/testharness.js"></script>
66
<script src="/resources/testharnessreport.js"></script>
77
<script src="/css/support/parsing-testcommon.js"></script>
88
<body>
99
<script>
10-
test_valid_value('form-sizing', 'fixed');
11-
test_valid_value('form-sizing', 'content');
10+
test_valid_value('field-sizing', 'fixed');
11+
test_valid_value('field-sizing', 'content');
1212
</script>
1313
</body>

testing/web-platform/tests/css/css-ui/parsing/form-sizing-invalid.html

-18
This file was deleted.

testing/web-platform/tests/html/rendering/widgets/form-sizing-input-number.tentative.html testing/web-platform/tests/html/rendering/widgets/field-sizing-input-number.tentative.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<script src="/resources/testharnessreport.js"></script>
55
<style>
66
.disable-default {
7-
form-sizing: content;
7+
field-sizing: content;
88
}
99

1010
.small-placeholder {
@@ -51,7 +51,7 @@
5151
test(() => {
5252
let pair = addElements(`<input type=${type}>`);
5353
// A text <input> has approximately 20ch width by default.
54-
// A text <input> with form-sizing:content must be shorter than the default.
54+
// A text <input> with field-sizing:content must be shorter than the default.
5555
assert_less_than(pair.content.offsetWidth, pair.fixed.offsetWidth);
5656
assert_equals(pair.content.offsetHeight, pair.fixed.offsetHeight);
5757

@@ -142,7 +142,7 @@
142142
element.classList.add('disable-default');
143143
assert_less_than(element.offsetWidth, w);
144144
assert_equals(element.offsetHeight, h);
145-
}, `${type}: Update form-sizing property dynamically`);
145+
}, `${type}: Update field-sizing property dynamically`);
146146

147147
});
148148
</script>

testing/web-platform/tests/html/rendering/widgets/form-sizing-input-text.tentative.html testing/web-platform/tests/html/rendering/widgets/field-sizing-input-text.tentative.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<script src="/resources/testharnessreport.js"></script>
55
<style>
66
.disable-default {
7-
form-sizing: content;
7+
field-sizing: content;
88
}
99

1010
.small-placeholder {
@@ -50,7 +50,7 @@
5050
test(() => {
5151
let pair = addElements(`<input type=${type}>`);
5252
// A text <input> has approximately 20ch width by default.
53-
// A text <input> with form-sizing:content must be shorter than the default.
53+
// A text <input> with field-sizing:content must be shorter than the default.
5454
assert_less_than(pair.content.offsetWidth, pair.fixed.offsetWidth);
5555
assert_equals(pair.content.offsetHeight, pair.fixed.offsetHeight);
5656

@@ -147,7 +147,7 @@
147147
element.classList.add('disable-default');
148148
assert_less_than(element.offsetWidth, w);
149149
assert_equals(element.offsetHeight, h);
150-
}, `${type}: Update form-sizing property dynamically`);
150+
}, `${type}: Update field-sizing property dynamically`);
151151

152152
});
153153
</script>

testing/web-platform/tests/html/rendering/widgets/form-sizing-select.tentative.html testing/web-platform/tests/html/rendering/widgets/field-sizing-select.tentative.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<body>
66
<style>
77
.disable-default {
8-
form-sizing: content;
8+
field-sizing: content;
99
}
1010
</style>
1111
<div id="container"></div>
@@ -18,7 +18,7 @@
1818
test(() => {
1919
const s = '<select>><option>1<option>quick brown<option>fox</select>';
2020
container.innerHTML = s + s;
21-
container.lastElementChild.style.formSizing = 'content';
21+
container.lastElementChild.style.fieldSizing = 'content';
2222
const widthForContent1 = container.lastElementChild.offsetWidth;
2323
assert_greater_than(container.firstElementChild.offsetWidth,
2424
widthForContent1);
@@ -31,11 +31,11 @@
3131
container.innerHTML = '<select><option>foo<option>quick brown fox</select>';
3232
const select = container.firstElementChild;
3333
const initialWidth = select.offsetWidth;
34-
select.style.formSizing = 'content';
34+
select.style.fieldSizing = 'content';
3535
assert_less_than(select.offsetWidth, initialWidth);
36-
select.style.formSizing = 'fixed';
36+
select.style.fieldSizing = 'fixed';
3737
assert_equals(select.offsetWidth, initialWidth);
38-
}, 'dropdown: Change the form-sizing value dynamically');
38+
}, 'dropdown: Change the field-sizing value dynamically');
3939

4040
// Tests for list box =========================================================
4141

@@ -76,11 +76,11 @@
7676
container.innerHTML = '<select multiple><option>foo<option>quick brown fox</select>';
7777
const select = container.firstElementChild;
7878
const initialHeight = select.offsetHeight;
79-
select.style.formSizing = 'content';
79+
select.style.fieldSizing = 'content';
8080
assert_less_than(select.offsetHeight, initialHeight);
81-
select.style.formSizing = 'fixed';
81+
select.style.fieldSizing = 'fixed';
8282
assert_equals(select.offsetHeight, initialHeight);
83-
}, 'listbox: Change the form-sizing value dynamically');
83+
}, 'listbox: Change the field-sizing value dynamically');
8484

8585
}
8686
</script>

testing/web-platform/tests/html/rendering/widgets/form-sizing-textarea.tentative.html testing/web-platform/tests/html/rendering/widgets/field-sizing-textarea.tentative.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<script src="/resources/testharnessreport.js"></script>
55
<style>
66
.disable-default {
7-
form-sizing: content;
7+
field-sizing: content;
88
}
99

1010
.small-placeholder {
@@ -49,7 +49,7 @@
4949
test(() => {
5050
let pair = addElements('<textarea></textarea>');
5151
// Historically a <textarea> has approximately 20ch x 2lh size by default.
52-
// A <textarea> with form-sizing:content must be samller than the default.
52+
// A <textarea> with field-sizing:content must be samller than the default.
5353
assert_less_than(pair.content.offsetWidth, pair.fixed.offsetWidth);
5454
assert_less_than(pair.content.offsetHeight, pair.fixed.offsetHeight);
5555

@@ -136,6 +136,6 @@
136136
element.classList.add('disable-default');
137137
assert_less_than(element.offsetWidth, w);
138138
assert_less_than(element.offsetHeight, h);
139-
}, 'Update form-sizing property dynamically');
139+
}, 'Update field-sizing property dynamically');
140140
</script>
141141
</body>

0 commit comments

Comments
 (0)