| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 SVGImage(ImageObserver*); | 108 SVGImage(ImageObserver*); |
| 109 void draw(SkCanvas*, const SkPaint&, const FloatRect& fromRect, const FloatR
ect& toRect, RespectImageOrientationEnum, ImageClampingMode) override; | 109 void draw(SkCanvas*, const SkPaint&, const FloatRect& fromRect, const FloatR
ect& toRect, RespectImageOrientationEnum, ImageClampingMode) override; |
| 110 void drawForContainer(SkCanvas*, const SkPaint&, const FloatSize, float, con
st FloatRect&, const FloatRect&, const KURL&); | 110 void drawForContainer(SkCanvas*, const SkPaint&, const FloatSize, float, con
st FloatRect&, const FloatRect&, const KURL&); |
| 111 void drawPatternForContainer(GraphicsContext&, const FloatSize, float, const
FloatRect&, const FloatSize&, const FloatPoint&, | 111 void drawPatternForContainer(GraphicsContext&, const FloatSize, float, const
FloatRect&, const FloatSize&, const FloatPoint&, |
| 112 SkXfermode::Mode, const FloatRect&, const FloatSize& repeatSpacing, cons
t KURL&); | 112 SkXfermode::Mode, const FloatRect&, const FloatSize& repeatSpacing, cons
t KURL&); |
| 113 PassRefPtr<SkImage> imageForCurrentFrameForContainer(const KURL&, const Floa
tSize& containerSize); | 113 PassRefPtr<SkImage> imageForCurrentFrameForContainer(const KURL&, const Floa
tSize& containerSize); |
| 114 void drawInternal(SkCanvas*, const SkPaint&, const FloatRect& fromRect, cons
t FloatRect& toRect, RespectImageOrientationEnum, | 114 void drawInternal(SkCanvas*, const SkPaint&, const FloatRect& fromRect, cons
t FloatRect& toRect, RespectImageOrientationEnum, |
| 115 ImageClampingMode, const KURL&); | 115 ImageClampingMode, const KURL&); |
| 116 | 116 |
| 117 void stopAnimation(); | 117 void stopAnimation(); |
| 118 void scheduleTimelineRewind(); |
| 119 void flushPendingTimelineRewind(); |
| 118 | 120 |
| 119 Persistent<SVGImageChromeClient> m_chromeClient; | 121 Persistent<SVGImageChromeClient> m_chromeClient; |
| 120 Persistent<Page> m_page; | 122 Persistent<Page> m_page; |
| 121 | 123 |
| 122 // When an SVG image has no intrinsic size the size depends on the | 124 // When an SVG image has no intrinsic size the size depends on the |
| 123 // default object size, which in turn depends on the | 125 // default object size, which in turn depends on the |
| 124 // container. SVGImage may belong to multiple containers so the | 126 // container. SVGImage may belong to multiple containers so the |
| 125 // final image size can't be known in | 127 // final image size can't be known in |
| 126 // SVGImage. SVGImageForContainer carried the final image size, | 128 // SVGImage. SVGImageForContainer carried the final image size, |
| 127 // also called concrete object size. | 129 // also called concrete object size. |
| 128 IntSize m_intrinsicSize; | 130 IntSize m_intrinsicSize; |
| 131 bool m_hasPendingTimelineRewind; |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 DEFINE_IMAGE_TYPE_CASTS(SVGImage); | 134 DEFINE_IMAGE_TYPE_CASTS(SVGImage); |
| 132 | 135 |
| 133 class ImageObserverDisabler { | 136 class ImageObserverDisabler { |
| 134 STACK_ALLOCATED(); | 137 STACK_ALLOCATED(); |
| 135 WTF_MAKE_NONCOPYABLE(ImageObserverDisabler); | 138 WTF_MAKE_NONCOPYABLE(ImageObserverDisabler); |
| 136 public: | 139 public: |
| 137 ImageObserverDisabler(Image* image) | 140 ImageObserverDisabler(Image* image) |
| 138 : m_image(image) | 141 : m_image(image) |
| 139 { | 142 { |
| 140 m_image->setImageObserverDisabled(true); | 143 m_image->setImageObserverDisabled(true); |
| 141 } | 144 } |
| 142 | 145 |
| 143 ~ImageObserverDisabler() | 146 ~ImageObserverDisabler() |
| 144 { | 147 { |
| 145 m_image->setImageObserverDisabled(false); | 148 m_image->setImageObserverDisabled(false); |
| 146 } | 149 } |
| 147 private: | 150 private: |
| 148 Image* m_image; | 151 Image* m_image; |
| 149 }; | 152 }; |
| 150 | 153 |
| 151 } // namespace blink | 154 } // namespace blink |
| 152 | 155 |
| 153 #endif // SVGImage_h | 156 #endif // SVGImage_h |
| OLD | NEW |