Closed Bug 915079 Opened 11 years ago Closed 11 years ago

composition text should be underlined on Firefox OS devices

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: xyuan, Assigned: xyuan)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached patch WIP.patch (obsolete) (deleted) — 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+
Attached patch underline style v1 (deleted) — Splinter Review
With nsXPLookAndFeel::GetFloatImpl() implemented, it works.
Attachment #803734 - Attachment is obsolete: true
Attachment #808270 - Flags: review?(masayuki)
Attachment #808270 - Flags: review?(masayuki) → review+
Masayuki, thank you.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: