mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-08 04:09:00 +00:00
LibWeb: Port XMLSerializer from DeprecatedString to String
This commit is contained in:
committed by
Andreas Kling
parent
e28fb5c64c
commit
6c42de3e8b
@@ -1422,11 +1422,11 @@ Messages::WebDriverClient::GetSourceResponse WebDriverConnection::get_source()
|
||||
|
||||
// 3. Let source be the result of invoking the fragment serializing algorithm on a fictional node whose only child is the document element providing true for the require well-formed flag. If this causes an exception to be thrown, let source be null.
|
||||
if (auto result = document->serialize_fragment(Web::DOMParsing::RequireWellFormed::Yes); !result.is_error())
|
||||
source = result.release_value();
|
||||
source = result.release_value().to_deprecated_string();
|
||||
|
||||
// 4. Let source be the result of serializing to string the current browsing context active document, if source is null.
|
||||
if (!source.has_value())
|
||||
source = MUST(document->serialize_fragment(Web::DOMParsing::RequireWellFormed::No));
|
||||
source = MUST(document->serialize_fragment(Web::DOMParsing::RequireWellFormed::No)).to_deprecated_string();
|
||||
|
||||
// 5. Return success with data source.
|
||||
return source.release_value();
|
||||
|
||||
Reference in New Issue
Block a user