composition text should be underlined on Firefox OS devices

RESOLVED FIXED

Status

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: xyuan, Assigned: xyuan)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

When Luke tests the setComposition method of the InputContext API, he found no underline style was applied to the composition text.

The screenshort: https://bugzilla.mozilla.org/attachment.cgi?id=802794
`nsLookAndFeel::GetIntImpl` doesn't set the style of composition text in the file mozilla-central/widget/gonk/nsLookAndFeel.cpp.  That seems to be the cause.
(In reply to Yuan Xulei [:yxl] from comment #1)
> `nsLookAndFeel::GetIntImpl` doesn't set the style of composition text in the
> file mozilla-central/widget/gonk/nsLookAndFeel.cpp.  That seems to be the
> cause.

Yes, it must be so.
Posted patch WIP.patch (obsolete) — Splinter Review
I made some changes to widget/gonk/nsLookAndFeel.cpp. I can change the composition text color, but still cannot add the underline style...
Assignee: nobody → xyuan
Status: NEW → ASSIGNED
Attachment #803734 - Flags: feedback?(masayuki)
Comment on attachment 803734 [details] [diff] [review]
WIP.patch

Well, looks like there is no nsXPLookAndFeel::GetFloatImpl() on Gonk. You need to return 1.0f for eFloatID_IMEUnderlineRelativeSize. If the value is 2.0f, the underline width becomes twice as normal underline. Perhaps, eFloatID_SpellCheckerUnderlineRelativeSize should be implemented too.

BTW,

> +        case eIntID_IMERawInputUnderlineStyle:
> +        case eIntID_IMEConvertedTextUnderlineStyle:
> +            aResult = NS_STYLE_TEXT_DECORATION_STYLE_SOLID;

I like non-solid style better for it, though. But I'm not sure which style is major on other mobile platforms.

Anyway, I'll file a bug for adding API which allows IME to customize each clause style.
Attachment #803734 - Flags: feedback?(masayuki) → feedback+
With nsXPLookAndFeel::GetFloatImpl() implemented, it works.
Attachment #803734 - Attachment is obsolete: true
Attachment #808270 - Flags: review?(masayuki)
Masayuki, thank you.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7f46781f97a1
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.