mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibWeb: Make SVGImageElement part of CanvasImageSource union
This is very janky at the moment but it also more correct. :^)
This commit is contained in:
parent
902586a21d
commit
cd0e4a49b8
Notes:
github-actions[bot]
2024-10-04 18:02:14 +00:00
Author: https://github.com/awesomekling
Commit: cd0e4a49b8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1629
10 changed files with 69 additions and 12 deletions
|
@ -29,6 +29,15 @@ public:
|
|||
|
||||
Gfx::Rect<CSSPixels> bounding_box() const;
|
||||
|
||||
// FIXME: This is a hack for images used as CanvasImageSource. Do something more elegant.
|
||||
RefPtr<Gfx::Bitmap> bitmap() const
|
||||
{
|
||||
auto bitmap = current_image_bitmap();
|
||||
if (!bitmap)
|
||||
return nullptr;
|
||||
return bitmap->bitmap();
|
||||
}
|
||||
|
||||
// ^Layout::ImageProvider
|
||||
virtual bool is_image_available() const override;
|
||||
virtual Optional<CSSPixels> intrinsic_width() const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue