[webkit-help] Can't get the render style via hit test?

eacanhe eacanhe at qq.com
Sun Jan 16 18:03:50 PST 2011

Hi, all
Here I got a problem.
When I get the clicked node via hitTestResultAtPoint func:
    WebCore::HitTestResult result = pFrame->eventHandler()->hitTestResultAtPoint(
        false, /*allowShadowContent*/ 
        true); /*ignoreClipping*/

And from the object "result", I wanna get the z-index of the "reusle" node:
    WebCore::Node* hitNode = result.innerNode();
    WebCore::Node* hitNonSharedNode = result.innerNonSharedNode();
    int hitZ = hitNode->renderStyle()->zIndex();
    int hitNonSharedZ = hitNonSharedNode->renderStyle()->zIndex();

But, no matter where i click,  the obj "hitZ" and "hitNonSharedZ" are zero.

Is  there something wrong? Some one can tell me how can I get the z-index of the node I Click on.

Any help appreciated. :D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20110117/a484940c/attachment.html>

More information about the webkit-help mailing list