Bug 18796 - SMIL SVG color animation fails on ARM
Summary: SMIL SVG color animation fails on ARM
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2008-04-29 00:53 PDT by Alp Toker
Modified: 2012-05-20 13:56 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alp Toker 2008-04-29 00:53:22 PDT
This issue was noticed using the GTK+ port on the N810 internet tablet when trying the W3 Web Compatibility Test for Mobile Browsers: http://dev.w3.org/2008/mobile-test/test.html

I suspect this issue is /not/ port-specific so am looking for advice from the SMIL guys and perhaps iPhone porting team or anyone familiar with cross-platform issues. It could be related to floating point precision or alignment differences, if I had to guess.

I imagine the issue could be in the SMIL code SVG code, or possibly in the Cairo graphics backend.

cross compiled using Scratchbox gcc 3.4.4 
JavaScriptCore compiled with -O3 and -fstrict-aliasing

Issue:

Test 9 (the bottom left square) tests an SVG animation of a fill colour from red to green:

http://dev.w3.org/2008/mobile-test/redtogreen.svg

<animateColor attributeName="fill"
           from="red" to="green"
            dur="1s" fill="freeze" />

On x86, the animation goes from red to green over the period of one second as expected.

On the device, the square ends up a shade of dark red, which is precisely half way between green and red.

Further investigation shows that the animation stops having an effect half way through the specified duration -- so a 10 second animation from black to white would result in a 50% gray shade after 5 seconds and never get any further.

We threw in some debug printfs which show that the timers continue firing after the first half of the animation but for some reason the colour being animated ceases to change after the duration reaches half time.

This is reproducible around r32672 and TOT.
Comment 1 Alp Toker 2008-05-04 07:48:25 PDT
Did a bit more debugging. Other types of SVG animation work fine so it's looking more like the issue may be in ColorDistance.cpp or in the Cairo backend's colour code.

It'll be worth trying a build without optimisations/strict aliasing enabled in JavaScriptCore/wft to see if that helps (though JS isn't used for SVG animations, WTF templates are still used). Any more success/error reports from ARM port developers would be helpful in the meantime.
Comment 2 Nikolas Zimmermann 2012-05-19 17:24:49 PDT
Alp, is this still an issue?
Comment 3 Alp Toker 2012-05-20 11:32:47 PDT
Hi Niko,

I don't think this is a problem any more. Not sure why it didn't work then, let's close this?
Comment 4 Nikolas Zimmermann 2012-05-20 13:56:34 PDT
Fine with me, if we still see issues we can reopen it.