The Wayback Machine - https://web.archive.org/web/20110520231037/http://code.google.com/p/android/issues/detail?id=1376
My favorites | Sign in
Project Home Downloads Issues
Issue 1376: Browser doesn't render SVG images
227 people starred this issue and may be notified of changes. Back to list
Status:  FutureRelease
Owner:  c...@android.com
Closed:  Jun 2010


Sign in to add a comment
 
Reported by Highland...@gmail.com, Nov 26, 2008
The built in web browser just shows a broken box for SVG images contained
in a web page.

Comment 1 by project member jbq+legacy@google.com, Dec 15, 2008
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Comment 2 by ctemplet...@gmail.com, Dec 27, 2008
I can not replicate this issue. I am using G1 Running RC30. I have gone to 
http://en.wikipedia.org/wiki/File:Bitmap_VS_SVG.svg and other web pages that have embedded svg graphics and 
I have found that the browser displays them fine.
Comment 3 by Highland...@gmail.com, Feb 12, 2009
What do you get for http://highlandsun.com/hyc/Kazakh/d3/ ? There are 3 SVGs in the
first 2-3 pages, none of them show up on the phone but they all work fine in a
regular browser. Opera on the G1 works too (but Opera doesn't render embedded fonts,
which this page also uses).
Comment 4 by cccandr...@gmail.com, Aug 18, 2009
We have chosen intentionally to not support SVG in the browser to save space; full SVG adds over 1M to the 
webkit image size.
Status: WorkingAsIntended
Owner: c...@android.com
Labels: Component-Browser
Comment 5 by scyta...@gmail.com, Apr 26, 2010
As is described here:
http://googlecode.blogspot.com/2009/10/svg-at-google-and-in-internet-explorer.html

SVG is a really useful technology to have in a mobile browser.  And it is supported
by other mobile devices. 

Perhaps the webkit build can be setup so SVG can be added as a downloadable app to
the built in browser. 
Comment 6 by daca...@gmail.com, Apr 28, 2010
I would like to use the Google Visualization API on an app that I am building. Is there 
some way to do this other than to have the browser support the functionality?  
Comment 7 by cccandr...@gmail.com, Apr 28, 2010
dacarys: I'm not aware of an interactive alternative to SVG. 

We're considering enabling SVG for WebView in a future release, on devices with the memory to support it.
Status: Assigned
Comment 8 by cccandr...@gmail.com, May 24, 2010
(No comment was entered for this change.)
Status: Reviewed
Comment 9 by koansin....@gmail.com, May 28, 2010
Please enable it by default. Yes, it's easy to enable it by "make ENABLE_SVG=true" and modifying 
external/webkit/WebCore/config.h and maybe "external/webkit/WebCore/loader/FrameLoaderClient.h". 
However, if it's not enabled by default, I think few devices will support it. And as discussed above, there is no 
interactive alternative to SVG. 
Comment 10 by jonathan...@gmail.com, Jun 16, 2010
I hate to add a 'me too' comment, but lack of SVG in the Android browser seems like a big missing feature.  

SVG is part of the HTML5 group of technologies, and as such has wide support across a variety of devices and platforms, including things like the Google Chrome browser, and the iPhone Safari browser.  As linked above Google themselves promotes SVG graphics as excellent technology, being open, cross-platform, easily programmable, and accessible, too, so screen-readers can use them.

Finally, my Google Nexus One has 512 MiB of RAM, and a 1 GHz processor.  Having Android tell me it would be too much work for my hardware to render SVG is hard to accept. It's hard to understand a position which says Android shouldn't be a next-generation web-browser platform.
Comment 11 by codedr...@gmail.com, Jun 16, 2010
jonathan.stewart: you may be interested in comment #4 here: http://code.google.com/p/android/issues/detail?id=8202#c4

Can we get consistent status between these two bugs?  Is SVG enabled in the Gingerbread browser now?  Can this bug be closed?
Comment 13 by cccandr...@gmail.com, Jun 22, 2010
SVG has been enabled in a future release, but not necessarily a release called Gingerbread. Sorry for the confusion.
Comment 14 by lwhitm...@gmail.com, Aug 1, 2010
I'd also like this enabled - the possibilities for producing progressive browser-based content are limited without support for SVG.
Comment 15 by Jmartin....@gmail.com, Aug 3, 2010
Hi,
can you tell which Android release SVG will be supported on and when? SVG coupled with Touch events are great for indoor maps web applications, ... which so far work only on iPhone. In the meantime, I show my customers iPhone and Android HTC Dream side-by-side with crystal clear and interactive SVG on iPhone... and poorly rendered bitmaps on Android. What a pity.

Julien

Comment 16 by cccandr...@gmail.com, Aug 16, 2010
Jmartin: sorry, this forum is for reporting bugs and requesting features. I cannot comment on Android's internal engineering schedules.
Comment 17 by project member c...@android.com, Aug 23, 2010
(No comment was entered for this change.)
Owner: c...@android.com
Comment 18 by koansin....@gmail.com, Aug 25, 2010
Although it's said that SVG will be enabled by default in next Android release (GingerBread?), we need to test SVG a bit on Android before we have GingerBread. So we tried to enable it. It turned out pretty easily. Tweaked several lines and "make ENABLE_SVG=true ENABLE_SVG_ANIMATION=true", then you got it. Since SVG will be enabled by default, and it's pretty simple,  we won't bother submit the patch. The attached file is patch against AOSP master
enable-android-webkit-svg.diff
3.2 KB   View   Download
Comment 19 by lwhitm...@gmail.com, Aug 25, 2010
Would it be possible to include a replacement version of the browser with SVG support in the marketplace?
Comment 20 by koansin....@gmail.com, Aug 26, 2010
It's possible, but it may not be what you thought/wanted. The Android browser consists of three main parts: the Brwoser.apk, Java WebKit binding and related in the android.webkit package,  and the underlying C++ WebKit code. The rendering of SVG is the job of the C++ part. And, unfortunately, I don't think it's possible, or say, legal, to make a package to in the marketplace that can replace those C++ WebKit libs under /system/lib. That is, though what we want to have is a slightly tweaked SVG-enabled Android browser, the resulting package might need to have the 3 parts I mentioned.  

BTW, after I enabled SVG,  the Acid3 results changed from 93/100 to 96/100. However, three of the four remaining failed tests are SVG related.  See the attached file, or check http://www.tandroid.org/enable-android-webkit-svg
device.png
95.0 KB   View   Download
Comment 21 by koansin....@gmail.com, Sep 16, 2010
It turned that if all SVG code is enabled properly, the browser will pass all SVG tests. The remaining failed one is CSS media related.

https://review.source.android.com/#change,17258
svg0-device.png
30.6 KB   View   Download
Comment 22 by cvonap...@gmail.com, Sep 21, 2010
SVG is becoming more and more important for web developers, as it is a popular standard now (Only MS Internet Explorer does not support it yet, but in IE9).

People are relying on it, developers as well as web page visitors, as it is much more performant than the HTML5 Canvas, regarding animation. (See http://www.lutanho.net/svgvml3d/index.html for examples of efficient 3D animations).

Comment 23 by atif.mus...@gmail.com, Sep 29, 2010
@koansin.tan
I am new on this forum and also just started android development. I donot know where to find Config.h (external/webkit/WebCore/config.h ) to Enable SVG. Can you pleae explain it Step wise. I am using Samsung galaxy i9000. will be gr8 if you can help.

Comment 24 by nordlig....@gmail.com, Sep 29, 2010
iphone browser and mozilla fennec have svg rendering. so android needs it too
Comment 25 by mbis...@gmail.com, Oct 14, 2010
Interesting that webkit has support compiled out, yet Android device makers bundle in the Adobe SVG Viewer.  How heavy is that?

Please reconsider.  SVG is a longtime friend of open standard rendering that gives us features unavailable in Canvas.
Comment 27 by atif.mus...@gmail.com, Dec 8, 2010
Hi, Can any one please tell me how to edit "external/webkit/WebCore/config.h and maybe "external/webkit/WebCore/loader/FrameLoaderClient.h" Where i can find these two *.h files ?
Comment 28 by koansin....@gmail.com, Dec 8, 2010
@atif.musaddaq

Modifying config.h is not necessary. Please read https://review.source.android.com/#change,17258
However, you need to recompile your WebKit (libwebcore.so). If you don't know to do that, you can
start from http://source.android.com/source/download.html
Comment 29 by uit...@gmail.com, Dec 13, 2010
SVG is about providing Vector Graphics integrated with the DOM. Although faster at rendering 2D graphics, Canvas does not allow to setup DOM events, making it much slower than SVG to render interactive dynamic graphics especially on slower mobile device processors.

Zooming graphics with canvas also renders poorly because the actual result is raster graphics which loose the vector "intelligence" as soon as rendered.

For vector graphics on the Web there are 3 options: Flash, VML and SVG. The only really open standard is SVG. VML is being demoted as SVG will start to replace it gradually starting with IE9. Flash does not integrate with the DOM and will therefore never be a real alternative even it was an open standard.

More and more web application rely on SVG to render graphs and other computer-generated graphics. Popular JavaScript libraries such as Raphael.js and Dojo GFX support SVG and VML and will not support Canvas for the above reasons. jQuery also has an SVG (no VML here) plugin.

The lack of support for SVG on Android is therefore a severe restriction when it comes to modern dynamic user interface design especially when it has been supported on iPhone for years.
Comment 30 by frala...@gmail.com, Dec 16, 2010
For the ones needing SVG support on their androids, Firefox Mobile 4.0b2 (beta) for Android supports SVG.
Comment 31 by dusan.ma...@gmail.com, Dec 17, 2010
Dear Android team, will you give use SVG support for this christmas? In gingerbread?
Comment 32 by treas...@gmail.com, Jan 5, 2011
Please enable SVG support. It is frustrating that I can use SVG for my iphone mobile applications, but they break for android. Seems strange to me and makes my life a little bit more difficult! :)
Comment 34 by justin.s...@gmail.com, Feb 1, 2011
Please add support for SVG!
Comment 36 by lwhitm...@gmail.com, Feb 1, 2011
At least provide another version of the browser in the Marketplace, with SVG enabled.  Surely this should be possible now?
Comment 37 by sonspr...@gmail.com, Feb 1, 2011
Firefox on Android supports SVG, and is available in the Marketplace.
Comment 38 by rektide, Feb 1, 2011
apparently travesty corrected in honeycomb. http://twitpic.com/3vdro4 ye be saved, web loving mortals. 
Comment 40 by cristian...@gmail.com, Feb 9, 2011
I feel mutilated without SVG on Android browser...
 
Comment 41 by rektide, Feb 9, 2011
> I feel mutilated without SVG on Android browser...

it's ok; we're sympathetic.  if this incident has left you with a feeling of shock, know that there are others suffering, and you should seek your local WebApp support group for help and consolation.  

the good news is help & sanity appear to be riding to the rescue; OHA appears to have flipped the ENABLE_SVG bit for honeycomb, & presumably 2.4 will be web compliant as well.
Comment 42 by dusan.ma...@gmail.com, Feb 9, 2011
Given the number of comments on this ticket, and more 200 people starred it, it's really disturbing. How the hell you want to manage some developer community if you fail to explain your reasoning for not 'flipping a switch' sooner. Android is open as long as you wish to make a fork. Thank you very much for your openness
Comment 43 by rektide, Feb 9, 2011
> How the hell you want to manage some developer community if you fail to explain your reasoning for not 'flipping a switch' sooner.

please read the thread. they've explained their reason in comment #4, August 2009 [1]:
> We have chosen intentionally to not support SVG in the browser to save space; full 
> SVG adds over 1M to the webkit image size.

followed up in comment #7, April 28 2010 [2]:
> We're considering enabling SVG for WebView in a future release, on devices with the memory to support it.

[1] http://code.google.com/p/android/issues/detail?id=1376#c4
[2] http://code.google.com/p/android/issues/detail?id=1376#c4

Android is indeed open to a fork, and compiling an Android image with the ENABLE_SVG flag-bit flipped is easy as cake.  That, however, does application developers no good as their target audience is likely to have a manufacturer's build, which will likely follow OHA/Google's lead.

WebView is indeed used many many places in Android.  How about introducing a SvgEnabledWebView application developers can opt in to use?  That way there's no additional memory pressure from unused SVG code in existing cases, and those wishing to build Web Applications have a path forwards?
Comment 44 by dusan.ma...@gmail.com, Feb 9, 2011
You're reading it backwards. It should be vendor's choice to opt-in/out of this feature. But given that the default is 'no you can't have it', how many vendors do you think will enable it? Do you seriously think that Samsung or HTC will opt-in because the memory on their devices is big enough, and then advertise as a feature? Don't think so. I'm familiar with the whole thread, and I don't consider 1MB of storage space as a valid reason (it's 2011). This was mentioned many times by others, but without any response from the team.

As of SvgEnabledWebView, that sounds good to me, although in some other form, we don't want to end up with CanvasEnabledWebView, WebWorkersEnabledWebView etc. Don't try to convince that the team is responsive, it's not.
Comment 45 by defu...@gmail.com, Feb 9, 2011
They can enable it and they would enable it if there was user demand for this feature. They did much crazier things with their ROMs. The trouble is there's little user demand for SVG capability in mobile browser. This silly decision is currently limiting web developers and holding mobile web back. Ironical since Google claimed to have entered the mobile market to liberate the mobile web.

My main reason for wanting SVG in android is because it would make building dpi independent web applications much easier. 
Comment 46 by jimblack...@google.com, Feb 9, 2011
For web applications you have one option which is to advise users install Firefox to use websites that employ SVG.
Comment 47 by dougches...@gmail.com, Feb 9, 2011
Has anyone tried svgweb on android w/ Flash support?
http://code.google.com/p/svgweb/

It's interesting that Google is contributing to a project like svgweb while at the same time limiting svg by not enabling it in android (until honeycomb). 
Comment 48 by sp.shut, Feb 9, 2011
Can anybody tell how to unsubscribe from this thread? :-)

Comment #47 on  issue 1376  by dougches...@gmail.com: Browser doesn't render
SVG images


http://code.google.com/p/android/issues/detail?id=1376
Has anyone tried svgweb on android w/ Flash support?
http://code.google.com/p/svgweb/

It's interesting that Google is contributing to a project like svgweb while
at the same time limiting svg by not enabling it in android (until
honeycomb).
Comment 49 by jeffschi...@google.com, Feb 9, 2011
Just un-star it.  That's what I'm doing right now also.
Comment 50 by cristian...@gmail.com, Feb 9, 2011
Dear all, 
to install another browser is not the option when you want ease of usage (it's years I advise to install another browser to IE6 visitors of my websites... only now in 2011 this goal could be considered to be achieved)...

I consider SVG as one of the key technologies of the next years, SVG is enabled by support on desktop browsers, including the upcoming IE9 which has a good support of it, and on mobile world is well supported by iOS (including SVG animations, which in the future could improve performances over JavaScript based ones if supported by a native implementation).

And from a more personal point of view, this missing feature block portability of my iOS applications to android platform. I don't have (yet) a real android phone, up to now I was working on iPhone confident that under the hood there is still a webkit browser and it would have been easy to make it compatible. I've discovered now this missing feature "Programming the Mobile Web", a wonderful book by Maximiliano Firtman which I suggest to anyone, and I've verified it on a friend of mine Nexus One Phone... I'm installing the Android Emulators to find out even if the last Android versions still don't include SVG... 

Regarding comment 45, this is the place I've chosen to express my "demand for this feature", if there is a better place, please indicate it to me. ;-)
Comment 51 by uit...@gmail.com, Feb 9, 2011
I agree that 1MB cannot be a good reason to keep SVG out any longer. Device manufacturers with too little memory still would have the option to disable SVG or other features, but the default should definitely be SVG in.

Requiring Firefox is a major user issue, and it takes a lot more than 1MB or RAM. I don't wont to oblige my users to choose a different browser than their choice or the default browser on their device.

SVG is soon going to be available everywhere except on Android. The wide adoption of SVG has been held hostage of IE for about 10 years, but now with libraries such as Raphaël and Chrome Frame, browser vector graphics are available everywhere, except again on Android.

There is no alternative to vector graphics in the browser other than SVG, especially for applications that require efficient handling of DOM events.

As an application developer this is a major nightmare.

SVG is therefore a major technology with no alternative that cannot be considered optional.

Please fix this ASAP by enabling SVG by default.
Comment 52 by rektide, Feb 9, 2011
some conjecture: the difference is not 1MB of storage space.  the difference, i believe, is the memory footprint.  every X MB of program data in the WebView library adds X ms to the time it takes to load the browser into memory.

how bad does that problem become?  does every program using a WebView become slower to load/unload?  that'd be a real problem given Androids multi-tasking model, which can opt to kill programs for their memory and use onSaveInstanceState()/onRestoreInstanceState() to unload/reload the application when it's needed again.  if this isn't a concern, i'd love to know where the WebView program data resides and/or how it is shared.
Comment 53 by Jmartin....@gmail.com, Feb 10, 2011
BlackBerry's RIM OS 6 browser (formerly Iris) renders SVG as good as on iOS. Android is now clearly behind. This is really a pain for my web applications. Of course, for obvious usability reasons, I cannot tell the user : "recompile or use Firefox" 
Comment 54 by cristian...@gmail.com, Feb 10, 2011
The Honeycomb emulator, even if it crashes, seems to be supporting SVG.

the first screenshot is from this example: http://www.croczilla.com/bits_and_pieces/svg/samples/circles1/circles1.svg 
it is displayed, but the emulator goes very slow.

the second example: http://www.croczilla.com/bits_and_pieces/svg/samples/opacity1/opacity1.xml is also displayed, but the browser stops responding after clicking the start button.

Notes that both works very well on iOS (the screenshot are from the iOS simulator, but I've tested them to work succesfully on my iPhone 3G - not the 3GS!)
Schermata 2011-02-10 a 11.15.26.png
185 KB   View   Download
Schermata 2011-02-10 a 11.16.28.png
169 KB   View   Download
Schermata 2011-02-10 a 11.16.49.png
53.0 KB   View   Download
Schermata 2011-02-10 a 11.22.42.png
136 KB   View   Download
Schermata 2011-02-10 a 11.23.32.png
133 KB   View   Download
Comment 55 by Jmartin....@gmail.com, Feb 10, 2011
Also, Samsung Wave's browser (Dolfin I think) renders SVG well. I just tried http://www.croczilla.com/bits_and_pieces/svg/samples/opacity1/opacity1.xml on a Samsung Wave S8500. It is perfectly displayed and the animation is pretty smooth.
Comment 56 by bjorn.gu...@gmail.com, May 4, 2011
Just have to agree with all of you who believe in freedom of choice. If there is a switch to enable/disable, let manufacturers or phone users themselves decide whether the performance/user experience ratio with SVG enabled is worthwhile. Don't decide for them by not enabling it at all. 

If Honeycomb includes it then all is well (in 6 months). Up until then, I'll just have to convince my customers to download Firefox 4 to enable my SVG features.
Comment 57 by brion.vi...@gmail.com, May 4, 2011
Honeycomb will be nice but as it stands it doesn't run on *any* handsets -- this needs to be in a 2.x patch that actually goes out to all existing handsets.
Comment 58 by yerbol...@gmail.com, May 11, 2011
Hopefully, Google would enable SVG support after Google IO 2011 conference...
I really wish to play with SVG on Android mobile web browsers.
Please, Google, enable SVG.
Comment 59 by dusan.ma...@gmail.com, May 11, 2011
Forget about it, Google doesn't give a banana about anything that's not hot, so even if you have very capable device like Nexus One, you won't get any SVG, ever. Didn't you get the message? You won't get SVG, because it would take 1MB!
Comment 60 by bjorn.gu...@gmail.com, May 12, 2011
Strangely enough, Apple flipped the switch on enabling SVG on the same codebase for the iPhone Safari browser years ago. They didn't seem to think that the memory overhead was too much for the user experience gained. Google + manufacturers: If you are really competing with Apple, make sure your - at least - on par with them on a feature basis when hardware specs allow it. 

Enable SVG now!
Comment 61 by koansin....@gmail.com, May 12, 2011
It has been enabled for a period. I am sure that it's enabled in Honeycomb, at least, it's enabled on Moto Xoom :-)
Sign in to add a comment

Powered by Google Project Hosting