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").
On Oct 19, 2011 4:39 AM, "Sanjeet Pratap Singh" <
sanjeetpratapsingh at gmail.com> wrote:
> 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.
> On Mon, Oct 17, 2011 at 7:33 PM, Antonio Gomes <tonikitoo at gmail.com>wrote:
>> 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
>>> 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,
>>> webkit-dev mailing list
>>> webkit-dev at lists.webkit.org
>> --Antonio Gomes
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev