Bug 1322698 - Reftest for 'appearance:none' checkbox/radio baseline alignment.
authorMats Palmgren <mats@mozilla.com>
Fri, 23 Dec 2016 19:11:03 +0100
changeset 453572 326d947d6bb6b10fc3b985a1093d3862f561f6a0
parent 453571 c718681647c73a4999035b0cef1a4f90f553c869
child 453573 0c9ef8b75095adb97df95255aafeb6972c731dda
push id39711
push userdmitchell@mozilla.com
push dateFri, 23 Dec 2016 21:59:47 +0000
bugs1322698
milestone53.0a1
Bug 1322698 - Reftest for 'appearance:none' checkbox/radio baseline alignment.
layout/reftests/flexbox/flexbox-align-self-baseline-horiz-3-ref.xhtml
layout/reftests/forms/input/checkbox/checkbox-baseline-ref.html
layout/reftests/forms/input/checkbox/checkbox-baseline.html
layout/reftests/forms/input/checkbox/reftest.list
--- a/layout/reftests/flexbox/flexbox-align-self-baseline-horiz-3-ref.xhtml
+++ b/layout/reftests/flexbox/flexbox-align-self-baseline-horiz-3-ref.xhtml
@@ -33,16 +33,17 @@
              -ms-appearance:none;
          -webkit-appearance:none;
                  appearance:none;
          border:none;
          margin:0;
          padding:0;
          border-bottom:2px solid black;
          width:20px;
+         margin-bottom:-2px;
       }
    </style>
   </head>
   <body>
     <div class="flexbox">
       <div class="lime">text</div
       ><button>btn</button
       ><label class="pink">label</label
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/checkbox/checkbox-baseline-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+  <head>
+  <meta charset="utf-8">
+  <title>Reference: baseline of checkbox/radio</title>
+  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322698">
+    <style>
+body { font: 16px/1 monospace; }
+
+div { border: 1px dashed blue; }
+
+x {
+  display:inline-block;
+  margin: 20px;
+  border: 25px solid black;
+  width:0;
+  height:0;
+}
+
+   </style>
+  </head>
+  <body>
+    <div><x></x>Block</div>
+    <div style="font-size:72px"><x style="border-width:3px"></x>Block</div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/input/checkbox/checkbox-baseline.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+  <head>
+  <meta charset="utf-8">
+  <title>CSS Align Test: baseline of checkbox/radio</title>
+  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322698">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-terms">
+  <link rel="match" href="checkbox-baseline-ref.html">
+    <style>
+body { font: 16px/1 monospace; }
+
+div { border: 1px dashed blue; }
+
+.none {
+     -moz-appearance: none; appearance: none;
+  -webkit-appearance: none;
+      -ms-appearance: none;
+          appearance: none;
+  width:0px;
+  height:0px;
+}
+.border { border: 25px solid black; }
+input { margin: 20px; }
+
+   </style>
+  </head>
+  <body>
+    <div><input class="none border" type="checkbox">Block</div>
+    <div style="font-size:72px"><input class="none border" type="checkbox" style="border-width:3px">Block</div>
+  </body>
+</html>
--- a/layout/reftests/forms/input/checkbox/reftest.list
+++ b/layout/reftests/forms/input/checkbox/reftest.list
@@ -7,8 +7,9 @@ fails-if(Android) == radio-stretched.htm
 != checked-native.html about:blank
 != checked-native-notref.html about:blank
 != indeterminate-checked.html indeterminate-checked-notref.html
 != indeterminate-unchecked.html indeterminate-unchecked-notref.html
 != indeterminate-native-checked.html indeterminate-native-checked-notref.html
 != indeterminate-native-unchecked.html indeterminate-native-unchecked-notref.html
 == indeterminate-selector.html indeterminate-selector-ref.html
 skip-if(!gtkWidget) == gtk-theme-width-height.html gtk-theme-width-height-ref.html
+skip-if(Android) == checkbox-baseline.html checkbox-baseline-ref.html # skip-if(Android) because Android use appearance:none by default for checkbox/radio.
\ No newline at end of file