Bug 78165
Summary: | Calling RenderBox::absoluteQuads on RenderSVGRoot returns incorrect values when zoom or viewbox is involved | ||
---|---|---|---|
Product: | WebKit | Reporter: | Max Vujovic <mvujovic> |
Component: | SVG | Assignee: | Max Vujovic <mvujovic> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | krit, zimmermann |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 78037 | ||
Bug Blocks: |
Max Vujovic
RenderSVGRoot applies its local transform on itself when calling RenderBox::absoluteQuads. This happens in RenderSVGRoot::mapLocalToContainer.
The call hierarchy is:
RenderBox::absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
RenderObject::localToAbsoluteQuad(const FloatQuad& quad, bool fixed = false, bool* wasFixed = 0) const
RenderObject::localToContainerQuad(const FloatQuad&, RenderBoxModelObject* repaintContainer, bool fixed = false, bool* wasFixed = 0) const;
RenderSVGRoot::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
absoluteQuads takes in a quad with the size of the SVG root element in screen space, after page zoom.
mapLocalToContainer then transforms the quad by RenderSVGRoot's m_localToBorderBoxTransform, which contains the zoom transform and the viewbox transform. See RenderSVGRoot::buildLocalToBorderBoxTransform.
Note that both getBoundingClientRect and the inspector highlight on SVG root elements rely on absoluteQuads to do their job. Links to related bugs are under the "Blocks:" field.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Nikolas Zimmermann
Is this bug fixed as well, now?
Max Vujovic
(In reply to comment #1)
> Is this bug fixed as well, now?
Yes, after bug 78037, this bug should be fixed.