[Webkit-unassigned] [Bug 46296] Add more functionality in WebView interface for currently focused elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 4 09:07:02 PDT 2010


--- Comment #7 from Varun Jain <varunjain at chromium.org>  2010-10-04 09:07:01 PST ---
(In reply to comment #6)
> (In reply to comment #0)
> > Adding two methods to the WebView interface:
> > 1. method to check if currently focused node is a textfield or
> > other types of input element. This is required by the renderer
> > to take appropriate action. For example, on touch devices, if the
> > focused node is a textfield, we may want to invoke an on-screen
> > keyboard.
> It sounds like this should be accomplished by observing a client notification from WebKit.  WebViewClient already has a textFieldDidBeginEditing notification.  Is that not sufficient?

In my latest patch, I am accomplishing this by observing client notification in RenderView::focusedNodeChanged. This change is in the related Chromium CL that you can see here: http://codereview.chromium.org/3474007

However, to take into account all text-input elements, I need the API extention to WebNode to determine if the newly focused node is a textfield, textarea or content editable div.

the notification that you have suggested (textFieldDidBeginEditing) seems to be textfield specific as it is defined to work with HTMLInputElement. It will require significant API changes to both WebInputElement and WebViewImpl to make it work for textareas and content editable divs. In contrast, my change adds a couple of methods to WebNode which expose a little more information about the underlying WebCore::Node (which should have been exposed anyways). Is there a specific reason why you would not want those two methods in WebNode?

> > 2. method to inform the renderer to scroll the currently focused
> > element into view, for instance, when it is hidden due to window
> > resizing.
> This seems like a reasonable addition.

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