Bug 34703

Summary: All SVG *-expected.txt files contain wrong results
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, krit, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Initial patch
krit: review+
LayoutTests: expected.txt changes (compressed)
krit: review+
LayoutTests: expected.png changes krit: review+

Description Nikolas Zimmermann 2010-02-08 04:57:01 PST
Most DRT results for SVG are wrong and not reliable. This is because we're not dumping meaningful information like absoluteClippedOverflowRect(), but instead use the absoluteTransform() legacy code, to map the repaintRectInLocalCoordinates() through that wrong and not CSS-aware rectangle. absoluteTransform() needs to die, and it's only used by DRT & SVGPaintServerGradient (for Cg gradient-on-text support).

It turns out to be easy fixable, all we need is proper overflow clipping for RenderSVGRoot -> SVG has _special_ rules on initial clipping paths that _differ_ from CSS overflow handling rules. If we respect them properly, and do the right transformations between SVG-world (RenderSVGRoot children) and CSS Box-world (RenderSVGRoot parent objects, if any in a non-standalone SVG document) the absoluteClippedOverflowRect() for all objects is magically right, and finally repaint rects seem fixed across all boundaries. Thanks to Erics early ground-breaking integration work :-)

As side effect, it's a matter of 2 LOC to fix the looong standing: SVG does not display scrollbars problem, which will be done in a follow-up patch.
Comment 1 Nikolas Zimmermann 2010-02-08 05:45:03 PST
Created attachment 48329 [details]
Initial patch

Not including LayoutTests changes, will upload them compressed, as it's over 5mb.
Comment 2 Nikolas Zimmermann 2010-02-08 05:50:15 PST
Created attachment 48330 [details]
LayoutTests: expected.txt changes (compressed)
Comment 3 Nikolas Zimmermann 2010-02-08 05:52:32 PST
Created attachment 48331 [details]
LayoutTests: expected.png changes
Comment 4 Dirk Schulze 2010-02-08 05:53:36 PST
Comment on attachment 48329 [details]
Initial patch

Greak work Niko. I hope you checked every single test ;-)
Comment 5 Dirk Schulze 2010-02-08 06:09:43 PST
Comment on attachment 48330 [details]
LayoutTests: expected.txt changes (compressed)

lgtm
Comment 6 Dirk Schulze 2010-02-08 06:10:34 PST
Comment on attachment 48331 [details]
LayoutTests: expected.png changes

lgtm
Comment 7 Nikolas Zimmermann 2010-02-08 06:34:40 PST
Landed in r54483. Waiting for bot results...
Comment 8 Nikolas Zimmermann 2010-02-08 09:34:10 PST
Landed the last fix in r54492 - baselines are properly updated for all platforms.