[webkit-dev] NeedHelp_In_SpatialNavigation

Ryosuke Niwa rniwa at webkit.org
Mon Oct 24 10:36:08 PDT 2011


Keep in mind that the nearest node is ambigous when the caret is between two
nodes.  It can give you either before or after the caret and each side may
have multiple nodes.  e.g when the caret is between <b>test</b> and
<i>test2</i>, you can get either one of four nodes (b, "test", i, "test2").

- Ryosuke
On Oct 19, 2011 4:39 AM, "Sanjeet Pratap Singh" <
sanjeetpratapsingh at gmail.com> wrote:

> Hi,
> Thanks for Replying...
>
>
> Still i have some doubts ...can you help me to clear them.
>
> 1) When we use spatial navigation, to find the nearest node it traverse DOM
> tree, is that node information can not be retrieved from render tree?
> As per my understanding render tree (after layout) will have the position
> information for each node. So is there any way we can get the nodes
> information of any particular area.
> Please let me know if my understanding is wrong.
>
> 2) If from render tree we can get the nodes according to position then we
> can skip the traversing of whole DOM tree.
>
> 3) Is Spatial navigation is related to Hit testing?
>
>
> I have not start profiling it..but soon ill start and share the result.
>
> Thanks
> Sanjeet
>
> On Mon, Oct 17, 2011 at 7:33 PM, Antonio Gomes <tonikitoo at gmail.com>wrote:
>
>> Hi.
>>
>> As far as I can tell, the whole DOM is traversed every time a movement is
>> going to happen. I've discussed with Yael briefly on the WebKit summit about
>> some cache mechanisms, but we could not get a nice heuristic to invalidate
>> the cache.
>>
>> Have you profiled it?
>>
>> On Mon, Oct 17, 2011 at 7:29 AM, Sanjeet Pratap Singh <
>> sanjeetpratapsingh at gmail.com> wrote:
>>
>>> Hi All,
>>> I am a beginner to WebKit, looking into "*Spatial-Navigation*" feature
>>> of WebKit.
>>> I am looking further for some optimisations in the same.
>>>
>>> I find there "*findFocusCandidateInContainer() "* in which we start
>>> from first child of "container" and iterate until the we get the focus
>>> candidate.
>>>
>>> My question is,"Are we checking the whole DOM tree to find the closest
>>> node or we have a small area(container) accordingly?"
>>>
>>> What does the function*
>>> "container=scrollableEnclosingBoxOrParentFrameForNodeInDirection()"* do?
>>>
>>>
>>>
>>> Waiting for the reply.
>>>
>>> Thanks & Regards,
>>> Sanjeet
>>>
>>> _______________________________________________
>>> webkit-dev mailing list
>>> webkit-dev at lists.webkit.org
>>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>>
>>>
>>
>>
>> --
>> --Antonio Gomes
>>
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20111024/aa0cbaba/attachment.html>


More information about the webkit-dev mailing list