mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 21:31:52 +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
|
@ -66,7 +66,7 @@ void HTMLBaseElement::set_the_frozen_base_url()
|
|||
auto& document = this->document();
|
||||
|
||||
// 2. Let urlRecord be the result of parsing the value of element's href content attribute with document's fallback base URL, and document's character encoding. (Thus, the base element isn't affected by itself.)
|
||||
auto href = attribute(AttributeNames::href);
|
||||
auto href = deprecated_attribute(AttributeNames::href);
|
||||
auto url_record = document.fallback_base_url().complete_url(href);
|
||||
|
||||
// 3. Set element's frozen base URL to document's fallback base URL, if urlRecord is failure or running Is base allowed for Document? on the resulting URL record and document returns "Blocked", and to urlRecord otherwise.
|
||||
|
@ -88,7 +88,7 @@ DeprecatedString HTMLBaseElement::href() const
|
|||
// 2. Let url be the value of the href attribute of this element, if it has one, and the empty string otherwise.
|
||||
auto url = DeprecatedString::empty();
|
||||
if (has_attribute(AttributeNames::href))
|
||||
url = attribute(AttributeNames::href);
|
||||
url = deprecated_attribute(AttributeNames::href);
|
||||
|
||||
// 3. Let urlRecord be the result of parsing url with document's fallback base URL, and document's character encoding. (Thus, the base element isn't affected by other base elements or itself.)
|
||||
// FIXME: Pass in document's character encoding.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue