mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 18:28:10 +00:00
LibWeb: Add HTMLTableCellElement::colSpan
This commit is contained in:
parent
b92cc3670b
commit
b7b647e9cd
3 changed files with 14 additions and 0 deletions
|
@ -48,4 +48,14 @@ void HTMLTableCellElement::apply_presentational_hints(CSS::StyleProperties& styl
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int HTMLTableCellElement::col_span() const
|
||||||
|
{
|
||||||
|
return attribute(HTML::AttributeNames::colspan).to_uint().value_or(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HTMLTableCellElement::set_col_span(unsigned int value)
|
||||||
|
{
|
||||||
|
set_attribute(HTML::AttributeNames::colspan, String::number(value));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,9 @@ public:
|
||||||
HTMLTableCellElement(DOM::Document&, DOM::QualifiedName);
|
HTMLTableCellElement(DOM::Document&, DOM::QualifiedName);
|
||||||
virtual ~HTMLTableCellElement() override;
|
virtual ~HTMLTableCellElement() override;
|
||||||
|
|
||||||
|
unsigned col_span() const;
|
||||||
|
void set_col_span(unsigned);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
interface HTMLTableCellElement : HTMLElement {
|
interface HTMLTableCellElement : HTMLElement {
|
||||||
|
|
||||||
|
attribute unsigned long colSpan;
|
||||||
[Reflect] attribute DOMString headers;
|
[Reflect] attribute DOMString headers;
|
||||||
[Reflect] attribute DOMString abbr;
|
[Reflect] attribute DOMString abbr;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue