[Webkit-unassigned] [Bug 110375] Add client callbacks to notify of changes of associated from controls

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 22 18:50:06 PST 2013


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





--- Comment #47 from Ryosuke Niwa <rniwa at webkit.org>  2013-02-22 18:52:28 PST ---
(From update of attachment 189650)
View in context: https://bugs.webkit.org/attachment.cgi?id=189650&action=review

>>>> Source/WebCore/html/FormAssociatedElement.cpp:281
>>>> +      element->document()->frame()->editor()->client()->didAssociateInput(element);
>>> 
>>> Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
>> 
>> This is going to spam you with notifications and also means you have tons of timers. This isn't the approach you want. Instead you want to collect in a HashSet (or ListHashSet) all the Elements that have changed and then give a batch notification to the client.
>> 
>> didAssociateFormControls(HashSet<Element>) or some such.
> 
> Assuming we still don't want to increase the size of an HTMLFormElement or formAssociatedElement, this would be a HashSet (or ListHashSet) that's kept in the document, and then presumably we'd call a method on document from somewhere in here that would be something like document()->didAssociateInput(element), which in turn keeps track of the set, and also sets its timer (or resets, if it's already set) to fire after some small number of milliseconds which will pass everything so far accumulated onto the EditorClient. Have I understood that correctly?

Yes, but please don't use EditorClient for this purpose.

By the way, it might make sense to create a new client interface that encompasses auto-completion/spellchecking related callbacks such as this one and existing ones on ChromeClient/Editor Client. But that's probably outside of the scope of this patch.

-- 
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