ZWNJ and ZWJ ignored in Arabic context

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
18 years ago
11 years ago

People

(Reporter: roozbeh, Assigned: smontagu)

Tracking

Trunk
x86
Windows 2000
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

()

Attachments

(3 attachments, 1 obsolete attachment)

Reporter

Description

18 years ago
In the nightly build 2001111603, under Windows 2000, U+200C, Zero Width
Non-Joiner is ignored. The character should break cursive joining of adjacent
Arabic letters.
Mozilla's behaviour was OK in 0.9.5, so this is introduced in the meanwhile.
Reporter

Comment 1

18 years ago
Reporter

Comment 2

18 years ago
Reporter

Updated

18 years ago
Blocks: 108492
Assignee

Comment 3

18 years ago
Lina, was this regression caused by the fix to bug 36163?

Updated

18 years ago
Blocks: 115713

Comment 4

18 years ago
Dear Simon, sorry about the late reply - I've seen your question only today..
My first guess was that the fix to bug 36163 could definitely cause this regression. However, Zero Width
Non-Joiner, CH_ZWNJ, was defined as discardable also before my changes (see nsTextTransformer.h). To see 
whether my changes cause the problem or not, it probably makes sense to remove ZWNJ from the definition 
of IS_BIDI_CONTROL(_ch), agree? And btw, is Zero Width *Joiner* ignored?
Reporter

Comment 5

18 years ago
Yes Lina, Zero Width Joiner is also ignored in the latest nightly I am testing
with (2001121703).
Summary: ZWNJ ignored in Arabic context → ZWNJ and ZWJ ignored in Arabic context
Assignee

Comment 6

18 years ago
OK, as Lina suggested I removed ZWNJ and ZWJ from the definition of
IS_BIDI_CONTROL. This corrected the shaping and regressed bug 36163 for those
characters. Here is the diff for reference:

diff -u -r1.24 nsTextTransformer.h
--- layout/html/base/src/nsTextTransformer.h    14 Nov 2001 14:21:52 -0000    
+++ layout/html/base/src/nsTextTransformer.h    19 Dec 2001 18:37:55 -0000
@@ -65,7 +65,7 @@
 #define CH_RLO  8238  //<!CDATA "&#8238;" -- right-to-left override, U+202E-->
 #define IS_BIDI_CONTROL(_ch) \
-  (((_ch) >= CH_ZWNJ && (_ch) <= CH_RLM) \
+  (((_ch) >= CH_LRM && (_ch) <= CH_RLM) \
   || ((_ch) >= CH_LRE && (_ch) <= CH_RLO))
 #endif // IBMBIDI

I am changing the dependency from meta bug 115713 to meta bug 115705. Even if
this isn't really a measurement issue, the solution for the measurement problem
needs to take this problem into account.

Blocks: 115705
No longer blocks: 115713
Assignee

Comment 7

18 years ago
*** Bug 117281 has been marked as a duplicate of this bug. ***

Comment 8

18 years ago
smontagu:
what should we do about the change you suggest in nsTextTransform.h ?
will that solve the problem ? any bad side effect? should we ask r= and check in ?
Assignee: mkaply → smontagu
Assignee

Updated

18 years ago
No longer blocks: 115705
Assignee

Comment 9

18 years ago
We can't check in that change in isolation, because it regresses bug 36163.
Depending on how we solve the problems with measurement of Arabic shaped text,
we may have to check in that patch with the additional of more changes to strip
the zwnj and zwj characters after shaping.

Having written that, I realize that the dependencies in this bug are wrong. It
depends on 115705, rather than blocking it.
Depends on: 115705
Assignee

Updated

17 years ago
Status: NEW → ASSIGNED
Assignee

Comment 10

17 years ago
Posted patch Patch (obsolete) — Splinter Review
This patch has been taken out of bug 99823 in order to separate issues.
Assignee

Updated

17 years ago
No longer depends on: 115705
Assignee

Updated

17 years ago
Blocks: 99823
Assignee

Comment 11

17 years ago
I often can't connect to www.persianacademy.ir, but there is a test case in
attachment 62995 [details] from the dupe bug 117281
Assignee

Comment 12

17 years ago
Comment on attachment 79548 [details] [diff] [review]
Patch

Ignore this patch - it doesn't work.
Attachment #79548 - Attachment is obsolete: true
Assignee

Comment 13

17 years ago
Posted patch Patch v.2Splinter Review
Ok, to fix this I have had to bring StripBidiControlCharacters back from CVS
limbo. This is temporary, and it can be banished to the outer darkness again
once bug 99823 and its dependencies are fixed.

Comment 14

17 years ago
Comment on attachment 79733 [details] [diff] [review]
Patch v.2

r=ftang
Attachment #79733 - Flags: review+

Comment 15

17 years ago
Comment on attachment 79733 [details] [diff] [review]
Patch v.2

sr=attinasi
Attachment #79733 - Flags: superreview+
Assignee

Comment 16

17 years ago
Fix checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Updated

11 years ago
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.