layout/reftests/bugs/234686-6.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/bugs/234686-6.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     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 +    /* h > max-height
    1.22 +     * wmin/w < hmax/h
    1.23 +     *
    1.24 +     *            wmin           w
    1.25 +     * |------------+------------+----------------> width 
    1.26 +     *                  hmax     h
    1.27 +     * |------------------+------+----------------> height
    1.28 +     *
    1.29 +     * target: [hmax * w/h, hmax]
    1.30 +     */
    1.31 +
    1.32 +    #img6 {min-width:  60px; /* 40% */
    1.33 +           max-height: 75px; /* 50% */}
    1.34 +
    1.35 +  </style>
    1.36 + </head>
    1.37 + <body>
    1.38 +   <p><img src="234686-6.gif" alt="" id="img6"></p> <!-- w=150 h=150 -->
    1.39 +
    1.40 + </body>
    1.41 +</html>

mercurial