|
Cancel image loads if decoding failed (attempt #2)
'Cancel' isn't really the right word for what this change does.
In the event of an image decoding failure, ImageResource will
synthesize a call to ResourceLoader::didFinishLoading, killing
the actual network request but reporting it as a successful
completion to the rest of blink. This matches our traditional
behavior of decoding errors looking like a successful
resource load (for the most part).
This requires some plumbing changes to image decoding, because
the decoder selection logic doesn't report why it wasn't able to
create an ImageDecoder. It might be because insufficient data has
been received to sniff the image type, or it may be that we
definitely don't have a valid image type. This change exposes enough
information to tell the difference.
BUG= 471272
TBR=peter@chromium.org
Committed: https://crrev.com/d3d417564b290e70dc50bab63dc22a8889924be3
Cr-Commit-Position: refs/heads/master@{#407555}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+136 lines, -79 lines) |
Patch |
 |
M |
third_party/WebKit/Source/core/fetch/ImageResource.cpp
|
View
|
1
|
2 chunks |
+14 lines, -13 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
|
View
|
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/fetch/Resource.cpp
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/frame/ImageBitmap.cpp
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/svg/graphics/SVGImage.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/exported/WebImage.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/BitmapImage.h
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
View
|
|
2 chunks |
+9 lines, -6 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTestWoPlatform.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/Image.h
|
View
|
|
1 chunk |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/Image.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/ImageSource.h
|
View
|
|
3 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/ImageSource.cpp
|
View
|
|
1 chunk |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
View
|
|
2 chunks |
+16 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
|
View
|
|
1 chunk |
+38 lines, -22 lines |
0 comments
|
Download
|
Total messages: 24 (16 generated)
|