[webkit-dev] AbsoluteClippedOverflowRect return empty IntRect

tonikitoo (Antonio Gomes) tonikitoo at gmail.com
Tue Mar 23 13:26:12 PDT 2010


Hi Simon.

That was my thought. Thank you for confirming.

On Tue, Mar 23, 2010 at 2:54 PM, Simon Fraser <simon.fraser at apple.com> wrote:
> On Mar 23, 2010, at 11:38 AM, tonikitoo (Antonio Gomes) wrote:
>
>> Hey all.
>>
>> I am facing a strange issue while trying to the get repaintable rect
>> of a given Node* object. In my code I am doing something like:
>>
>> (...)
>> ASSERT(node);
>> node->renderer()->absoluteClippedOverflowRect();
>> (...)
>>
>> , where "node" is a valid reference to an <a> in the following simple
>> html sample in http://pastebin.ca/1850582 (see id="it").
>>
>> In the sample, "node" is an offscreen anchor in a scrollable <div>,
>> and calling absoluteClippedOverflowRect returns an empty IntRect to
>> me. If I scroll until it (the node whose id is "it") gets visible, and
>> then trigger my snippet code above it returns a valid value. Also, by
>> doing static_cast<Element*>(node)->getRect() I get the same valid rect
>> returned.
>>
>> I am wondering if it is an expected behavior or a bug?
>
> Given the "clipped" in the name of absoluteClippedOverflowRect(), this is expected behavior.
> absoluteClippedOverflowRect() is used for repainting, and there's no point repainting something
> that is scrolled out of view.
>
> Simon
>
>



-- 
--Antonio Gomes


More information about the webkit-dev mailing list