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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp

Issue 2613853002: Phase III Step 2: Call imageNotifyFinished() and image load event after SVG loading completes (Closed)
Patch Set: Rebase Created 3 years, 9 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/svg/graphics/SVGImage.h" 5 #include "core/svg/graphics/SVGImage.h"
6 6
7 #include "core/svg/graphics/SVGImageChromeClient.h" 7 #include "core/svg/graphics/SVGImageChromeClient.h"
8 #include "platform/SharedBuffer.h" 8 #include "platform/SharedBuffer.h"
9 #include "platform/Timer.h" 9 #include "platform/Timer.h"
10 #include "platform/geometry/FloatRect.h" 10 #include "platform/geometry/FloatRect.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 public: 47 public:
48 PauseControlImageObserver(bool shouldPause) : m_shouldPause(shouldPause) {} 48 PauseControlImageObserver(bool shouldPause) : m_shouldPause(shouldPause) {}
49 49
50 void decodedSizeChangedTo(const Image*, size_t newSize) override {} 50 void decodedSizeChangedTo(const Image*, size_t newSize) override {}
51 51
52 bool shouldPauseAnimation(const Image*) override { return m_shouldPause; } 52 bool shouldPauseAnimation(const Image*) override { return m_shouldPause; }
53 void animationAdvanced(const Image*) override {} 53 void animationAdvanced(const Image*) override {}
54 54
55 void changedInRect(const Image*, const IntRect&) override {} 55 void changedInRect(const Image*, const IntRect&) override {}
56 56
57 void loadCompleted(const blink::Image*) override {}
58
57 DEFINE_INLINE_VIRTUAL_TRACE() { ImageObserver::trace(visitor); } 59 DEFINE_INLINE_VIRTUAL_TRACE() { ImageObserver::trace(visitor); }
58 60
59 private: 61 private:
60 bool m_shouldPause; 62 bool m_shouldPause;
61 }; 63 };
62 Persistent<PauseControlImageObserver> m_observer; 64 Persistent<PauseControlImageObserver> m_observer;
63 RefPtr<SVGImage> m_image; 65 RefPtr<SVGImage> m_image;
64 }; 66 };
65 67
66 const char kAnimatedDocument[] = 68 const char kAnimatedDocument[] =
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 EXPECT_TRUE(chromeClient.isSuspended()); 138 EXPECT_TRUE(chromeClient.isSuspended());
137 EXPECT_FALSE(timer->isActive()); 139 EXPECT_FALSE(timer->isActive());
138 140
139 // Simulate a draw. This should resume the animation again. 141 // Simulate a draw. This should resume the animation again.
140 pumpFrame(); 142 pumpFrame();
141 EXPECT_FALSE(chromeClient.isSuspended()); 143 EXPECT_FALSE(chromeClient.isSuspended());
142 EXPECT_TRUE(timer->isActive()); 144 EXPECT_TRUE(timer->isActive());
143 } 145 }
144 146
145 } // namespace blink 147 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698