[Webkit-unassigned] [Bug 64823] <svg> fails to use explicit width and height inside <html> inside IFRAME

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 17 12:33:32 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=64823





--- Comment #11 from Nikolas Zimmermann <zimmermann at kde.org>  2011-10-17 12:33:32 PST ---
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #6)
> > > Are there any known workarounds for this issue?
> > A workaround is to use <svg width="100" height="100"> instead of style="width:100px; height:100px" if that helps you in the meanwhile.
This was about the attached testcase, maybe I was wrong.

> 
> This workaround doesn't work: http://jonnew.com/js/svgIframe.html
> 
> Have you had a chance to look into this? The bug is blocking a good bunch of people, preventing them from delivering excellent user experience to the world.
Yes, just looked at it and the problem is pretty obvious:

LayoutUnit RenderSVGRoot::computeReplacedLogicalWidth(bool includeMaxWidth) const
{
    LayoutUnit replacedWidth = RenderBox::computeReplacedLogicalWidth(includeMaxWidth);
    Frame* frame = node() && node()->document() ? node()->document()->frame() : 0;
    if (!frame)
        return computeIntrinsicWidth(replacedWidth);

    // If our frame has an owner renderer, we're embedded through eg. object/embed.
    RenderPart* ownerRenderer = frame->ownerRenderer();
    if (!ownerRenderer)
        return computeIntrinsicWidth(replacedWidth);
...

The size negotiation in RenderSVGRoot should only be done if we're embedded standalone eg. <iframe src="foo.svg"> not for a <svg> renderer inside an embedded html!

I don't have a chance to fix it today, but maybe within the next days - or someone else can look into it using that information, it's easy to fix, we just have to differentiate if we're standalone in the embedded doc or not.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list