mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 00:38:48 +00:00
LibWeb: Support valign
attribute on tr
elements
This commit is contained in:
parent
468b2a5ace
commit
3d1fbcb26b
Notes:
sideshowbarker
2024-07-17 03:03:37 +09:00
Author: https://github.com/implicitfield
Commit: 3d1fbcb26b
Pull-request: https://github.com/SerenityOS/serenity/pull/22000
Reviewed-by: https://github.com/kalenikaliaksandr ✅
3 changed files with 42 additions and 0 deletions
|
@ -5,8 +5,11 @@
|
|||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/CSS/Parser/ParsingContext.h>
|
||||
#include <LibWeb/CSS/StyleProperties.h>
|
||||
#include <LibWeb/CSS/StyleValues/ColorStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/IdentifierStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/ImageStyleValue.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
|
@ -49,6 +52,10 @@ void HTMLTableRowElement::apply_presentational_hints(CSS::StyleProperties& style
|
|||
if (auto parsed_value = document().parse_url(value); parsed_value.is_valid())
|
||||
style.set_property(CSS::PropertyID::BackgroundImage, CSS::ImageStyleValue::create(parsed_value));
|
||||
return;
|
||||
} else if (name == HTML::AttributeNames::valign) {
|
||||
if (auto parsed_value = parse_css_value(CSS::Parser::ParsingContext { document() }, value.view(), CSS::PropertyID::VerticalAlign))
|
||||
style.set_property(CSS::PropertyID::VerticalAlign, parsed_value.release_nonnull());
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue