mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
LibWeb: Rename Element::attribute to Element::deprecated_attribute
This should allow us to add a Element::attribute which returns an Optional<String>. Eventually all callers should be ported to switch from the DeprecatedString version, but in the meantime, this should allow us to port some more IDL interfaces away from DeprecatedString.
This commit is contained in:
parent
da637a527d
commit
0f6782fae6
Notes:
sideshowbarker
2024-07-17 08:43:11 +09:00
Author: https://github.com/shannonbooth
Commit: 0f6782fae6
Pull-request: https://github.com/SerenityOS/serenity/pull/20926
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/trflynn89 ✅
42 changed files with 141 additions and 141 deletions
|
@ -97,7 +97,7 @@ void HTMLTableCellElement::apply_presentational_hints(CSS::StyleProperties& styl
|
|||
// https://html.spec.whatwg.org/multipage/tables.html#algorithm-for-processing-rows
|
||||
unsigned int HTMLTableCellElement::col_span() const
|
||||
{
|
||||
auto optional_value = Web::HTML::parse_non_negative_integer(attribute(HTML::AttributeNames::colspan));
|
||||
auto optional_value = Web::HTML::parse_non_negative_integer(deprecated_attribute(HTML::AttributeNames::colspan));
|
||||
|
||||
// If parsing that value failed, or returned zero, or if the attribute is absent, then let colspan be 1, instead.
|
||||
if (!optional_value.has_value() || optional_value.value() == 0) {
|
||||
|
@ -124,7 +124,7 @@ WebIDL::ExceptionOr<void> HTMLTableCellElement::set_col_span(unsigned int value)
|
|||
unsigned int HTMLTableCellElement::row_span() const
|
||||
{
|
||||
// If parsing that value failed or if the attribute is absent, then let rowspan be 1, instead.
|
||||
auto value = Web::HTML::parse_non_negative_integer(attribute(HTML::AttributeNames::rowspan)).value_or(1);
|
||||
auto value = Web::HTML::parse_non_negative_integer(deprecated_attribute(HTML::AttributeNames::rowspan)).value_or(1);
|
||||
|
||||
// If rowspan is greater than 65534, let it be 65534 instead.
|
||||
if (value > 65534) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue