mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Convert Web::DOM::Position::to_deprecated_string to String
This commit is contained in:
parent
cd5868a0f1
commit
2c4acba883
Notes:
sideshowbarker
2024-07-17 03:35:16 +09:00
Author: https://github.com/trflynn89
Commit: 2c4acba883
Pull-request: https://github.com/SerenityOS/serenity/pull/17679
Reviewed-by: https://github.com/linusg ✅
2 changed files with 8 additions and 9 deletions
|
@ -18,11 +18,11 @@ Position::Position(Node& node, unsigned offset)
|
|||
{
|
||||
}
|
||||
|
||||
DeprecatedString Position::to_deprecated_string() const
|
||||
ErrorOr<String> Position::to_string() const
|
||||
{
|
||||
if (!node())
|
||||
return DeprecatedString::formatted("DOM::Position(nullptr, {})", offset());
|
||||
return DeprecatedString::formatted("DOM::Position({} ({})), {})", node()->node_name(), node(), offset());
|
||||
return String::formatted("DOM::Position(nullptr, {})", offset());
|
||||
return String::formatted("DOM::Position({} ({})), {})", node()->node_name(), node(), offset());
|
||||
}
|
||||
|
||||
bool Position::increment_offset()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue