Closed Bug 1562312 Opened 5 years ago Closed 5 years ago

implement contain:size for `<select multiple>` elements

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(2 files)

Testcase:
data:text/html,<select multiple style="contain:size"></select><br><select multiple style="contain:size"><option>aaaaaaaaaaaaaaaaa

STR: Load that ^ testcase.

EXPECTED RESULTS: The two elements should size the same.
ACTUAL RESULTS: The second one is wider.

The try run shows failures on Android, and that's because on Android we apparently compute the BSize of <select multiple> elements differently, depending on whether it has any options or not. (whereas on other platforms, we seem to mostly compute them the same)

I filed bug 1562556 on that, and I'll annotate the Android test failures as expected-fail due to that bug.

See Also: → 1562556
Attached file testcase 1

Current patch isn't quite done -- the last two elements in this testcase (with a large font on the <option> children) are still taller than the rest with the attached patch, despite the select having contain:size.

(Chrome actually fails in this case, too. I'll file a bug on them.)

OK, I just posted an update that makes us do the right thing on "testcase 1" from comment 4 here (sizing all the boxes the same).

Still need to post automated tests for that part, but hopefully this is code-complete now.

Type: defect → enhancement

ni=tylin since I've added a new testcase to the patch which probably needs a quick check, and I can't re-request review on phab. Thanks!

Flags: needinfo?(aethanyc)

Re-review done. Thanks!

Flags: needinfo?(aethanyc)

(In reply to Daniel Holbert [:dholbert] from comment #3)

The try run shows failures on Android, and that's because on Android we apparently compute the BSize of <select multiple> elements differently, depending on whether it has any options or not. [...] I filed bug 1562556 on that

This bsize issue doesn't make these tests fail on android anymore, as of the bsize-suppression changes referenced in comment 5.

Here's a final (I hope) Try run to verify that the tests pass on Android:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d018aeb63b38da4dc1dfe087a5cba8c0fdc9e3d0

Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a248baf99301
Implement 'contain:size' for <select multiple> elements. r=TYLin
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: