[Webkit-unassigned] [Bug 141725] Non root <svg> element inherits the container size as its viewport instead of inheriting the container viewport

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 2 20:27:31 PST 2015


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

--- Comment #7 from Said Abou-Hallawa <sabouhallawa at apple.com> ---
I was wrong about the cause of this bug. The viewBox has nothing to do with the size or the viewport of the <svg> element. The problem is in calculating the viewport of the non-root <svg> element. It inherits the container <svg> element size instead of its viewport. I attached new test cases. The bug happens with the first test case: "Test case -- SVG root size different from CSS size". 

In this test case we have the following CSS:
    svg {
      width: 32px;
      height: 32px;
    }

And we have the root <svg> element has the following definition:
     <svg width='50' height='50'>

And we have a non-root <svg> element has the following definition:
     <svg viewbox='0 0 14 14'>

The root <svg> element has the size = {50, 50} but a viewport = {32, 32}

The non-root <svg> inherits the container <svg> size when calculating its viewport. So its viewport = {50, 50}. And this is why the arrow is clipped in the first test case.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150303/9f53077f/attachment-0002.html>


More information about the webkit-unassigned mailing list