Fix ImageResourceContent::Create()'s GetContentStatus()
Follow-up of a regression bug caused by [1]: Previously, ImageResourceContent::Create() returned a content with kCached, while after [1] it returns a content with kNotStarted. This causes behavior changes if Create() is called with non-null argument. [1] https://codereview.chromium.org/2746343002/ This CL fixes this issue by renaming Create() with a non-null argument to ImageResourceContent::CreateLoaded() that sets the status to kCached. The callsites of CreateLoaded() were affected by the bug, i.e. a callsite in HTMLImageElement and others in tests. Create() with the nullptr argument is renamed to CreateNotStarted(), which is only called from ImageResource and is not affected by the bug. BUG=667641, 382170, 690480 Review-Url: https://codereview.chromium.org/2869733004 Cr-Commit-Position: refs/heads/master@{#471113}
Showing
Please register or sign in to comment