[webkit-dev] Zoom functionality

David Hyatt hyatt at apple.com
Mon Oct 6 23:25:34 PDT 2008


On Oct 7, 2008, at 1:22 AM, Pradnya Pathak wrote:

> Hello All,
>
> Does anyone has idea about if the 'zoom factor' style is inherited  
> from parent of a node? can a node  have different zoom factor than  
> its parent?

It can yes.  zoom is multiplicative so if a parent has a zoom of 2 and  
a child has a zoom of 3, the content within the child would have a  
cumulative zoom factor of 6.  style()->zoom() holds the zoom factor  
specified on an element, while style()->effectiveZoom() will tell you  
the cumulative zoom factor.

zoom can also take a special value, reset, which can be used to ignore  
your ancestor zoom factor, thus resetting you back to an effective  
zoom of 1.0.

dave
(hyatt at apple.com)



More information about the webkit-dev mailing list