mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:17:42 +00:00
LibWeb: Turn <td width> into a CSS width property
This commit is contained in:
parent
38d6cc8598
commit
b8dc1fc195
1 changed files with 6 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <LibWeb/DOM/HTMLTableCellElement.h>
|
#include <LibWeb/DOM/HTMLTableCellElement.h>
|
||||||
|
#include <LibWeb/Parser/CSSParser.h>
|
||||||
|
|
||||||
namespace Web {
|
namespace Web {
|
||||||
|
|
||||||
|
@ -53,6 +54,11 @@ void HTMLTableCellElement::apply_presentational_hints(StyleProperties& style) co
|
||||||
style.set_property(CSS::PropertyID::TextAlign, value.view());
|
style.set_property(CSS::PropertyID::TextAlign, value.view());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (name == HTML::AttributeNames::width) {
|
||||||
|
if (auto parsed_value = parse_css_value(CSS::ParsingContext(document()), value))
|
||||||
|
style.set_property(CSS::PropertyID::Width, parsed_value.release_nonnull());
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue