Closed Bug 841036 Opened 8 years ago Closed 8 years ago

Composition should use textfield color

Categories

(Firefox for Android Graveyard :: Keyboards and IME, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 21

People

(Reporter: wesj, Assigned: jchen)

Details

Attachments

(1 file)

Currently the composition text that's written into text fields is always drawn in black. It should match whatever the textfield's text color is set to.

STR:
Open SUMO Mobile
Open the right sidebar by tapping the menu icon
Tap in the search box and type

Results:
If you keyboard supports compositions you'll see black text with a black underline under it

Expected:
White text with a white underline
new TextPaint() defaults to setting the ARGB foreground color to black (0xff000000). If we set it to 0x0, Gecko will use the text field color.
Attachment #714415 - Flags: review?(cpeterson)
Assignee: nobody → nchen
Status: NEW → ASSIGNED
OS: Linux → Android
Hardware: x86 → ARM
Comment on attachment 714415 [details] [diff] [review]
Set default composition color to text field color (v1)

Review of attachment 714415 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM!

::: mobile/android/base/GeckoEditable.java
@@ +374,5 @@
>          }
>          int rangeStart = composingStart;
>          TextPaint tp = new TextPaint();
>          TextPaint emptyTp = new TextPaint();
> +        emptyTp.setColor(0);

Please add a short comment explaining that the color 0 will use Gecko's text field color instead of black.
Attachment #714415 - Flags: review?(cpeterson) → review+
Added comment.

https://hg.mozilla.org/integration/mozilla-inbound/rev/2eec9cb2be86
Target Milestone: --- → Firefox 21
https://hg.mozilla.org/mozilla-central/rev/2eec9cb2be86
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.