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

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

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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.h
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.h b/third_party/WebKit/Source/core/svg/graphics/SVGImage.h
index eeb8487e30777736dbe4afb264511ce6917c0328..842af4c70cd1332941109393d898cc78f8a929ca 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.h
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.h
@@ -33,6 +33,7 @@
#include "platform/weborigin/KURL.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "wtf/Allocator.h"
+#include "wtf/WeakPtr.h"
namespace blink {
@@ -156,6 +157,12 @@ class CORE_EXPORT SVGImage final : public Image {
void scheduleTimelineRewind();
void flushPendingTimelineRewind();
+ WTF::WeakPtr<SVGImage> asWeakPtr() {
+ return m_weakPtrFactory.createWeakPtr();
+ }
+
+ class SVGImageLocalFrameClient;
+
Persistent<SVGImageChromeClient> m_chromeClient;
Persistent<Page> m_page;
std::unique_ptr<PaintController> m_paintController;
@@ -167,6 +174,18 @@ class CORE_EXPORT SVGImage final : public Image {
// the "concrete object size". For more, see: SVGImageForContainer.h
IntSize m_intrinsicSize;
bool m_hasPendingTimelineRewind;
+
+ enum AsyncLoadCompletionStatus {
fs 2017/03/15 14:22:17 Why Async...? That's just one possible outcome.
hiroshige 2017/05/04 22:50:50 Done. Renamed to LoadState (and renamed some of en
+ DataChangedNotStarted,
+ InDataChanged,
+ AfterDataChanged,
+ LoadCompletedWithinDataChanged,
+ LoadCompletedAsynchronously,
+ };
+
+ AsyncLoadCompletionStatus m_loadStatus = DataChangedNotStarted;
+
+ WTF::WeakPtrFactory<SVGImage> m_weakPtrFactory;
};
DEFINE_IMAGE_TYPE_CASTS(SVGImage);

Powered by Google App Engine
This is Rietveld 408576698