mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb: Make HTMLVideoElement part of CanvasImageSource union
This commit is contained in:
parent
d8c36ed458
commit
abe1172d70
Notes:
github-actions[bot]
2024-10-05 07:21:47 +00:00
Author: https://github.com/Totto16 🔰
Commit: abe1172d70
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1635
7 changed files with 42 additions and 8 deletions
|
@ -23,6 +23,15 @@ static void default_source_size(CanvasImageSource const& image, float& source_wi
|
|||
source_height = source->height()->anim_val()->value();
|
||||
}
|
||||
},
|
||||
[&source_width, &source_height](JS::Handle<HTML::HTMLVideoElement> const& source) {
|
||||
if (auto const bitmap = source->bitmap(); bitmap) {
|
||||
source_width = bitmap->width();
|
||||
source_height = bitmap->height();
|
||||
} else {
|
||||
source_width = source->video_width();
|
||||
source_height = source->video_height();
|
||||
}
|
||||
},
|
||||
[&source_width, &source_height](auto const& source) {
|
||||
if (source->bitmap()) {
|
||||
source_width = source->bitmap()->width();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue