[Webkit-unassigned] [Bug 37788] InlineTextBox::paint() ignores the color property in rendering composition text.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 27 19:24:48 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37788





--- Comment #6 from Hironori Bono <hbono at chromium.org>  2010-05-27 19:24:45 PST ---
Ojan,

Thank you for your comments. Probably my description for this issue was not so good. Sorry for my stupid description.

I would like to clarify one point before answering your questions: Windows Chrome DOES renders the IME selection text. Just we cannot see it because Windows Chrome renders it ALWAYS IN WHITE. (In fact, we can see it when we change the background color of the <input> element.)

(In reply to comment #5)
> CCing some people who've worked on this code before and removing the Chromium bit since it happens on Safari Windows as well.
> 
> Do you know why this bug only happens on Windows? On Mac, the marked text gets selected, but there's no visual indication of it.
>
> I don't see that there's a platform convention on Windows or Mac for selected, marked text, since no platform lets a user select it. I'm not a regular IME user though, so maybe there is some convention I'm missing.

You are right. there are not any platform convention for rendering the IME-selection text, and Windows Chrome DOES render the IME-selection text as I written above. That is, this issue is not the one whether or not to render an IME-selection text, but the one of picking up the color used for rendering an IME-selection text.

As you know, each platform uses its own color theme: RenderThemeMac for Mac Safari (and Chrome), RenderThemeChromiumWin for Windows Chrome, etc. When InlineTextBox::paint() renders the IME-selection forground, it calls RenderTheme::activeSelectionForegroundColor() via RenderObject::selectionForegroundColor(). This RenderTheme::activeSelectionForegroundColor() calls RenderThemeChromiumWin::platformActiveSelectionForegroundColor() on Windows. On the other hand, it returns an invalid color on Mac because RenderThemeMac::supportsSelectionForegroundColors() returns false.

> The only way you can get selected IME text in WebKit is when the selection is set via JavaScript, right?

As writen in Bug 31502, Editor::setComposition() also causes this issue. (Even though Chrome uses a workaround to avoid this issue, it causes Bug 31502.)

> It seems like we should render a normal selection background there. I wonder if we should confirm composition text when you set the selection as well.

Even though I'm wondering if I understand this comment correctly, I filed this issue because WebKit renders an IME-text background in the TEXT-BACKGROUND color even though it renders this IME text in the SELECTION-FOREGROUND color. (From the point of consistency, when a text background is rendered in a text-background color, its text foreground should be rendered in a text-foreground color. Even though this text is an IME text, I assume it is true, right?)

Finally, I don't have any intention to push this patch and it's up to you whether or not to fix this issue because I'm losing confidence of continuing my WebKit work.

Regards,

Hironori Bono

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list