Attach (recommended) or Link to PDF file here:
[mytestfile.pdf](https://github.com/mozilla/pdf.js/files/7190033/mytestfile.pdf)

Configuration:
- Web browser and its version: Firefox nightly
- Operating system and its version: linux debian

Steps to reproduce the problem:
1. Open the pdf  
2. Click on the yellow area

What is the expected behavior? (add screenshot)
The text layout should be RTL.

What went wrong? (add screenshot)
The text layout is LTR.

It works correctly in evince and in acrobat.
I added a `dir="rtl"` on the `p` element in using devtools and the rendering is the same as in acrobat.

those of type R go up one level and those of type AN or EN go up two
   levels.
   I2. For all characters with an odd (right-to-left) embedding direction,
   those of type L, EN or AN go up one level.
   */
  for (i = 0; i < strLength; ++i) {
    t = types[i];
    if (isEven(levels[i])) {
      if (t === "R") {
        levels[i] += 1;
      } else if (t === "AN" || t === "EN") {
        levels[i] += 2;
      }
    } else {
      
      if (t === "L" || t === "AN" || t === "EN") {
        levels[i] += 1;
      }
    }
  }
  /*
   L1. On each line, reset the embedding level of the following characters to
   the paragraph embedding level:
   segment separators,
   paragraph separators,
   any sequence of whitespace characters preceding a segment separator or
   paragraph separator, and any sequence of white space characters at the end
   of the line.
   */