W3C home > Mailing lists > Public > public-cdf@w3.org > September 2007

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

From: Timur Mehrvarz <timur.mehrvarz@web.de>
Date: Mon, 17 Sep 2007 19:05:12 +0200
Message-Id: <853D5746-CB99-449A-848B-C7948B1E3E78@web.de>
Cc: public-cdf@w3.org, VF-Group Piepel Lars <Lars.Piepel@vodafone.com>
To: Maciej Stachowiak <mjs@apple.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:41 GMT