layout/reftests/forms/button/percent-width-child-1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/forms/button/percent-width-child-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,59 @@
     1.4 +<!DOCTYPE html>
     1.5 +<!--
     1.6 +     Any copyright is dedicated to the Public Domain.
     1.7 +     http://creativecommons.org/publicdomain/zero/1.0/
     1.8 +-->
     1.9 +<!-- This test verifies that we honor percent widths on content inside of
    1.10 +     a <button> element (resolving the percent against the <button>).
    1.11 +     (In this testcase, the button has no focus-border/padding.) -->
    1.12 +<html>
    1.13 +<head>
    1.14 +<style>
    1.15 +button {
    1.16 +    border: 0;
    1.17 +    padding: 0;
    1.18 +
    1.19 +    font: 10px sans-serif;
    1.20 +    vertical-align: top;
    1.21 +
    1.22 +    color: black;
    1.23 +    background: gray;
    1.24 +    -moz-appearance: none;
    1.25 +}
    1.26 +button::-moz-focus-inner {
    1.27 +    padding: 0;
    1.28 +    border: 0;
    1.29 +}
    1.30 +
    1.31 +div.p80 {
    1.32 +    width: 80%;
    1.33 +    background: pink;
    1.34 +}
    1.35 +
    1.36 +div.p100 {
    1.37 +    width: 100%;
    1.38 +    background: yellow;
    1.39 +}
    1.40 +</style>
    1.41 +</head>
    1.42 +<body>
    1.43 +<!--Button has explicit width for us to resolve against: -->
    1.44 +<button style="width: 100px">
    1.45 +  <div class="p80">abc</div>
    1.46 +</button>
    1.47 +
    1.48 +<button style="width: 100px">
    1.49 +  <div class="p100">abc</div>
    1.50 +</button>
    1.51 +
    1.52 +<!--Button is using intrinsic width: -->
    1.53 +<button>
    1.54 +  <div class="p80">abc</div>
    1.55 +</button>
    1.56 +
    1.57 +<button>
    1.58 +  <div class="p100">abc</div>
    1.59 +</button>
    1.60 +
    1.61 +</body>
    1.62 +</html>

mercurial