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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.h

Issue 2613853002: Phase III Step 2: Call imageNotifyFinished() and image load event after SVG loading completes (Closed)
Patch Set: Rebase Created 3 years, 7 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/platform/graphics/Image.h
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h
index 869a047723665282e36ae97a980cdff80f53a49a..e2c390b8a8482e0e427aa33c79ebdcb60a3b4897 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -101,7 +101,19 @@ class PLATFORM_EXPORT Image : public ThreadSafeRefCounted<Image> {
int height() const { return Size().Height(); }
virtual bool GetHotSpot(IntPoint&) const { return false; }
- enum SizeAvailability { kSizeAvailable, kSizeUnavailable };
+ enum SizeAvailability {
fs 2017/05/05 10:52:42 uNit: Maybe order these in a sort of "lifecycle or
hiroshige 2017/05/08 17:22:07 Done.
+ kSizeAvailable,
+ kSizeUnavailable,
+ kSizeAvailableAndLoadingAsynchronously
+ };
+
+ // If setData() returns |SizeAvailableAndLoadingAsynchronously|:
+ // Image loading is continuing asynchronously
+ // (only when |this| is SVGImage and |allDataReceived| is true), and
fs 2017/05/05 10:52:42 Nit: The Blink Renaming means naming here (and in
hiroshige 2017/05/08 17:22:06 Done.
+ // ImageResourceObserver::loadCompleted() is called when finished.
+ // Otherwise:
+ // Image loading is completed synchronously.
+ // ImageResourceObserver::loadCompleted() is not called.
virtual SizeAvailability SetData(PassRefPtr<SharedBuffer> data,
bool all_data_received);
virtual SizeAvailability DataChanged(bool /*allDataReceived*/) {

Powered by Google App Engine
This is Rietveld 408576698