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

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

Issue 2173873003: Cancel image loads if decoding failed (attempt #2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UAF Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // the the Image interface. 89 // the the Image interface.
90 friend class SVGImageForContainer; 90 friend class SVGImageForContainer;
91 91
92 ~SVGImage() override; 92 ~SVGImage() override;
93 93
94 String filenameExtension() const override; 94 String filenameExtension() const override;
95 95
96 IntSize containerSize() const; 96 IntSize containerSize() const;
97 bool usesContainerSize() const override { return true; } 97 bool usesContainerSize() const override { return true; }
98 98
99 bool dataChanged(bool allDataReceived) override; 99 SizeAvailability dataChanged(bool allDataReceived) override;
100 100
101 // FIXME: SVGImages are underreporting decoded sizes and will be unable 101 // FIXME: SVGImages are underreporting decoded sizes and will be unable
102 // to prune because these functions are not implemented yet. 102 // to prune because these functions are not implemented yet.
103 void destroyDecodedData() override { } 103 void destroyDecodedData() override { }
104 104
105 // FIXME: Implement this to be less conservative. 105 // FIXME: Implement this to be less conservative.
106 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { return false; } 106 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { return false; }
107 107
108 SVGImage(ImageObserver*); 108 SVGImage(ImageObserver*);
109 void draw(SkCanvas*, const SkPaint&, const FloatRect& fromRect, const FloatR ect& toRect, RespectImageOrientationEnum, ImageClampingMode) override; 109 void draw(SkCanvas*, const SkPaint&, const FloatRect& fromRect, const FloatR ect& toRect, RespectImageOrientationEnum, ImageClampingMode) override;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 { 144 {
145 m_image->setImageObserverDisabled(false); 145 m_image->setImageObserverDisabled(false);
146 } 146 }
147 private: 147 private:
148 Image* m_image; 148 Image* m_image;
149 }; 149 };
150 150
151 } // namespace blink 151 } // namespace blink
152 152
153 #endif // SVGImage_h 153 #endif // SVGImage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698