mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Generalize ImageBox and ImagePaintable for any ImageProvider
They currently assume the DOM node is an HTMLImageElement with respect to handling the alt attribute. The HTMLInputElement will require the same behavior.
This commit is contained in:
committed by
Andreas Kling
parent
c4295edc81
commit
45a47cb32b
17
Userland/Libraries/LibWeb/Layout/ImageProvider.cpp
Normal file
17
Userland/Libraries/LibWeb/Layout/ImageProvider.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Layout/ImageBox.h>
|
||||
#include <LibWeb/Layout/ImageProvider.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
void ImageProvider::did_update_alt_text(ImageBox& layout_node)
|
||||
{
|
||||
layout_node.dom_node_did_update_alt_text({});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user