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
22 lines
346 B
HTML
22 lines
346 B
HTML
<!doctype html>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
#button {
|
|
width: 400px;
|
|
height: 400px;
|
|
margin: 50px;
|
|
padding: 0;
|
|
border: 0;
|
|
background-color: purple;
|
|
vertical-align: top;
|
|
}
|
|
#button > div {
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: green;
|
|
}
|
|
</style>
|
|
<button id="button">
|
|
<div></div>
|
|
</button>
|