layout/reftests/text-overflow/single-value.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     1 <!DOCTYPE HTML>
     2 <!--
     3     Any copyright is dedicated to the Public Domain.
     4     http://creativecommons.org/licenses/publicdomain/
     6     Test: text-overflow: <single value>, scrolled and non-scrolled tests, (bug 684266)
     7 -->
     8 <html class="reftest-wait"><head>
     9 <title>text-overflow: &lt;single value&gt;, scrolled and non-scrolled tests, (bug 684266)</title>
    10 <style type="text/css">
    11 @font-face {
    12   font-family: DejaVuSansMono;
    13   src: url(../fonts/DejaVuSansMono.woff),url(DejaVuSansMono.woff);
    14 }
    15 html,body {
    16     color:black; background-color:white; font-size:16px; padding:0; margin:0; font-family:DejaVuSansMono;
    17 }
    19 body {padding:10px 40px;}
    21 div {
    22   text-overflow: ellipsis;
    23   width:100px;
    24   white-space:nowrap;
    25 }
    26 .hidden {overflow:hidden}
    27 .auto {overflow:auto}
    28 .autolong {overflow:auto; width:100%;}
    29 .scroll {overflow:scroll}
    31 .ltr { direction:ltr; unicode-bidi: bidi-override; }
    32 .rtl { direction:rtl; unicode-bidi: bidi-override; }
    34 .ltr.p { text-indent: -5px; padding-left: 40px; } /* overflow into padding, but not outside the padding edge */
    35 .rtl.p { text-indent: -5px; padding-right: 40px; } /* overflow into padding, but not outside the padding edge */
    37 .s { text-indent: -5px; } /* overflow start edge outside the padding edge */
    38 </style>
    40 <script>
    41 function scrolldivs() {
    42  var divs = document.getElementsByTagName('div');
    43   for (i = 0; i < divs.length; ++i) {
    44     var elm = divs[i];
    45     if (elm.hasAttribute('scroll')) {
    46       if (window.getComputedStyle(elm).direction == 'ltr')
    47         elm.scrollLeft = 8;
    48       else
    49         elm.scrollLeft = -8;
    50     }
    51   }
    52   document.documentElement.removeAttribute('class');
    53 }
    54 window.addEventListener("MozReftestInvalidate", scrolldivs, false);
    55 </script>
    56 </head>
    57 <body>
    59     <div class="ltr start p hidden">A long line that does not break (overflow:hidden)</div>
    60     <div class="ltr start p auto">A long line that does not break (overflow:auto)</div>
    61     <div class="ltr start p autolong">A long line that does not break (overflow:auto)</div>
    62     <div class="ltr start p scroll">A long line that does not break (overflow:scroll)</div>
    63     <div class="ltr start s hidden">A long line that does not break (overflow:hidden)</div>
    64     <div class="ltr start s auto">A long line that does not break (overflow:auto)</div>
    65     <div class="ltr start s autolong">A long line that does not break (overflow:auto)</div>
    66     <div class="ltr start s scroll">A long line that does not break (overflow:scroll)</div>
    68     <div scroll class="ltr start p hidden">A long line that does not break (overflow:hidden)</div>
    69     <div scroll class="ltr start p auto">A long line that does not break (overflow:auto)</div>
    70     <div scroll class="ltr start p autolong">A long line that does not break (overflow:auto)</div>
    71     <div scroll class="ltr start p scroll">A long line that does not break (overflow:scroll)</div>
    72     <div scroll class="ltr start s hidden">A long line that does not break (overflow:hidden)</div>
    73     <div scroll class="ltr start s auto">A long line that does not break (overflow:auto)</div>
    74     <div scroll class="ltr start s autolong">A long line that does not break (overflow:auto)</div>
    75     <div scroll class="ltr start s scroll">A long line that does not break (overflow:scroll)</div>
    77 <div class="rtl" style="float:right">
    78     <div class="rtl start p hidden">A long line that does not break (overflow:hidden)</div>
    79     <div class="rtl start p auto">A long line that does not break (overflow:auto)</div>
    80     <div class="rtl start p autolong">A long line that does not break (overflow:auto)</div>
    81     <div class="rtl start p scroll">A long line that does not break (overflow:scroll)</div>
    82     <div class="rtl start s hidden">A long line that does not break (overflow:hidden)</div>
    83     <div class="rtl start s auto">A long line that does not break (overflow:auto)</div>
    84     <div class="rtl start s autolong">A long line that does not break (overflow:auto)</div>
    85     <div class="rtl start s scroll">A long line that does not break (overflow:scroll)</div>
    87     <div scroll class="rtl start p hidden">A long line that does not break (overflow:hidden)</div>
    88     <div scroll class="rtl start p auto">A long line that does not break (overflow:auto)</div>
    89     <div scroll class="rtl start p autolong">A long line that does not break (overflow:auto)</div>
    90     <div scroll class="rtl start p scroll">A long line that does not break (overflow:scroll)</div>
    91     <div scroll class="rtl start s hidden">A long line that does not break (overflow:hidden)</div>
    92     <div scroll class="rtl start s auto">A long line that does not break (overflow:auto)</div>
    93     <div scroll class="rtl start s autolong">A long line that does not break (overflow:auto)</div>
    94     <div scroll class="rtl start s scroll">A long line that does not break (overflow:scroll)</div>
    95 </div>
    98 </body>
    99 </hml>

mercurial