mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibWeb: Don't force HTMLImageElement to have a legacy ImageLoader
We achieve this by adding a new Layout::ImageProvider class and having both HTMLImageElement and HTMLObjectElement inherit from it. The HTML spec is vague on how object image loading should work, which is why this first pass is focusing on image elements.
This commit is contained in:
parent
3cf73ca0b3
commit
c648e24cff
9 changed files with 84 additions and 88 deletions
19
Userland/Libraries/LibWeb/Layout/ImageProvider.h
Normal file
19
Userland/Libraries/LibWeb/Layout/ImageProvider.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
class ImageProvider {
|
||||
public:
|
||||
virtual ~ImageProvider() { }
|
||||
|
||||
virtual RefPtr<Gfx::Bitmap const> current_image_bitmap() const = 0;
|
||||
virtual void set_visible_in_viewport(bool) = 0;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue