Android : 2.3.4
原本預設webkit 不會支援SVG
打開瀏覽器 http://www.croczilla.com/bits_and_pieces/svg/samples/ |
裡面有不少範例可以驗證,打開範例後被當作文字檔顯示。 |
List:
trunk/mydroid/device/ti/blaze/buildspec.mk.default
trunk/mydroid/external/webkit/WebCore/Android.derived.jscbindings.mk
trunk/mydroid/external/webkit/WebCore/Android.derived.v8bindings.mk
trunk/mydroid/external/webkit/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
trunk/mydroid/external/webkit/WebCore/loader/FrameLoaderClient.h
trunk/mydroid/device/ti/blaze/buildspec.mk.default
# To enable SVG in webcore define ENABLE_SVG:=true ifndef ENABLE_SVG ENABLE_SVG:=true ENABLE_SVG_ANIMATION:=true endif
打開ENABLE_SVG config & 增加 ENABLE_SVG_ANIMATION
trunk/mydroid/external/webkit/WebCore/Android.derived.jscbindings.mk
trunk/mydroid/external/webkit/WebCore/Android.derived.v8bindings.mk
ifeq ($(ENABLE_SVG_ANIMATION), true)
SVG_FLAGS += ENABLE_SVG_ANIMATION=1
endif
把缺少的SVG_FLAGS補上
trunk/mydroid/external/webkit/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
//#include "bindings/V8SVGFEMorphologyElement.cpp"
拿掉不需要得include
trunk/mydroid/external/webkit/WebCore/loader/FrameLoaderClient.h
//virtual void dispatchDidReceiveTouchIconURL(const String& url, bool precomposed) = 0; virtual void dispatchDidReceiveTouchIconURL(const String& url, bool precomposed) {}
修改會compile err的地方
然後clean build 即可
另外裝其他瀏覽器可以支援SVG 如:Firefox, Opera
沒有留言:
張貼留言