Closed Bug 113161 Opened 23 years ago Closed 19 years ago

Color/background-color of preedit string is always default(we should not use invert)

Categories

(Core :: Internationalization, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: kazhik, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

(Keywords: inputmethod, intl)

Attachments

(2 files, 9 obsolete files)

Color/background-color of preedit string is always default color.

<style>
textarea,input {
   background-color:#909090;
   color:#ffffff;
}
</style>

In textarea or input with this style, color/background-color of preedit 
string should be changed from default.

Original report in Bugzilla-jp:
http://bugzilla.mozilla.gr.jp/show_bug.cgi?id=1540
I'm not very familiar with Linux nor Mac IME APIs. 
so cc'ing shanjian and nhotta.


Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.8
Target Milestone: mozilla0.9.8 → mozilla1.0.1
please put a test cases here.
Attached file Testcase
Summary: Color/background-color of preedit string is always default → Color/background-color of preedit string is always default(we should not use invert)
Assignee: yokoyama → masayuki
Status: ASSIGNED → NEW
QA Contact: teruko → amyy
Target Milestone: mozilla1.0.1 → ---
Status: NEW → ASSIGNED
Keywords: intl
Target Milestone: --- → mozilla1.9alpha
Priority: P3 → P1
Attached patch Patch rv1.0 (obsolete) — Splinter Review
Attachment #202062 - Flags: superreview?(roc)
Attachment #202062 - Flags: review?(roc)
Comment on attachment 202062 [details] [diff] [review]
Patch rv1.0

Sorry. This patch has warning message.
Attachment #202062 - Flags: superreview?(roc)
Attachment #202062 - Flags: review?(roc)
Attachment #202062 - Flags: review-
Attached patch Patch rv1.1 (obsolete) — Splinter Review
Attachment #202062 - Attachment is obsolete: true
Attachment #202064 - Flags: superreview?(roc)
Attachment #202064 - Flags: review?(roc)
This patch uses the system IME composition string color in nsTextFrame.cpp.
And this removes dirty non-XP code from |PaintTextDecorations|.
And this fixes both this and bug 170951.
The code that converts foreColor and lineColor should be factored out into its own function.

The per-IME-index values should be a single array of structs.

Other than that it looks pretty good!
Attachment #202064 - Flags: superreview?(roc)
Attachment #202064 - Flags: review?(roc)
Attachment #202064 - Flags: review-
Attached patch Patch rv1.2 (obsolete) — Splinter Review
Attachment #202064 - Attachment is obsolete: true
Attachment #202780 - Flags: superreview?(roc)
Attachment #202780 - Flags: review?(roc)
Comment on attachment 202780 [details] [diff] [review]
Patch rv1.2

Sorry.
Attachment #202780 - Flags: superreview?(roc)
Attachment #202780 - Flags: review?(roc)
Attached patch Patch rv1.2 (obsolete) — Splinter Review
Attachment #202780 - Attachment is obsolete: true
Attachment #202781 - Flags: superreview?(roc)
Attachment #202781 - Flags: review?(roc)
Off-Topic: Masayuki, this latest Bugzilla version automatically cancels pending review requests when you mark the patch as obsolete, so no need to manually remove review requests if you're going to mark it as obsolete anyway.
Caleb: Thank you.
Comment on attachment 202781 [details] [diff] [review]
Patch rv1.2

Sorry. I don't like this patch. There is no reason for using index of array. We should use pointer for the struct instead.
Attachment #202781 - Flags: superreview?(roc)
Attachment #202781 - Flags: review?(roc)
Attachment #202781 - Flags: review-
Attached patch Patch rv1.3 (obsolete) — Splinter Review
Attachment #202781 - Attachment is obsolete: true
Attachment #202950 - Flags: superreview?(roc)
Attachment #202950 - Flags: review?(roc)
Attached patch Patch rv1.3.1 (obsolete) — Splinter Review
Attachment #202950 - Attachment is obsolete: true
Attachment #202951 - Flags: superreview?(roc)
Attachment #202951 - Flags: review?(roc)
Attachment #202950 - Flags: superreview?(roc)
Attachment #202950 - Flags: review?(roc)
Attached patch Patch rv1.4 (obsolete) — Splinter Review
Attachment #202951 - Attachment is obsolete: true
Attachment #202952 - Flags: superreview?(roc)
Attachment #202952 - Flags: review?(roc)
Attachment #202951 - Flags: superreview?(roc)
Attachment #202951 - Flags: review?(roc)
Why not just have GetIMEColor do the initialization if it hasn't been done already, instead of forcing its callers to check that?
Attached patch Patch rv1.5 (obsolete) — Splinter Review
Attachment #202952 - Attachment is obsolete: true
Attachment #203495 - Flags: superreview?(roc)
Attachment #203495 - Flags: review?(roc)
Attachment #202952 - Flags: superreview?(roc)
Attachment #202952 - Flags: review?(roc)
Comment on attachment 203495 [details] [diff] [review]
Patch rv1.5

Oops. This may make bustage with VC6.
Attachment #203495 - Flags: superreview?(roc)
Attachment #203495 - Flags: review?(roc)
Attachment #203495 - Flags: review-
Attached patch Patch rv1.6 (obsolete) — Splinter Review
Attachment #203495 - Attachment is obsolete: true
Attachment #203496 - Flags: superreview?(roc)
Attachment #203496 - Flags: review?(roc)
+  if (aIMEColor->mInit)
+    return PR_TRUE;
+

Just assert !aIMEColor->mInit. The only caller guarantees this.

+nsTextPaintStyle::Get40PercentColor(nscolor aForeColor, nscolor aBackColor)

Make it a static helper function or just move it up to the caller.

+  if (!mInit && mTypes) {

mTypes is guaranteed to be non-null here. Remove the check.

+
   mInit = PR_TRUE;

Move this up inside the if block.

+  // if this retrun

"return"
Attached patch Patch rv1.7Splinter Review
Attachment #203496 - Attachment is obsolete: true
Attachment #203751 - Flags: superreview?(roc)
Attachment #203751 - Flags: review?(roc)
Attachment #203496 - Flags: superreview?(roc)
Attachment #203496 - Flags: review?(roc)
Attachment #203751 - Flags: superreview?(roc)
Attachment #203751 - Flags: superreview+
Attachment #203751 - Flags: review?(roc)
Attachment #203751 - Flags: review+
checked-in. Thank you!
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
No longer blocks: 292191
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: