Bug 1689355 - Prevent uneven checkbox margin from growing the line with the non-native theme. r=spohl

The non-native theme does two things which, combined, cause this test to
fail.

The first one is that it has slightly bigger checkboxes than other
themes (14px vs. 13px).

The second one is that it has a 2px widget-imposed border, like Mac:

    https://searchfox.org/mozilla-central/rev/0dfbe5a699cc6c73cf8c14d1aa10ba10ef3ec8fa/widget/nsNativeBasicTheme.cpp#1367-1369

Which causes its baseline to go down by that amount. This was done
intentionally in bug 1675389, though I guess it could be reconsidered.

These two things combined make the checkbox grow the line slightly in
this test-case, causing the elements to move 1px apart.

The test is intended to check that the baseline calculation of a
checkbox/radio is correct, which it is, so prevent that undesired side
effect by resetting the margin to zero.

Differential Revision: https://phabricator.services.mozilla.com/D103324
This commit is contained in:
Emilio Cobos Álvarez 2021-01-29 14:16:18 +00:00
parent 0a06c5acab
commit ab8b88783f
2 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@
<title>Bug 1134744 testcase</title>
<meta charset="utf-8">
<style>
input { margin: 0 }
div {
height: 200px;
margin: 1px;

View File

@ -4,6 +4,7 @@
<title>Bug 1134744 testcase</title>
<meta charset="utf-8">
<style>
input { margin: 0 }
div {
height: 200px;
margin: 1px;