
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.
19 lines
345 B
C++
19 lines
345 B
C++
/*
|
|
* 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;
|
|
};
|
|
|
|
}
|