For now, replicate the label + icon structure.
Use pseudo-elements for them. We could use select.css instead, but we
need a way to to prevent the display fix-up from applying (this is
needed because otherwise <select style=display:flex> starts getting the
label and button on different lines), and pseudo-elements is easier.
Use a <span> for the icon since we basically otherwise have a hidden,
unfocusable button and it simplifies the styling that way.
Use the same for the input file content since it simplifies the logic on
the frame constructor.
nsListControlFrame gets some clean-up as well since I was trying to make
sense of nsISelectFrame, but I could split that out if needed.
Tests for bug 323656 fail now because it tests explicit inheritance from
the <select> to the <option>, and now that goes through a <slot>.
Other elements have the same issue, see
https://github.com/whatwg/html/issues/3748. So for now remove those
tests.
Differential Revision: https://phabricator.services.mozilla.com/D280041
This matches the pre-regression behavior. I matched select's
break-inside behavior, but we might want to make that !important, since
the old code always used unconstrained bsize for the button contents?
Differential Revision: https://phabricator.services.mozilla.com/D258190
This removes the implementation of nsHTMLButtonControlFrame, instead
reusing nsBlockFrame + align-content (or the relevant display type for
flex / grid / columns / etc).
This matches what Blink does and, for the most part, it is trivial.
It requires moving some special cases around, and override inline flow
display, tho so that buttons don't suddenly start fragmenting in the
inline axis.
It adds a tiny fix for a writing-mode mismatch in
nsBlockFrame::AlignContent(), covered by
layout/reftests/writing-mode/1138356-1-button-contents-alignment.html
containing-block-change-button tests are tweaked to avoid overflowing
the 600px viewport from WPT reftests causing scrollbar fuzziness.
contain-layout-baseline-005.html removes the <select> element just like
https://chromium-review.googlesource.com/c/chromium/src/+/5479489
removed the <button>s, since they align the same now, added a test for
that.
Differential Revision: https://phabricator.services.mozilla.com/D257149