Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.h

Issue 2783133002: Implement Image::maybeAnimated for SVGImage (Closed)
Patch Set: Fix typo Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 LayoutReplaced* embeddedReplacedContent() const; 66 LayoutReplaced* embeddedReplacedContent() const;
67 67
68 bool isSVGImage() const override { return true; } 68 bool isSVGImage() const override { return true; }
69 IntSize size() const override { return m_intrinsicSize; } 69 IntSize size() const override { return m_intrinsicSize; }
70 70
71 bool currentFrameHasSingleSecurityOrigin() const override; 71 bool currentFrameHasSingleSecurityOrigin() const override;
72 72
73 void startAnimation(CatchUpAnimation = CatchUp) override; 73 void startAnimation(CatchUpAnimation = CatchUp) override;
74 void resetAnimation() override; 74 void resetAnimation() override;
75 75
76 // Does the SVG image/document contain any animations?
77 bool maybeAnimated() override;
78
76 // Advances an animated image. This will trigger an animation update for CSS 79 // Advances an animated image. This will trigger an animation update for CSS
77 // and advance the SMIL timeline by one frame. 80 // and advance the SMIL timeline by one frame.
78 void advanceAnimationForTesting() override; 81 void advanceAnimationForTesting() override;
79 SVGImageChromeClient& chromeClientForTesting(); 82 SVGImageChromeClient& chromeClientForTesting();
80 83
81 sk_sp<SkImage> imageForCurrentFrame() override; 84 sk_sp<SkImage> imageForCurrentFrame() override;
82 static FloatPoint offsetForCurrentFrame(const FloatRect& dstRect, 85 static FloatPoint offsetForCurrentFrame(const FloatRect& dstRect,
83 const FloatRect& srcRect); 86 const FloatRect& srcRect);
84 87
85 // Does the SVG image/document contain any animations?
86 bool hasAnimations() const;
87 // Service CSS and SMIL animations. 88 // Service CSS and SMIL animations.
88 void serviceAnimations(double monotonicAnimationStartTime); 89 void serviceAnimations(double monotonicAnimationStartTime);
89 90
90 void updateUseCounters(const Document&) const; 91 void updateUseCounters(const Document&) const;
91 92
92 // The defaultObjectSize is assumed to be unzoomed, i.e. it should 93 // The defaultObjectSize is assumed to be unzoomed, i.e. it should
93 // not have the effective zoom level applied. The returned size is 94 // not have the effective zoom level applied. The returned size is
94 // thus also independent of current zoom level. 95 // thus also independent of current zoom level.
95 FloatSize concreteObjectSize(const FloatSize& defaultObjectSize) const; 96 FloatSize concreteObjectSize(const FloatSize& defaultObjectSize) const;
96 97
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 202
202 ~ImageObserverDisabler() { m_image->setImageObserverDisabled(false); } 203 ~ImageObserverDisabler() { m_image->setImageObserverDisabled(false); }
203 204
204 private: 205 private:
205 Image* m_image; 206 Image* m_image;
206 }; 207 };
207 208
208 } // namespace blink 209 } // namespace blink
209 210
210 #endif // SVGImage_h 211 #endif // SVGImage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698