Bug 12309 - SVG hits an assertion when svg container has x/y offset
Summary: SVG hits an assertion when svg container has x/y offset
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://croczilla.com/svg/samples/opac...
Keywords: NeedsReduction
Depends on:
Blocks:
 
Reported: 2007-01-18 00:18 PST by Oliver Hunt
Modified: 2007-01-18 17:18 PST (History)
0 users

See Also:


Attachments
remove asserts (1.43 KB, patch)
2007-01-18 16:54 PST, Eric Seidel (no email)
mrowe: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2007-01-18 00:18:59 PST
The linked xml file contains an svg that at some point seems to get x,y offsets applied to an svg container that is not the root element
Comment 1 Eric Seidel (no email) 2007-01-18 16:52:41 PST
Ok, we should just remove those asserts.

It turns out the when the root <svg> is translated in html (in a flow for example), it will pass this translation along to it's kids through the tx, ty calls, due to this implementation of RenderBox:

void RenderBox::paint(PaintInfo& paintInfo, int tx, int ty)
{
    tx += m_x;
    ty += m_y;

    // default implementation. Just pass paint through to the children
    PaintInfo childInfo(paintInfo);
    childInfo.paintingRoot = paintingRootForChildren(paintInfo);
    for (RenderObject* child = firstChild(); child; child = child->nextSibling())
        child->paint(childInfo, tx, ty);
}

We could also just use our own kid-painting code.
Comment 2 Eric Seidel (no email) 2007-01-18 16:54:12 PST
Created attachment 12546 [details]
remove asserts

replace the broken asserts with more helpful comments