Bug 1691148: Adjust checkbox and radio button tests to work with the non-native theme enabled. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D105587
This commit is contained in:
Stephen A Pohl 2021-02-18 16:54:45 +00:00
Родитель 1ab6cf4876
Коммит 282b1a2006
4 изменённых файлов: 21 добавлений и 19 удалений

Просмотреть файл

@ -14,20 +14,21 @@
div {
position: relative;
line-height: 0px;
}
input {
height: 113px;
}
</style>
<body>
<!--
Default Size of checkbox is 13px * 13px on all platforms except Linux
(18px * 18px). So given a checkbox with height 113px, the checkbox will be
clamped to 13px * 13px and move to center which y is 50px ((113 - 13) / 2).
-->
<div>
<input type="checkbox">
<input type="checkbox" checked>
<div>
</div>
<script>
// If we grow the checkbox vertically, horizontal size shouldn't change,
// instead it should be centered vertically. We grow it by a hundred
// pixels, and the reference positions it manually at 50px, which is where
// it should end up.
for (let input of document.querySelectorAll("input")) {
input.style.height = (100 + input.getBoundingClientRect().height) + "px";
}
</script>
</body>
</html>

Просмотреть файл

@ -14,6 +14,6 @@
skip-if(!gtkWidget) == gtk-theme-width-height.html gtk-theme-width-height-ref.html
== checkbox-baseline.html checkbox-baseline-ref.html
== checkbox-radio-color.html checkbox-radio-color-ref.html
skip-if(gtkWidget) fails-if(geckoview&&webrender) fails-if(Android&&nativeThemePref) == checkbox-clamp-01.html checkbox-clamp-01-ref.html
== checkbox-clamp-01.html checkbox-clamp-01-ref.html
skip-if(OSX||winWidget) fails-if(geckoview&&webrender) fuzzy-if(gtkWidget&&nativeThemePref,25-25,32-32) fails-if(Android) == checkbox-clamp-02.html checkbox-clamp-02-ref.html
fails-if(OSX&&nativeThemePref) == checkbox-minimum-size.html checkbox-minimum-size-ref.html

Просмотреть файл

@ -14,20 +14,21 @@
div {
position: relative;
line-height: 0px;
}
input {
height: 113px;
}
</style>
<body>
<!--
Default Size of radio is 13px * 13px on all platforms except Linux
(18px * 18px). So given a radio with height 113px, the radio will be
clamped to 13px * 13px and move to center which y is 50px ((113 - 13) / 2).
-->
<div>
<input type="radio">
<input type="radio" checked>
<div>
<script>
// If we grow the radio vertically, horizontal size shouldn't change,
// instead it should be centered vertically. We grow it by a hundred
// pixels, and the reference positions it manually at 50px, which is where
// it should end up.
for (let input of document.querySelectorAll("input")) {
input.style.height = (100 + input.getBoundingClientRect().height) + "px";
}
</script>
</body>
</html>

Просмотреть файл

@ -5,6 +5,6 @@
!= checked-native.html about:blank
!= checked-native-notref.html about:blank
skip-if(!gtkWidget) == gtk-theme-width-height.html gtk-theme-width-height-ref.html
skip-if(gtkWidget) fails-if(geckoview&&webrender) fails-if(Android) == radio-clamp-01.html radio-clamp-01-ref.html
== radio-clamp-01.html radio-clamp-01-ref.html
skip-if(OSX||winWidget||Android) fuzzy-if(gtkWidget&&nativeThemePref,24-24,16-16) == radio-clamp-02.html radio-clamp-02-ref.html # gtkWidget, Bug 1599622
fails-if(OSX) == radio-minimum-size.html radio-minimum-size-ref.html