Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1562057] Change size-contained & empty select elements to have the same inline-size. #19643

Merged
merged 1 commit into from Oct 13, 2019

Conversation

@moz-wptsync-bot
Copy link
Collaborator

moz-wptsync-bot commented Oct 11, 2019

Per the css-contain specification, size contained elements must be sized as if
they were empty. Up until now, we've been handling that by just using "0" as
the intrinsic size of some components, but that doesn't actually match the size
of a "true" empty select, which has some nonzero width from:
(a) the default inline-axis padding on the display frame (added in a rule for
the ::-moz-display-comboboxcontrol-frame pseudo, in forms.css).

(b) the width (inline-size) of the display frame's "placeholder" space
character, which has a small intrinsic width (but which really only exists
for block-axis sizing and alignment, when no option is selected from
the dropdown).

This patch addresses issue (a) by explicitly adding the display frame's
inline-axis padding to size-contained elements, and it addresses issue (b) by
changing to use a zero-width space character in empty select elements.

So: as of this patch, size-contained select elements are getting a little wider
(to address (a)), and empty select elements are also getting a little skinnier
(to address (b)), and they'll end up being the same width.

(I chose U+FEFF "zero-width non-breaking-space" since we were previously using
a non-breaking space character. I'm not sure if the non-breaking aspect matters,
but I figured I'd preserve that to be on the safe side.)

Differential Revision: https://phabricator.services.mozilla.com/D48791

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1562057
gecko-commit: a8ea98346a87402b1c3ad4c892694d0de163a0b3
gecko-integration-branch: autoland
gecko-reviewers: TYLin

Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

…-size.

Per the css-contain specification, size contained elements must be sized as if
they were empty. Up until now, we've been handling that by just using "0" as
the intrinsic size of some components, but that doesn't actually match the size
of a "true" empty select, which has some nonzero width from:
 (a) the default inline-axis padding on the display frame (added in a rule for
     the ::-moz-display-comboboxcontrol-frame pseudo, in forms.css).

 (b) the width (inline-size) of the display frame's "placeholder" space
     character, which has a small intrinsic width (but which really only exists
     for *block-axis* sizing and alignment, when no option is selected from
     the dropdown).

This patch addresses issue (a) by explicitly adding the display frame's
inline-axis padding to size-contained elements, and it addresses issue (b) by
changing to use a zero-width space character in empty select elements.

So: as of this patch, size-contained select elements are getting a little wider
(to address (a)), and empty select elements are also getting a little skinnier
(to address (b)), and they'll end up being the same width.

(I chose U+FEFF "zero-width non-breaking-space" since we were previously using
a non-breaking space character. I'm not sure if the non-breaking aspect matters,
but I figured I'd preserve that to be on the safe side.)

Differential Revision: https://phabricator.services.mozilla.com/D48791

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1562057
gecko-commit: 25d95be82e953bfe3758acb96c3fb80b9b602f5a
gecko-integration-branch: autoland
gecko-reviewers: TYLin
@moz-wptsync-bot moz-wptsync-bot force-pushed the gecko/1562057 branch from 0bebedf to 888b6da Oct 13, 2019
@moz-wptsync-bot moz-wptsync-bot merged commit f934e62 into master Oct 13, 2019
11 checks passed
11 checks passed
Azure Pipelines Build #20191013.6 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
Taskcluster (pull_request) TaskGroup: success
Details
upstream/gecko Landed on mozilla-central
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - firefox[experimental] Firefox results
Details
wpt.fyi - safari[experimental] Safari results
Details
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1562057 branch Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.