mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +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:
@@ -72,7 +72,7 @@ void TableFormattingContext::compute_constrainedness()
|
||||
m_columns[column_index].is_constrained = true;
|
||||
}
|
||||
auto const& col_node = static_cast<HTML::HTMLTableColElement const&>(*column_box.dom_node());
|
||||
unsigned span = col_node.attribute(HTML::AttributeNames::span).to_uint().value_or(1);
|
||||
unsigned span = col_node.deprecated_attribute(HTML::AttributeNames::span).to_uint().value_or(1);
|
||||
column_index += span;
|
||||
});
|
||||
});
|
||||
@@ -189,7 +189,7 @@ void TableFormattingContext::compute_outer_content_sizes()
|
||||
// The outer max-content width of a table-column or table-column-group is max(min-width, min(max-width, width)).
|
||||
m_columns[column_index].max_size = max(min_width, min(max_width, width));
|
||||
auto const& col_node = static_cast<HTML::HTMLTableColElement const&>(*column_box.dom_node());
|
||||
unsigned span = col_node.attribute(HTML::AttributeNames::span).to_uint().value_or(1);
|
||||
unsigned span = col_node.deprecated_attribute(HTML::AttributeNames::span).to_uint().value_or(1);
|
||||
column_index += span;
|
||||
});
|
||||
});
|
||||
@@ -1378,7 +1378,7 @@ void TableFormattingContext::BorderConflictFinder::collect_conflicting_col_eleme
|
||||
for (auto* child_of_column_group = child->first_child(); child_of_column_group; child_of_column_group = child_of_column_group->next_sibling()) {
|
||||
VERIFY(child_of_column_group->display().is_table_column());
|
||||
auto const& col_node = static_cast<HTML::HTMLTableColElement const&>(*child_of_column_group->dom_node());
|
||||
unsigned span = col_node.attribute(HTML::AttributeNames::span).to_uint().value_or(1);
|
||||
unsigned span = col_node.deprecated_attribute(HTML::AttributeNames::span).to_uint().value_or(1);
|
||||
for (size_t i = column_index; i < column_index + span; ++i) {
|
||||
m_col_elements_by_index[i] = child_of_column_group;
|
||||
}
|
||||
@@ -1742,7 +1742,7 @@ void TableFormattingContext::initialize_intrinsic_percentages_from_rows_or_colum
|
||||
m_columns[column_index].has_intrinsic_percentage = computed_values.max_width().is_percentage() || computed_values.width().is_percentage();
|
||||
m_columns[column_index].intrinsic_percentage = min(width_percentage, max_width_percentage);
|
||||
auto const& col_node = static_cast<HTML::HTMLTableColElement const&>(*column_box.dom_node());
|
||||
unsigned span = col_node.attribute(HTML::AttributeNames::span).to_uint().value_or(1);
|
||||
unsigned span = col_node.deprecated_attribute(HTML::AttributeNames::span).to_uint().value_or(1);
|
||||
column_index += span;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user