Spec: https://html.spec.whatwg.org/multipage/scripting.html#image-sources-for-2d-rendering-contexts:htmlorsvgimageelement SVGImageElement needs to be added to the CanvasImageSource union typedef.
This is a very minor feature. Not sure it warrants going through the formal launch process. @chrishtr: WDYT?
I think this should go through an intent, even though it's small. It's important for visibility and documentation of changes, for the benefit of not just us but the community of developers.
@fserb: The launch process is this: https://www.chromium.org/blink/launching-features Also, you will need to discover the magic of our bindings code generator: https://www.chromium.org/blink/webidl
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/11a275c5522ae4dbf8e3dee5c7246e74141b5142 commit 11a275c5522ae4dbf8e3dee5c7246e74141b5142 Author: fserb <fserb@chromium.org> Date: Fri Mar 24 00:04:09 2017 Adds SVGImageElement to CanvasImageSource Relevant spec: https://html.spec.whatwg.org/multipage/scripting.html#image-sources-for-2d-rendering-contexts:htmlorsvgimageelement SVGImageElement should be part of CanvasImageSource union typedef, i.e., be allowed as an source for drawImage(). This CL does that, while creating a common interface for both HTMLImageElement and SVGImageElement. BUG= 695662 Review-Url: https://codereview.chromium.org/2723093004 Cr-Commit-Position: refs/heads/master@{#459289} [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.image.string-expected.txt [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.image.undefined-expected.txt [add] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/LayoutTests/fast/canvas/canvas-drawImage-svg-expected.html [add] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/LayoutTests/fast/canvas/canvas-drawImage-svg.html [add] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/LayoutTests/fast/canvas/resources/rect.svg [add] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/LayoutTests/http/tests/security/canvas-remote-read-remote-svg-image.html [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/bindings/modules/v8/generated.gni [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/core/html/BUILD.gn [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/core/html/HTMLImageElement.cpp [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/core/html/HTMLImageElement.h [add] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/core/html/canvas/CanvasImageElementSource.cpp [add] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/core/html/canvas/CanvasImageElementSource.h [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/core/html/canvas/CanvasImageSource.h [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/core/svg/SVGImageElement.cpp [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/core/svg/SVGImageElement.h [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h [modify] https://crrev.com/11a275c5522ae4dbf8e3dee5c7246e74141b5142/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
This is done. Moving forward to ImageBitmapSource now.
Comment 1 by junov@chromium.org
, Feb 23 2017Labels: -Type-Launch-OWP Type-Feature