mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +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
42 changed files with 141 additions and 141 deletions
|
@ -93,7 +93,7 @@ Label const* Label::label_for_control_node(LabelableNode const& control)
|
|||
// same tree as the label element. If the attribute is specified and there is an element in the tree
|
||||
// whose ID is equal to the value of the for attribute, and the first such element in tree order is
|
||||
// a labelable element, then that element is the label element's labeled control.
|
||||
if (auto id = control.dom_node().attribute(HTML::AttributeNames::id); !id.is_empty()) {
|
||||
if (auto id = control.dom_node().deprecated_attribute(HTML::AttributeNames::id); !id.is_empty()) {
|
||||
Label const* label = nullptr;
|
||||
|
||||
control.document().layout_node()->for_each_in_inclusive_subtree_of_type<Label>([&](auto& node) {
|
||||
|
@ -128,7 +128,7 @@ LabelableNode* Label::labeled_control()
|
|||
// a labelable element, then that element is the label element's labeled control.
|
||||
if (auto for_ = dom_node().for_(); !for_.is_null()) {
|
||||
document().layout_node()->for_each_in_inclusive_subtree_of_type<LabelableNode>([&](auto& node) {
|
||||
if (node.dom_node().attribute(HTML::AttributeNames::id) == for_) {
|
||||
if (node.dom_node().deprecated_attribute(HTML::AttributeNames::id) == for_) {
|
||||
control = &node;
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue