OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="utf-8"/> |
| 5 <title>HTML Test: BDI: neutral when wrapped</title> |
| 6 <link rel="match" href="bdi-neutral-wrapped-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@googleg
roups.com"/> |
| 9 <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-bdi-eleme
nt"/> |
| 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 This should hold even if the BDI's content is wrapped over more than one l
ine."/> |
| 15 <style> |
| 16 body{ |
| 17 font-size:2em; |
| 18 } |
| 19 .test, .ref { |
| 20 border: medium solid gray; |
| 21 width: 400px; |
| 22 margin: 20px; |
| 23 } |
| 24 .comments { display: none; } |
| 25 </style> |
| 26 </head> |
| 27 <body> |
| 28 <div class="instructions" style="display:none"><p>Test passes if the two box
es below look exactly the same.</p></div> |
| 29 <div class="comments"> |
| 30 Key to entities used below: |
| 31   - Non-breaking space. |
| 32 א ... ו - The first six Hebrew letters (strongly RTL). |
| 33 ‭ - The LRO (left-to-right override) formatting character. |
| 34 ‬ - The PDF (pop directional formatting) formatting character; cl
oses LRO. |
| 35 In the test below, the non-breaking spaces in the BDI's middle "word" make
it so long that it |
| 36 must be displayed on a line of its own, with the BDI wrapped before and af
ter it. At the same |
| 37 time, the content surrounding the BDI is supposed to form a single directi
onal run, despite |
| 38 the containing element and the BDI both having the opposite direction, bec
ause the BDI must be |
| 39 treated as a neutral. Thus, on the line containing the first part of the B
DI, the BDI's |
| 40 content must appear after the content preceding it, and on the line contai
ning the last part |
| 41 of the BDI, the BDI content must appear before the content following it, w
here both 'before' |
| 42 and 'after' are defined relative to the surrounding directional run. |
| 43 </div> |
| 44 <div class="test"> |
| 45 <div dir="ltr"> |
| 46 א > |
| 47 <bdi>b |
| 48 >>>           &#
xA0;            

0;             
            |
| 49 c</bdi> |
| 50 > ד... |
| 51 </div> |
| 52 <div dir="rtl"> |
| 53 a > |
| 54 <bdi>ב |
| 55 >>>           &#
xA0;            

0;             
            |
| 56 ג</bdi> |
| 57 > d... |
| 58 </div> |
| 59 </div> |
| 60 <div class="ref"> |
| 61 <div dir="ltr"> |
| 62 ‭b < א‬<br/> |
| 63 ‭>>>‬<br/> |
| 64 ‭ד < c...‬ |
| 65 </div> |
| 66 <div dir="rtl"> |
| 67 ‭a > ב‬<br/> |
| 68 ‭<<<‬<br/> |
| 69 ‭...ג > d‬ |
| 70 </div> |
| 71 </div> |
| 72 </body> |
| 73 </html> |
OLD | NEW |