Opened 13 months ago

Last modified 3 weeks ago

#9569 new bug

[WebKit] claims to support SVG but doesn't

Reported by: waddlesplash Owned by: leavengood
Priority: normal Milestone: R1
Component: Applications/WebPositive Version: R1/alpha4.1
Keywords: Cc: ajcsweb@…
Blocked By: Blocking: #10721
Has a Patch: no Platform: All

Description

NOTE: I am posting this here because http://webpositive.haiku-os.org/ is down.

Example: open http://defi.ant.ly/2011/06/inline-svg-experiment/ and scroll down. Where it says "Free Tomatoes" with a bunch of dates, there is supposed to be an inline SVG graph. Web+ shows nothing

If you go to http://html5test.com, "SVG in text/html" has "Yes" on it.
CSS3 gradients are also claimed to be supported (and attempt to be drawn, see background on http://html5test.com) but eat time to render and are not displayed properly. Perhaps it's time that WebKit for Haiku gets an update?

Change History (7)

comment:1 Changed 13 months ago by waddlesplash

  • Cc ajcsweb@… added

comment:2 Changed 13 months ago by richienyhus

AFAIK http://webpositive.haiku-os.org/ is meant to be in read only/archival mode anyway.

comment:3 Changed 4 months ago by waddlesplash

SVG works in some places, but the above inline SVG link doesn't. I wonder why...?

comment:4 Changed 4 months ago by pulkomandy

I think they work, but our drawing code is missing so much stuff (mostly in the management of transformations) that the SVG renders at the wrong place, possibly out of screen.

comment:5 Changed 4 months ago by X512

It's a good chance to improve native drawing API to support SVG rendering, because it can be used for other applications too.

comment:6 Changed 4 months ago by pulkomandy

Some more details on what's missing: WebKit SVG drawing make use of affine transforms to translate the SVG drawing to the right place on the page. For this to work, we need to implement GraphicsContext::concatCTM in https://github.com/haiku/webkit/blob/rebased/Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp.

This in turn requires arbitrary transformations support in BView, likely using the existing BAffineTransform class for the API. On app_server side, this can be converted into an agg matrix.

We still need to defie how this should be interacting with the existing methods to set the view scale and offset. These could be applied before or after the matrix, or they could modify the matrix instead of working separately. Quick tests with concatCTM also show some unexpected results with regard to clipping. I don't know if an actual implementation on BView side would have similar problems.

comment:7 Changed 3 weeks ago by pulkomandy

  • Blocking 10721 added

(In #10721) Duplicate indeed, these are SVG images and we still lack some support for that.

Note: See TracTickets for help on using tickets.