| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 class SVGImage : public Image { | 41 class SVGImage : public Image { |
| 42 public: | 42 public: |
| 43 static PassRefPtr<SVGImage> create(ImageObserver* observer) | 43 static PassRefPtr<SVGImage> create(ImageObserver* observer) |
| 44 { | 44 { |
| 45 return adoptRef(new SVGImage(observer)); | 45 return adoptRef(new SVGImage(observer)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 RenderBox* embeddedContentBox() const; | 48 RenderBox* embeddedContentBox() const; |
| 49 FrameView* frameView() const; | 49 FrameView* frameView() const; |
| 50 | 50 |
| 51 virtual bool isSVGImage() const { return true; } | 51 virtual bool isSVGImage() const OVERRIDE { return true; } |
| 52 virtual IntSize size() const OVERRIDE { return m_intrinsicSize; } | 52 virtual IntSize size() const OVERRIDE { return m_intrinsicSize; } |
| 53 | 53 |
| 54 virtual bool hasRelativeWidth() const; | 54 virtual bool hasRelativeWidth() const OVERRIDE; |
| 55 virtual bool hasRelativeHeight() const; | 55 virtual bool hasRelativeHeight() const OVERRIDE; |
| 56 | 56 |
| 57 virtual void startAnimation(bool /*catchUpIfNecessary*/ = true) OVERRIDE; | 57 virtual void startAnimation(bool /*catchUpIfNecessary*/ = true) OVERRIDE; |
| 58 virtual void stopAnimation() OVERRIDE; | 58 virtual void stopAnimation() OVERRIDE; |
| 59 virtual void resetAnimation() OVERRIDE; | 59 virtual void resetAnimation() OVERRIDE; |
| 60 | 60 |
| 61 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | 61 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; |
| 62 | 62 |
| 63 virtual PassNativeImagePtr nativeImageForCurrentFrame() OVERRIDE; | 63 virtual PassNativeImagePtr nativeImageForCurrentFrame() OVERRIDE; |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 friend class SVGImageChromeClient; | 66 friend class SVGImageChromeClient; |
| 67 friend class SVGImageForContainer; | 67 friend class SVGImageForContainer; |
| 68 | 68 |
| 69 virtual ~SVGImage(); | 69 virtual ~SVGImage(); |
| 70 | 70 |
| 71 virtual String filenameExtension() const; | 71 virtual String filenameExtension() const OVERRIDE; |
| 72 | 72 |
| 73 virtual void setContainerSize(const IntSize&); | 73 virtual void setContainerSize(const IntSize&) OVERRIDE; |
| 74 IntSize containerSize() const; | 74 IntSize containerSize() const; |
| 75 virtual bool usesContainerSize() const { return true; } | 75 virtual bool usesContainerSize() const OVERRIDE { return true; } |
| 76 virtual void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intr
insicHeight, FloatSize& intrinsicRatio); | 76 virtual void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intr
insicHeight, FloatSize& intrinsicRatio) OVERRIDE; |
| 77 | 77 |
| 78 virtual bool dataChanged(bool allDataReceived); | 78 virtual bool dataChanged(bool allDataReceived) OVERRIDE; |
| 79 | 79 |
| 80 // FIXME: SVGImages are underreporting decoded sizes and will be unable | 80 // FIXME: SVGImages are underreporting decoded sizes and will be unable |
| 81 // to prune because these functions are not implemented yet. | 81 // to prune because these functions are not implemented yet. |
| 82 virtual void destroyDecodedData(bool) { } | 82 virtual void destroyDecodedData() OVERRIDE { } |
| 83 virtual unsigned decodedSize() const { return 0; } | 83 virtual unsigned decodedSize() const OVERRIDE { return 0; } |
| 84 | 84 |
| 85 // FIXME: Implement this to be less conservative. | 85 // FIXME: Implement this to be less conservative. |
| 86 virtual bool currentFrameKnownToBeOpaque() OVERRIDE { return false; } | 86 virtual bool currentFrameKnownToBeOpaque() OVERRIDE { return false; } |
| 87 | 87 |
| 88 SVGImage(ImageObserver*); | 88 SVGImage(ImageObserver*); |
| 89 virtual void draw(GraphicsContext*, const FloatRect& fromRect, const FloatRe
ct& toRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode); | 89 virtual void draw(GraphicsContext*, const FloatRect& fromRect, const FloatRe
ct& toRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode) OVERRIDE; |
| 90 void drawForContainer(GraphicsContext*, const FloatSize, float, const FloatR
ect&, const FloatRect&, ColorSpace, CompositeOperator, BlendMode); | 90 void drawForContainer(GraphicsContext*, const FloatSize, float, const FloatR
ect&, const FloatRect&, ColorSpace, CompositeOperator, BlendMode); |
| 91 void drawPatternForContainer(GraphicsContext*, const FloatSize, float, const
FloatRect&, const AffineTransform&, const FloatPoint&, ColorSpace, | 91 void drawPatternForContainer(GraphicsContext*, const FloatSize, float, const
FloatRect&, const AffineTransform&, const FloatPoint&, ColorSpace, |
| 92 CompositeOperator, const FloatRect&); | 92 CompositeOperator, const FloatRect&); |
| 93 | 93 |
| 94 OwnPtr<SVGImageChromeClient> m_chromeClient; | 94 OwnPtr<SVGImageChromeClient> m_chromeClient; |
| 95 OwnPtr<Page> m_page; | 95 OwnPtr<Page> m_page; |
| 96 IntSize m_intrinsicSize; | 96 IntSize m_intrinsicSize; |
| 97 }; | 97 }; |
| 98 } | 98 } |
| 99 | 99 |
| 100 #endif // SVGImage_h | 100 #endif // SVGImage_h |
| OLD | NEW |