1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

Browser+WebContent+WebDriver: Move Get Page Source to WebContent

This commit is contained in:
Timothy Flynn 2022-11-10 18:00:01 -05:00 committed by Linus Groh
parent 561f9f36f7
commit 88dcdf681f
16 changed files with 26 additions and 61 deletions

View file

@ -263,20 +263,6 @@ void ConnectionFromClient::get_source()
}
}
Messages::WebContentServer::SerializeSourceResponse ConnectionFromClient::serialize_source()
{
if (auto* doc = page().top_level_browsing_context().active_document()) {
auto result = doc->serialize_fragment(Web::DOMParsing::RequireWellFormed::Yes);
if (!result.is_error())
return { result.release_value() };
auto source = MUST(doc->serialize_fragment(Web::DOMParsing::RequireWellFormed::No));
return { move(source) };
}
return { {} };
}
void ConnectionFromClient::inspect_dom_tree()
{
if (auto* doc = page().top_level_browsing_context().active_document()) {