layout/reftests/bugs/234686-14.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/bugs/234686-14.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
     1.5 +<!--
     1.6 +From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced
     1.7 +with permission in
     1.8 +https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11
     1.9 +-->
    1.10 +<html lang="en">
    1.11 + <head>
    1.12 +  <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title>
    1.13 +  <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" />
    1.14 +  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
    1.15 +  <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" />
    1.16 +  <style type="text/css">
    1.17 +
    1.18 +    /* Diagrams are scaled so that w and h line up.
    1.19 +       Image is 75px x 75px; target dimensions will thus be 75px. */
    1.20 +
    1.21 +    /* (w < min-width) and (h < min-height)
    1.22 +     * (wmin/w < hmin/h) and (wmax/w > hmin/h)
    1.23 +     *
    1.24 +     *            w       wmin       wmax
    1.25 +     * |----------+---------+----------+----------> width 
    1.26 +     *            h           hmin
    1.27 +     * |----------+-------------+-----------------> height
    1.28 +     *
    1.29 +     * target: [hmin * w/h, hmin]
    1.30 +     */
    1.31 +
    1.32 +    #img14 { min-width:   50px; /* 200% */
    1.33 +             max-width:  100px; /* 400% */
    1.34 +             min-height:  75px; /* 300% */}
    1.35 +
    1.36 +  </style>
    1.37 + </head>
    1.38 + <body>
    1.39 +   <p><img src="234686-14.gif" alt="" id="img14"></p> <!-- w=25   h=25  -->
    1.40 +
    1.41 + </body>
    1.42 +</html>

mercurial