/testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-contained-script-R-ref.html

https://github.com/rillian/firefox · HTML · 57 lines · 57 code · 0 blank · 0 comment · 0 complexity · 51162d19eaffd96f120096542de7dcbb MD5 · raw file

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>HTML Test: dir=auto, start with script, then R</title>
  6. <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
  7. <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
  8. <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
  9. <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" />
  10. <meta name="assert" content="
  11. When dir='auto', the direction is set according to the first strong character
  12. of descendant text while ignoring descendant script elements.
  13. In this test, it is the Hebrew letter Alef, thus the direction must be
  14. resolved as RTL." />
  15. <style>
  16. input, textarea {
  17. font-size:1em;
  18. }
  19. body {
  20. font-size:2em;
  21. }
  22. .test, .ref {
  23. border: medium solid gray;
  24. width: 400px;
  25. margin: 20px;
  26. }
  27. .comments {
  28. display: none;
  29. }
  30. </style>
  31. </head>
  32. <body>
  33. <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
  34. <div class="comments">
  35. Key to entities used below:
  36. &#x05D0; - The Hebrew letter Alef (strongly RTL).
  37. &#x05D1; - The Hebrew letter Bet (strongly RTL).
  38. &#x05D2; - The Hebrew letter Gimel (strongly RTL).
  39. </div>
  40. <div class="test">
  41. <div dir="ltr">
  42. <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
  43. </div>
  44. <div dir="rtl">
  45. <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
  46. </div>
  47. </div>
  48. <div class="ref">
  49. <div dir="ltr">
  50. <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
  51. </div>
  52. <div dir="rtl">
  53. <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
  54. </div>
  55. </div>
  56. </body>
  57. </html>