Closed Bug 717811 Opened 13 years ago Closed 8 years ago

<bdi> does not act as neutral character when it is immediately followed or preceded by characters with strong direction

Categories

(Core :: Layout: Text and Fonts, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aharon, Unassigned)

References

Details

(Keywords: rtl)

Attachments

(6 files)

Attached file test case
For the purposes of applying the bidirectional algorithm to a paragraph-level container containing a unicode-bidi:isolate element like <bdi>, the isolate element is supposed to be treated like a neutral character.

This is currently not the case when the <bdi> is *immedately* followed or preceded by a character with string direction, or by another <bdi>.

I am attaching three test cases being submitted to the HTML5 test suite that fail due to this bug.
Attached file another test case
Attached file third test case
Attachment #588252 - Attachment mime type: text/plain → text/html
Attachment #588253 - Attachment mime type: text/plain → text/html
Attachment #588254 - Attachment mime type: text/plain → text/html
Attachment #588259 - Attachment mime type: text/plain → text/html
Attachment #588260 - Attachment mime type: text/plain → text/html
Attachment #588263 - Attachment mime type: text/plain → text/html
Keywords: rtl
This bug is much more of a problem than I thought, because unicode-bidi:-moz-isolate is the Mozilla default for block elements. This is a specified by HTML5; IE9 and WebKit still have unicode-bidi:normal as the default.

The unfortunate result is that the following gets badly garbled in Mozilla, but not in IE or WebKit:

<html dir="rtl"><h3 style="display: inline;"><span dir="ltr">John Doe&rlm;</span>‏</h3><a href="#" style="margin-right:10px;">12 באפר
2012</a></html>
Sorry, I meant to write:

<html dir="rtl"><h3 style="display: inline;"><span dir="ltr">John Doe</span>&rlm;</h3><a href="#" style="margin-right:10px;">12 באפר
2012</a></html>
Blocks: 751841
Depends on: 922963
May a related bug: Bug 996627
Not sure whether bug 996627 is truly related. It stops reproducing when any on of the three seemingly do-nothing <span>s in the test case there is removed. A <span> should be invisible to the UBA. The problem here is caused by actual strongly directional characters (that do get fed into the UBA) immediately adjacent to the <bdi>.
Depends on: 1160847
Ted, any chance you can take a look at this bug? Fixing bug 1160847 is supposed to be the way to do it, but that ran into trouble.
It seems my existing patches for bug 1160847 also fix this bug.
Fixed by bug 1160847.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: