LibWeb: Remove a bunch of calls to to_byte_string

A bunch of this is leftover from pre porting over to new AK::String.
For example, for functions which previously took a ByteString const&
now accepting a StringView.
This commit is contained in:
Shannon Booth
2024-04-05 09:26:03 +02:00
committed by Tim Flynn
parent 0090b916dd
commit c3217754f1
15 changed files with 21 additions and 30 deletions

View File

@@ -586,8 +586,6 @@ public:
WebIDL::ExceptionOr<void> process_candidate()
{
auto& vm = this->vm();
// 2. ⌛ Process candidate: If candidate does not have a src attribute, or if its src attribute's value is the
// empty string, then end the synchronous section, and jump down to the failed with elements step below.
String candiate_src;
@@ -603,7 +601,7 @@ public:
// would have resulted from parsing the URL specified by candidate's src attribute's value relative to the
// candidate's node document when the src attribute was last changed.
auto url_record = m_candidate->document().parse_url(candiate_src);
auto url_string = TRY_OR_THROW_OOM(vm, String::from_byte_string(url_record.to_byte_string()));
auto url_string = MUST(url_record.to_string());
// 4. ⌛ If urlString was not obtained successfully, then end the synchronous section, and jump down to the failed
// with elements step below.
@@ -851,7 +849,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::select_resource()
// 3. ⌛ If urlString was obtained successfully, set the currentSrc attribute to urlString.
if (url_record.is_valid())
m_current_src = TRY_OR_THROW_OOM(vm, String::from_byte_string(url_record.to_byte_string()));
m_current_src = MUST(url_record.to_string());
// 4. End the synchronous section, continuing the remaining steps in parallel.