1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/bidi/dirAuto/dir_auto-unset-contained-dir-R.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,74 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 + <head> 1.7 + <meta charset="utf-8" /> 1.8 + <title>HTML Test: dir=auto, start with dir, then L</title> 1.9 + <link rel="reference" href="dir_auto-contained-dir-L-ref.html" /> 1.10 + <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> 1.11 + <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> 1.12 + <link rel="author" title="Simon Montagu" href="mailto:smontagu@smontagu.org" /> 1.13 + <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> 1.14 + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" /> 1.15 + <meta name="assert" content=" 1.16 + When dir='auto', the direction is set according to the first strong character 1.17 + of the text while ignoring contained elements with an explicit dir of their own. 1.18 + In this test, it is the Hebrew letter Dalet, thus the direction must be 1.19 + resolved as RTL. 1.20 + This is a variation of the original dir_auto-contained-dir-L.html in which 1.21 + the explicit dir is unset by script after loading the page" /> 1.22 + <style> 1.23 + input, textarea { 1.24 + font-size:1em; 1.25 + } 1.26 + body { 1.27 + font-size:2em; 1.28 + } 1.29 + .test, .ref { 1.30 + border: medium solid gray; 1.31 + width: 400px; 1.32 + margin: 20px; 1.33 + } 1.34 + .comments { 1.35 + display: none; 1.36 + } 1.37 + </style> 1.38 + <script type="text/javascript"> 1.39 +function setDirs(value) 1.40 +{ 1.41 + var p1 = document.getElementById("p1"); 1.42 + p1.dir = value; 1.43 + 1.44 + var p1 = document.getElementById("p2"); 1.45 + p2.dir = value; 1.46 +} 1.47 + </script> 1.48 + </head> 1.49 + <body onload="setDirs('')"> 1.50 + <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> 1.51 + <div class="comments"> 1.52 + Key to entities used below: 1.53 + א - The Hebrew letter Alef (strongly RTL). 1.54 + ב - The Hebrew letter Bet (strongly RTL). 1.55 + ג - The Hebrew letter Gimel (strongly RTL). 1.56 + ד - The Hebrew letter Dalet (strongly RTL). 1.57 + ה - The Hebrew letter He (strongly RTL). 1.58 + ו - The Hebrew letter Vav (strongly RTL). 1.59 + </div> 1.60 + <div class="test"> 1.61 + <div dir="ltr"> 1.62 + <div dir="auto"><p id="p1" dir="rtl">דהו</p>ABCאבג.</div> 1.63 + </div> 1.64 + <div dir="rtl"> 1.65 + <div dir="auto"><p id="p2" dir="rtl">דהו</p>ABCאבג.</div> 1.66 + </div> 1.67 + </div> 1.68 + <div class="ref"> 1.69 + <div dir="ltr"> 1.70 + <div dir="rtl"><p dir="rtl">דהו</p>ABCאבג.</div> 1.71 + </div> 1.72 + <div dir="rtl"> 1.73 + <div dir="rtl"><p dir="rtl">דהו</p>ABCאבג.</div> 1.74 + </div> 1.75 + </div> 1.76 + </body> 1.77 +</html>