layout/reftests/bidi/dirAuto/dir_auto-set-contained-dir-L.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <meta charset="utf-8" />
michael@0 5 <title>HTML Test: dir=auto, start with dir, then L</title>
michael@0 6 <link rel="reference" href="dir_auto-contained-dir-L-ref.html" />
michael@0 7 <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
michael@0 8 <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
michael@0 9 <link rel="author" title="Simon Montagu" href="mailto:smontagu@smontagu.org" />
michael@0 10 <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
michael@0 11 <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
michael@0 12 <meta name="assert" content="
michael@0 13 When dir='auto', the direction is set according to the first strong character
michael@0 14 of the text while ignoring contained elements with an explicit dir of their own.
michael@0 15 In this test, it is the Latin letter A, thus the direction must be
michael@0 16 resolved as LTR.
michael@0 17 This is a variation of the original dir_auto-contained-dir-L.html in which
michael@0 18 the explicit dir is set by script after loading the page" />
michael@0 19 <style>
michael@0 20 input, textarea {
michael@0 21 font-size:1em;
michael@0 22 }
michael@0 23 body {
michael@0 24 font-size:2em;
michael@0 25 }
michael@0 26 .test, .ref {
michael@0 27 border: medium solid gray;
michael@0 28 width: 400px;
michael@0 29 margin: 20px;
michael@0 30 }
michael@0 31 .comments {
michael@0 32 display: none;
michael@0 33 }
michael@0 34 </style>
michael@0 35 <script type="text/javascript">
michael@0 36 function setDirs(value)
michael@0 37 {
michael@0 38 var p1 = document.getElementById("p1");
michael@0 39 p1.dir = value;
michael@0 40
michael@0 41 var p1 = document.getElementById("p2");
michael@0 42 p2.dir = value;
michael@0 43 }
michael@0 44 </script>
michael@0 45 </head>
michael@0 46 <body onload="setDirs('rtl')">
michael@0 47 <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
michael@0 48 <div class="comments">
michael@0 49 Key to entities used below:
michael@0 50 &#x05D0; - The Hebrew letter Alef (strongly RTL).
michael@0 51 &#x05D1; - The Hebrew letter Bet (strongly RTL).
michael@0 52 &#x05D2; - The Hebrew letter Gimel (strongly RTL).
michael@0 53 &#x05D3; - The Hebrew letter Dalet (strongly RTL).
michael@0 54 &#x05D4; - The Hebrew letter He (strongly RTL).
michael@0 55 &#x05D5; - The Hebrew letter Vav (strongly RTL).
michael@0 56 </div>
michael@0 57 <div class="test">
michael@0 58 <div dir="ltr">
michael@0 59 <div dir="auto"><p id="p1">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
michael@0 60 </div>
michael@0 61 <div dir="rtl">
michael@0 62 <div dir="auto"><p id="p2">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
michael@0 63 </div>
michael@0 64 </div>
michael@0 65 <div class="ref">
michael@0 66 <div dir="ltr">
michael@0 67 <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
michael@0 68 </div>
michael@0 69 <div dir="rtl">
michael@0 70 <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
michael@0 71 </div>
michael@0 72 </div>
michael@0 73 </body>
michael@0 74 </html>

mercurial