tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

bdi-neutral-to-surrounding-run.html (2798B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8"/>
      5    <title>HTML Test: BDI: neutral to surrounding letters</title>
      6    <link rel="match" href="bdi-neutral-to-surrounding-run-ref.html">
      7    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.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-bdi-element"/>
     10    <meta name="assert" content="
     11      'For the purposes of applying the bidirectional algorithm to the paragraph-level
     12      container that a bdi element finds itself within, the bdi element must be treated
     13      like a U+FFFC OBJECT REPLACEMENT CHARACTER.'
     14      Thus, regardless of its content and its dir attribute (if any), a BDI will not prevent
     15      a strongly RTL (or LTR) character preceding it from forming a single directional run with
     16      another strongly RTL (LTR) character following it."/>
     17    <style>
     18      body{
     19        font-size:2em;
     20      }
     21      .test, .ref {
     22        border: medium solid gray;
     23        width: 400px;
     24        margin: 20px;
     25      }
     26      .comments { display: none; }
     27    </style>
     28  </head>
     29  <body>
     30    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
     31    <div class="comments">
     32      Key to entities used below:
     33        &#x05D0; ... &#x05D5; - The first six Hebrew letters (strongly RTL).
     34        &#x202D; - The LRO (left-to-right override) formatting character.
     35        &#x202C; - The PDF (pop directional formatting) formatting character; closes LRO.
     36      If the BDI in the test's first DIV were a SPAN, its b would prevent the &#x05D0; and the &#x05D1;
     37      from forming a single RTL run and thus keep the &gt;s between from being mirrored into &lt;s.
     38    </div>
     39    <div class="test">
     40      <div dir="ltr">&#x05D0; &gt; <bdi>[b]</bdi> &gt; &#x05D2;...</div>
     41      <div dir="ltr">&#x05D0; &gt; <bdi dir="ltr">[b]</bdi> &gt; &#x05D2;...</div>
     42      <div dir="ltr">&#x05D0; &gt; <bdi dir="rtl">[b]</bdi> &gt; &#x05D2;...</div>
     43      <div dir="rtl">a &gt; <bdi>[&#x05D1;]</bdi> &gt; c...</div>
     44      <div dir="rtl">a &gt; <bdi dir="ltr">[&#x05D1;]</bdi> &gt; c...</div>
     45      <div dir="rtl">a &gt; <bdi dir="rtl">[&#x05D1;]</bdi> &gt; c...</div>
     46    </div>
     47    <div class="ref">
     48      <div dir="ltr">&#x202D;&#x05D2; &lt; [b] &lt; &#x05D0;...&#x202C;</div>
     49      <div dir="ltr">&#x202D;&#x05D2; &lt; [b] &lt; &#x05D0;...&#x202C;</div>
     50      <div dir="ltr">&#x202D;&#x05D2; &lt; [b] &lt; &#x05D0;...&#x202C;</div>
     51      <div dir="rtl">&#x202D;...a &gt; [&#x05D1;] &gt; c&#x202C;</div>
     52      <div dir="rtl">&#x202D;...a &gt; [&#x05D1;] &gt; c&#x202C;</div>
     53      <div dir="rtl">&#x202D;...a &gt; [&#x05D1;] &gt; c&#x202C;</div>
     54    </div>
     55  </body>
     56 </html>