Re: CDRF and WICD profiles are Candidate Recommendations, Call for Implementations

On 12.09.2007, at 10:58, Maciej Stachowiak wrote:

>> I was able to modify the current Safari 3.02 browser (actually  
>> it's Webkit rendering engine), for it to support "WICD Rightsizing".
>>
>
> Out of curiosily, what kind of changes were needed?
>
>  - Maciej

Sorry for the late response. It's a while back, since I looked into  
this. But basically, this is what I did.

The HTML parent object element needs to be made aware of the aspect  
ratio of the embedded SVG child, as expressed by it's viewbox. So I  
modified method setViewBox() in WebCore/rendering/ 
RenderSVGContainer.cpp, for it to call node->document()->frame()- 
 >ownerRenderer()->setIntrinsicSize() - I do so only, if ownerRenderer 
() exist - and I provide it with the values of viewBox.width() and  
viewBox.height(). Then I modified method calcReplacedHeightUsing() in  
WebCore/rendering/RenderBox.cpp, so that it makes use of it's newly  
gained knowledge about the child's aspect ratio. This way, SVG  
children are not anymore shown in a fix 300 x 150 px box.

SVG children can now, for example, be embedded with a width, that is  
relative to their destination box. And their final height will be  
calculated, based on the relative width and their intrinsic aspect  
ratio.

My bug report and my patch are attached below.

Timur

http://bugs.webkit.org/show_bug.cgi?id=14793

Received on Monday, 17 September 2007 17:06:29 UTC