mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
LibURL: Rename 'cannot be a base URL' state to 'opaque path' state
This follows a rename made in the URL specification.
This commit is contained in:
parent
f8f21319f9
commit
f775ee8a93
Notes:
github-actions[bot]
2025-03-15 11:40:33 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/f775ee8a937 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3812 Reviewed-by: https://github.com/tcl3 Reviewed-by: https://github.com/trflynn89
2 changed files with 3 additions and 3 deletions
|
@ -894,7 +894,7 @@ Optional<URL> Parser::basic_parse(StringView raw_input, Optional<URL const&> bas
|
|||
else {
|
||||
url->m_data->cannot_be_a_base_url = true;
|
||||
url->append_slash();
|
||||
state = State::CannotBeABaseUrlPath;
|
||||
state = State::OpaquePath;
|
||||
}
|
||||
}
|
||||
// 3. Otherwise, if state override is not given, set buffer to the empty string, state to no scheme state, and start over (from the first code point in input).
|
||||
|
@ -1539,7 +1539,7 @@ Optional<URL> Parser::basic_parse(StringView raw_input, Optional<URL const&> bas
|
|||
}
|
||||
break;
|
||||
// -> opaque path state, https://url.spec.whatwg.org/#cannot-be-a-base-url-path-state
|
||||
case State::CannotBeABaseUrlPath:
|
||||
case State::OpaquePath:
|
||||
// NOTE: This does not follow the spec exactly but rather uses the buffer and only sets the path on EOF.
|
||||
VERIFY(url->m_data->paths.size() == 1 && url->m_data->paths[0].is_empty());
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace URL {
|
|||
STATE(FileHost) \
|
||||
STATE(PathStart) \
|
||||
STATE(Path) \
|
||||
STATE(CannotBeABaseUrlPath) \
|
||||
STATE(OpaquePath) \
|
||||
STATE(Query) \
|
||||
STATE(Fragment)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue