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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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 R</title>
michael@0 6 <link rel="reference" href="dir_auto-contained-dir-R-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 Hebrew letter Alef, thus the direction must be
michael@0 16 resolved as RTL.
michael@0 17 This is a variation of the original dir_auto-contained-dir-R.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('ltr')">
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 </div>
michael@0 54 <div class="test">
michael@0 55 <div dir="ltr">
michael@0 56 <div dir="auto"><p id="p1">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
michael@0 57 </div>
michael@0 58 <div dir="rtl">
michael@0 59 <div dir="auto"><p id="p2">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
michael@0 60 </div>
michael@0 61 </div>
michael@0 62 <div class="ref">
michael@0 63 <div dir="ltr">
michael@0 64 <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
michael@0 65 </div>
michael@0 66 <div dir="rtl">
michael@0 67 <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
michael@0 68 </div>
michael@0 69 </div>
michael@0 70 </body>
michael@0 71 </html>

mercurial