Truly independent web browser
LibWeb: Only use the label and value attributes in the null namespace
Andreas Klingb3a2e4327295
diff --git a/Libraries/LibWeb/HTML/HTMLOptionElement.cpp b/Libraries/LibWeb/HTML/HTMLOptionElement.cppindex 12fc0602409..a48b8f4dde0 100644--- a/Libraries/LibWeb/HTML/HTMLOptionElement.cpp+++ b/Libraries/LibWeb/HTML/HTMLOptionElement.cpp@@ -105,7 +105,7 @@ Utf16String HTMLOptionElement::value() const{// The value of an option element is the value of the value content attribute, if there is one.// ...or, if there is not, the value of the element's text IDL attribute.- if (auto value = attribute(HTML::AttributeNames::value); value.has_value())+ if (auto value = get_attribute_ns({}, HTML::AttributeNames::value); value.has_value())return value.release_value();return text();}@@ -133,7 +133,7 @@ Utf16String HTMLOptionElement::label() const{// The label IDL attribute, on getting, if there is a label content attribute,// must return that attribute's value; otherwise, it must return the element's label.- if (auto label = attribute(HTML::AttributeNames::label); label.has_value())+ if (auto label = get_attribute_ns({}, HTML::AttributeNames::label); label.has_value())return label.release_value();return text();}diff --git a/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-option-element/option-label.txt b/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-option-element/option-label.txtindex 648582eec35..ac56839c790 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-option-element/option-label.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-option-element/option-label.txt@@ -2,17 +2,16 @@ Harness status: OKFound 12 tests-9 Pass-3 Fail+12 PassPass No children, no labelPass No children, empty labelPass No children, label-Fail No children, namespaced label+Pass No children, namespaced labelPass Single child, no labelPass Single child, empty labelPass Single child, label-Fail Single child, namespaced label+Pass Single child, namespaced labelPass Two children, no labelPass Two children, empty labelPass Two children, label-Fail Two children, namespaced label\ No newline at end of file+Pass Two children, namespaced label\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-option-element/option-value.txt b/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-option-element/option-value.txtindex 82ac1f6bbb3..b28c0b02942 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-option-element/option-value.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/semantics/forms/the-option-element/option-value.txt@@ -2,17 +2,16 @@ Harness status: OKFound 12 tests-9 Pass-3 Fail+12 PassPass No children, no valuePass No children, empty valuePass No children, value-Fail No children, namespaced value+Pass No children, namespaced valuePass Single child, no valuePass Single child, empty valuePass Single child, value-Fail Single child, namespaced value+Pass Single child, namespaced valuePass Two children, no valuePass Two children, empty valuePass Two children, value-Fail Two children, namespaced value\ No newline at end of file+Pass Two children, namespaced value\ No newline at end of file