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

Side by Side Diff: third_party/WebKit/Source/core/html/canvas/ImageElementBase.h

Issue 2817093002: Revert of Adds SVGImageElement as a ImageBitmapSource (Closed)
Patch Set: Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ImageElementBase_h
6 #define ImageElementBase_h
7
8 #include "core/CoreExport.h"
9 #include "core/html/canvas/CanvasImageSource.h"
10 #include "core/imagebitmap/ImageBitmapSource.h"
11
12 namespace blink {
13
14 class Element;
15 class ImageLoader;
16 class ImageResourceContent;
17
18 class CORE_EXPORT ImageElementBase : public CanvasImageSource,
19 public ImageBitmapSource {
20 public:
21 virtual ImageLoader& GetImageLoader() const = 0;
22 virtual FloatSize SourceDefaultObjectSize() = 0;
23
24 IntSize BitmapSourceSize() const override;
25 ScriptPromise CreateImageBitmap(ScriptState*,
26 EventTarget&,
27 Optional<IntRect>,
28 const ImageBitmapOptions&,
29 ExceptionState&) override;
30
31 PassRefPtr<Image> GetSourceImageForCanvas(SourceImageStatus*,
32 AccelerationHint,
33 SnapshotReason,
34 const FloatSize&) const override;
35
36 bool WouldTaintOrigin(
37 SecurityOrigin* destination_security_origin) const override;
38
39 FloatSize ElementSize(const FloatSize& default_object_size) const override;
40 FloatSize DefaultDestinationSize(
41 const FloatSize& default_object_size) const override;
42
43 bool IsAccelerated() const override;
44
45 int SourceWidth() override;
46 int SourceHeight() override;
47
48 bool IsSVGSource() const override;
49
50 bool IsOpaque() const override;
51
52 const KURL& SourceURL() const override;
53
54 ImageResourceContent* CachedImage() const;
55
56 private:
57 const Element& GetElement() const;
58 };
59
60 } // namespace blink
61
62 #endif // ImageElementBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698