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

Unified Diff: Source/core/loader/ImageLoader.h

Issue 369423002: Have srcset respond to viewport changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Got rid of assert Created 6 years, 5 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: Source/core/loader/ImageLoader.h
diff --git a/Source/core/loader/ImageLoader.h b/Source/core/loader/ImageLoader.h
index dcd2115f9329c3b1effbf99c6f2b92619b834955..f8dd45a6048b957636f7af0f301ca2270b40a1dd 100644
--- a/Source/core/loader/ImageLoader.h
+++ b/Source/core/loader/ImageLoader.h
@@ -75,7 +75,9 @@ public:
// This should be the update behavior when the resource was changed (via 'src', 'srcset' or 'sizes').
// Starts a new load even if a previous load of the same resource have failed, to match Firefox's behavior.
// FIXME - Verify that this is the right behavior according to the spec.
- UpdateIgnorePreviousError
+ UpdateIgnorePreviousError,
+ // This forces the image to update its intrinsic size, even if the image source has not changed.
+ UpdateSizeChanged
};
enum BypassMainWorldBehavior {
@@ -118,7 +120,7 @@ private:
class Task;
// Called from the task or from updateFromElement to initiate the load.
- void doUpdateFromElement(BypassMainWorldBehavior);
+ void doUpdateFromElement(BypassMainWorldBehavior, UpdateFromElementBehavior);
virtual void dispatchLoadEvent() = 0;
virtual String sourceURI(const AtomicString&) const = 0;
@@ -135,7 +137,7 @@ private:
void sourceImageChanged();
void clearFailedLoadURL();
void crossSiteOrCSPViolationOccured(AtomicString);
- void enqueueImageLoadingMicroTask();
+ void enqueueImageLoadingMicroTask(UpdateFromElementBehavior);
static ResourcePtr<ImageResource> createImageResourceForImageDocument(Document&, FetchRequest&);
void timerFired(Timer<ImageLoader>*);

Powered by Google App Engine
This is Rietveld 408576698