| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 // FIXME: Implement this to be less conservative. | 98 // FIXME: Implement this to be less conservative. |
| 99 bool currentFrameKnownToBeOpaque() override { return false; } | 99 bool currentFrameKnownToBeOpaque() override { return false; } |
| 100 | 100 |
| 101 SVGImage(ImageObserver*); | 101 SVGImage(ImageObserver*); |
| 102 void draw(SkCanvas*, const SkPaint&, const FloatRect& fromRect, const FloatR
ect& toRect, RespectImageOrientationEnum, ImageClampingMode) override; | 102 void draw(SkCanvas*, const SkPaint&, const FloatRect& fromRect, const FloatR
ect& toRect, RespectImageOrientationEnum, ImageClampingMode) override; |
| 103 void drawForContainer(SkCanvas*, const SkPaint&, const FloatSize, float, con
st FloatRect&, const FloatRect&); | 103 void drawForContainer(SkCanvas*, const SkPaint&, const FloatSize, float, con
st FloatRect&, const FloatRect&); |
| 104 void drawPatternForContainer(GraphicsContext*, const FloatSize, float, const
FloatRect&, const FloatSize&, const FloatPoint&, | 104 void drawPatternForContainer(GraphicsContext*, const FloatSize, float, const
FloatRect&, const FloatSize&, const FloatPoint&, |
| 105 SkXfermode::Mode, const FloatRect&, const IntSize& repeatSpacing); | 105 SkXfermode::Mode, const FloatRect&, const IntSize& repeatSpacing); |
| 106 | 106 |
| 107 OwnPtr<SVGImageChromeClient> m_chromeClient; | 107 OwnPtrWillBePersistent<SVGImageChromeClient> m_chromeClient; |
| 108 OwnPtrWillBePersistent<Page> m_page; | 108 OwnPtrWillBePersistent<Page> m_page; |
| 109 IntSize m_intrinsicSize; | 109 IntSize m_intrinsicSize; |
| 110 KURL m_url; | 110 KURL m_url; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 DEFINE_IMAGE_TYPE_CASTS(SVGImage); | 113 DEFINE_IMAGE_TYPE_CASTS(SVGImage); |
| 114 | 114 |
| 115 class ImageObserverDisabler { | 115 class ImageObserverDisabler { |
| 116 WTF_MAKE_NONCOPYABLE(ImageObserverDisabler); | 116 WTF_MAKE_NONCOPYABLE(ImageObserverDisabler); |
| 117 public: | 117 public: |
| 118 ImageObserverDisabler(Image* image) | 118 ImageObserverDisabler(Image* image) |
| 119 : m_image(image) | 119 : m_image(image) |
| 120 { | 120 { |
| 121 m_observer = m_image->imageObserver(); | 121 m_observer = m_image->imageObserver(); |
| 122 m_image->setImageObserver(0); | 122 m_image->setImageObserver(0); |
| 123 } | 123 } |
| 124 | 124 |
| 125 ~ImageObserverDisabler() | 125 ~ImageObserverDisabler() |
| 126 { | 126 { |
| 127 m_image->setImageObserver(m_observer); | 127 m_image->setImageObserver(m_observer); |
| 128 } | 128 } |
| 129 private: | 129 private: |
| 130 Image* m_image; | 130 Image* m_image; |
| 131 ImageObserver* m_observer; | 131 ImageObserver* m_observer; |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } | 134 } |
| 135 | 135 |
| 136 #endif // SVGImage_h | 136 #endif // SVGImage_h |
| OLD | NEW |