WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
VERIFIED FIXED
6014
Bidi algorithm: incorrect resolved levels for neutrals between R and ET ON L
https://bugs.webkit.org/show_bug.cgi?id=6014
Summary
Bidi algorithm: incorrect resolved levels for neutrals between R and ET ON L
mitz
Reported
2005-12-08 13:43:03 PST
When the embedding direction is LTR, the sequence R neutrals ET neutrals L should resolve to R L L L L but in TOT it resolves to R R L L L. This is the first example In the attached testcase: R WS ON WS ON WS ET ET WS L resolves to R R R R R R L L L L. Firefox handles it correctly. This happens due to the special way ETs are treated just in case they end up prefixing an EN. The idea in the patch for
bug 3733
was to use bidi.eor to mark the last position before the first ET (need to know this position when deciding what goes with the EN), but for the other cases it introduced an eor in the middle of the neutrals, guessing that the neutrals will need to end up as R (setting bidi.status.eor to R). This guess turns out to be wrong in the first example in the testcase. While it might be possible to fix this by not guessing at all (setting bidi.status.eor to ON), this will require special treatment of this case (status.eor==ON) in all places that check status.eor (currently there are asserts that status.eor!=ON). A simpler and clearer solution is to add a bidi.lastET member for the exclusive use of the ET and EN-after-ET cases.
Attachments
testcase
(1.02 KB, text/html)
2005-12-08 13:44 PST
,
mitz
no flags
Details
Keep track of the last position before the current run of ETs directly
(12.70 KB, patch)
2005-12-08 15:56 PST
,
mitz
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2005-12-08 13:44:21 PST
Created
attachment 5003
[details]
testcase
mitz
Comment 2
2005-12-08 15:56:48 PST
Created
attachment 5007
[details]
Keep track of the last position before the current run of ETs directly This even shortens bidi.cpp by a few lines!
Darin Adler
Comment 3
2005-12-09 19:19:02 PST
Comment on
attachment 5007
[details]
Keep track of the last position before the current run of ETs directly Not that I fully understand this, but r=me.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug