Closed Bug 266551 Opened 20 years ago Closed 20 years ago

[Mac] BiDi caret ignores bidi keyboard layouts (LTR marker instead of RTL)

Categories

(Core Graveyard :: Widget: Mac, defect)

PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.8alpha6

People

(Reporter: asaf, Assigned: asaf)

References

(Blocks 1 open bug)

Details

(Keywords: rtl)

Attachments

(1 file, 2 obsolete files)

stay tuned :)
Status: NEW → ASSIGNED
QA Contact: jrgmorrison → prognathous
Target Milestone: --- → mozilla1.8alpha6
Blocks: BidiCaret
Attached patch patch (obsolete) (deleted) — Splinter Review
It's amazing how broken is the old good TSM API.
Attachment #163955 - Flags: superreview?(bzbarsky)
Attachment #163955 - Flags: review?(jhpedemonte)
Comment on attachment 163955 [details] [diff] [review]
patch

It will take me probably at least a week to get to this review....  I'm a
little swamped with other reviews right now.
Comment on attachment 163955 [details] [diff] [review]
patch

Just some nits:

+typedef OSStatus (*fpKLGetKeyboardLayoutProperty_type) (KeyboardLayoutRef,
+    KeyboardLayoutPropertyTag, void**);

I would write it like this:
+typedef OSStatus (*fpKLGetKeyboardLayoutProperty_type)
+			 (KeyboardLayoutRef, KeyboardLayoutPropertyTag,
void**);

Try to keep the lines in the patch to 80 characters wide or less.

I would write the second code block in IsLangRTL with one 'return', like this:
+  nsresult rv = NS_OK;
+  if (fpKLGetCurrentKeyboardLayout) {
+    OSStatus err;
+    KeyboardLayoutRef currentKeyboard;
+    const void* currentKeyboardResID;
+  
+    err = fpKLGetCurrentKeyboardLayout(&currentKeyboard);
+
+    if (err == noErr) {
+      err = fpKLGetKeyboardLayoutProperty(currentKeyboard, kKLIdentifier,
+					   &currentKeyboardResID);
+      if (err == noErr) {
+	 *aIsRTL = IsRTLLangauge((SInt32)currentKeyboardResID);
+	 rv = NS_OK;
+      }
+    }
+  }
+
-   return NS_OK;
+  return rv;

Otherwise, the code looks good.
Attachment #163955 - Flags: review?(jhpedemonte) → review+
Comment on attachment 163955 [details] [diff] [review]
patch


bz?
I've still got 4 reviews in my queue that were requested before this one and
this code is really not something I know well, so I would need some time to
review this....

I'll try to get to this within the next 3-4 days, but it may not happen.
Comment on attachment 163955 [details] [diff] [review]
patch

>Index: widget/src/mac/nsBidiKeyboard.cpp
>+  // Check if the resource id is BiDi associated (Arabic, Persion, Hebrew)
>+  // (Persion is included in the Arabic range)

"Persian", not "Persion".

sr=bzbarsky. Sorry this took so long... :(
Attachment #163955 - Flags: superreview?(bzbarsky) → superreview+
Attached patch patch for checkin (obsolete) (deleted) — Splinter Review
thanks for reviews.
Attachment #163955 - Attachment is obsolete: true
Attached patch patch for checkin (deleted) — Splinter Review
err, wrong diff.
Attachment #167216 - Attachment is obsolete: true
Patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Verified with 1.8a6/20041215.

Thanks Asaf!

Prog.
Status: RESOLVED → VERIFIED
No longer blocks: 276367
Component: XP Toolkit/Widgets → Widget: Mac
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: