[Webkit-unassigned] [Bug 49523] IME candidate characters inserted unexpectedly to textarea which listens compositionupdate event on Chromium

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 6 07:57:21 PST 2010


--- Comment #9 from Ryosuke Niwa <rniwa at webkit.org>  2010-12-06 07:57:20 PST ---
(From update of attachment 73868)
View in context: https://bugs.webkit.org/attachment.cgi?id=73868&action=review

(In reply to comment #8)
> I'm not even sure if this is a bug (same about bug 46868). Changing style in a sync event handler is just an invitation for trouble.
> The general direction has been to not dispatch synchronous event during DOM manipulation, and perhaps we just shouldn't dispatch compositionupdate synchronously (or at all).

Unlike DOM mutation events which could fire in the middle of executing editing commands, IME composition events are fired per user actions.  
So I don't think it'll cause too much trouble for us even it fired synchronously just like keydown or mousedown although we must be extremely careful when to fire them.

> LayoutTests/platform/chromium/fast/text/chromium-duplicate-ime-composition.html:1
> +<html>

Why is this test under chromium?  I can reproduce the same issue on WebKit r72487.  Shouldn't we test it on all platforms?

> WebCore/editing/Editor.cpp:-1601
> -    // Updates styles before setting selection for composition to prevent
> -    // inserting the previous composition text into text nodes oddly.
> -    // See https://bugs.webkit.org/show_bug.cgi?id=46868
> -    m_frame->document()->updateStyleIfNeeded();
> -

I don't quite get why this change is correct.  Could you at least explain why you're removing this?  Because as far as I checked, we don't always call deleteTextFromNode when we call setComposition.  I want to know why moving this layout update as supposed to adding another one in replaceTextInNode is correct.

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