mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 00:25:27 +00:00
107 lines
4.1 KiB
HTML
107 lines
4.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<!--
|
|
Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/licenses/publicdomain/
|
|
-->
|
|
<html class="reftest-wait"><head>
|
|
<title>text-overflow: simple mixed-bidi cases</title>
|
|
<style type="text/css">
|
|
@font-face {
|
|
font-family: DejaVuSansMono;
|
|
src: url(../fonts/DejaVuSansMono.woff);
|
|
}
|
|
html,body {
|
|
color:black; background-color:white; font-size:16px; padding:0; margin:0; font-family:DejaVuSansMono;
|
|
}
|
|
|
|
.test {
|
|
overflow:auto;
|
|
white-space:nowrap;
|
|
width: 4.4em;
|
|
margin-bottom:1em;
|
|
position:relative;
|
|
line-height:2em;
|
|
}
|
|
|
|
.hidden {
|
|
overflow:hidden;
|
|
width: 4.7em;
|
|
}
|
|
|
|
.rlo {
|
|
unicode-bidi: bidi-override; direction: rtl;
|
|
}
|
|
.lro {
|
|
unicode-bidi: bidi-override; direction: ltr;
|
|
}
|
|
.rtl {
|
|
direction:rtl;
|
|
}
|
|
rr {
|
|
position:absolute;
|
|
bottom:0; right:8px;
|
|
}
|
|
r {
|
|
position:absolute;
|
|
bottom:0; right:-8px;
|
|
}
|
|
ll {
|
|
position:absolute;
|
|
bottom:0; left:8px;
|
|
}
|
|
l {
|
|
position:absolute;
|
|
bottom:0; left:-8px;
|
|
}
|
|
|
|
</style>
|
|
<script>
|
|
function scrolldivs() {
|
|
var divs = document.getElementsByTagName('div');
|
|
for (i = 0; i < divs.length; ++i) {
|
|
if (window.getComputedStyle(divs[i]).direction == 'ltr')
|
|
divs[i].scrollLeft = 8;
|
|
else
|
|
divs[i].scrollLeft = -8;
|
|
}
|
|
document.documentElement.removeAttribute('class');
|
|
}
|
|
</script>
|
|
|
|
</head><body onload="scrolldivs()">
|
|
|
|
<!-- LTR block -->
|
|
|
|
<div class="test"><ll>…</ll><r>…</r> xxB <span class="rlo">… </span> xxxx<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span></div>
|
|
|
|
<div class="test"><ll>…</ll><r>…</r><span class="rlo"> Wor </span> B<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span></div>
|
|
|
|
<div class="test"><ll>…</ll><r>…</r><span class="rlo"> Wor </span></div>
|
|
|
|
<!-- RTL block -->
|
|
<div class="test rtl"><rr>…</rr><l>…</l>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo"> llo </span></div>
|
|
|
|
<div class="test rtl"><rr>…</rr><l>…</l><span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo"> llo </span></div>
|
|
|
|
<div class="test rtl"><rr>…</rr><l>…</l><span class="rlo"> llo </span></div>
|
|
|
|
|
|
<div class="test rtl hidden">AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo"> …lloWo… </span></div>
|
|
|
|
<div class="test rtl hidden"><span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo"> …lloWo… </span></div>
|
|
|
|
<div class="test rtl hidden"><span class="rlo"> …lloWo… </span></div>
|
|
|
|
|
|
<div class="test hidden"> …xxxB<span class="rlo">Hello …d</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span></div>
|
|
|
|
<div class="test hidden"><span class="rlo"> …loWor… </span> xxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span>AxxxxB<span class="rlo">HelloWorld</span></div>
|
|
|
|
<div class="test hidden"><span class="rlo"> …loWor… </span></div>
|
|
|
|
<span style="position:absolute; top:0; left:6em; height:6em; overflow:hidden;">
|
|
<div class="test rtl"><br><br><rr>…</rr><l>…</l><span class="rlo"> lloW HelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorld</span></div>
|
|
</span>
|
|
|
|
</body></html>
|