Closed Bug 915079 Opened 8 years ago Closed 8 years ago
composition text should be underlined on Firefox OS devices
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.
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 #808270 - Flags: review?(masayuki) → review+
Masayuki, thank you.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.