mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
AK+Everywhere: Replace "protocol" with "scheme" url helpers
URL had properly named replacements for protocol(), set_protocol() and create_with_file_protocol() already. This patch removes these function and updates all call sites to use the functions named according to the specification. See https://url.spec.whatwg.org/#concept-url-scheme
This commit is contained in:
parent
454bf1fde0
commit
4230dbbb21
61 changed files with 113 additions and 116 deletions
|
@ -264,7 +264,7 @@ Optional<Position> Sheet::position_from_url(const URL& url) const
|
|||
return {};
|
||||
}
|
||||
|
||||
if (url.protocol() != "spreadsheet" || url.host() != "cell") {
|
||||
if (url.scheme() != "spreadsheet" || url.host() != "cell") {
|
||||
dbgln("Bad url: {}", url.to_string());
|
||||
return {};
|
||||
}
|
||||
|
@ -756,7 +756,7 @@ String Position::to_cell_identifier(Sheet const& sheet) const
|
|||
URL Position::to_url(Sheet const& sheet) const
|
||||
{
|
||||
URL url;
|
||||
url.set_protocol("spreadsheet");
|
||||
url.set_scheme("spreadsheet");
|
||||
url.set_host("cell");
|
||||
url.set_paths({ String::number(getpid()) });
|
||||
url.set_fragment(to_cell_identifier(sheet));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue