mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibWeb: Add HTMLTableCellElement::rowSpan
This commit is contained in:
parent
b7b647e9cd
commit
bc4974648c
4 changed files with 15 additions and 0 deletions
|
@ -176,6 +176,7 @@ namespace AttributeNames {
|
|||
__ENUMERATE_HTML_ATTRIBUTE(rev) \
|
||||
__ENUMERATE_HTML_ATTRIBUTE(reversed) \
|
||||
__ENUMERATE_HTML_ATTRIBUTE(rows) \
|
||||
__ENUMERATE_HTML_ATTRIBUTE(rowspan) \
|
||||
__ENUMERATE_HTML_ATTRIBUTE(rules) \
|
||||
__ENUMERATE_HTML_ATTRIBUTE(scheme) \
|
||||
__ENUMERATE_HTML_ATTRIBUTE(scrolling) \
|
||||
|
|
|
@ -58,4 +58,14 @@ void HTMLTableCellElement::set_col_span(unsigned int value)
|
|||
set_attribute(HTML::AttributeNames::colspan, String::number(value));
|
||||
}
|
||||
|
||||
unsigned int HTMLTableCellElement::row_span() const
|
||||
{
|
||||
return attribute(HTML::AttributeNames::rowspan).to_uint().value_or(1);
|
||||
}
|
||||
|
||||
void HTMLTableCellElement::set_row_span(unsigned int value)
|
||||
{
|
||||
set_attribute(HTML::AttributeNames::rowspan, String::number(value));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,7 +18,10 @@ public:
|
|||
virtual ~HTMLTableCellElement() override;
|
||||
|
||||
unsigned col_span() const;
|
||||
unsigned row_span() const;
|
||||
|
||||
void set_col_span(unsigned);
|
||||
void set_row_span(unsigned);
|
||||
|
||||
private:
|
||||
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
interface HTMLTableCellElement : HTMLElement {
|
||||
|
||||
attribute unsigned long colSpan;
|
||||
attribute unsigned long rowSpan;
|
||||
[Reflect] attribute DOMString headers;
|
||||
[Reflect] attribute DOMString abbr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue