summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-06 01:12:49 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-06 08:54:33 +0100
commit57dc179b1fce5d4b7171311b04667debfe693095 (patch)
treea459d1aef92dc4e49bbf03b32621b1e7e30d4e64 /Userland/Libraries
parent6e19ab2bbce0b113b628e6f8e9b5c0640053933e (diff)
downloadserenity-57dc179b1fce5d4b7171311b04667debfe693095.zip
Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibC/arpa/inet.cpp2
-rw-r--r--Userland/Libraries/LibC/netdb.cpp2
-rw-r--r--Userland/Libraries/LibC/stdio.cpp4
-rw-r--r--Userland/Libraries/LibChess/Chess.cpp6
-rw-r--r--Userland/Libraries/LibChess/Chess.h4
-rw-r--r--Userland/Libraries/LibChess/UCICommand.cpp26
-rw-r--r--Userland/Libraries/LibChess/UCICommand.h26
-rw-r--r--Userland/Libraries/LibChess/UCIEndpoint.cpp4
-rw-r--r--Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.cpp4
-rw-r--r--Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.h2
-rw-r--r--Userland/Libraries/LibCompress/Gzip.cpp2
-rw-r--r--Userland/Libraries/LibCore/Account.cpp4
-rw-r--r--Userland/Libraries/LibCore/ArgsParser.cpp2
-rw-r--r--Userland/Libraries/LibCore/ConfigFile.cpp6
-rw-r--r--Userland/Libraries/LibCore/DateTime.cpp2
-rw-r--r--Userland/Libraries/LibCore/DateTime.h2
-rw-r--r--Userland/Libraries/LibCore/DirIterator.cpp2
-rw-r--r--Userland/Libraries/LibCore/EventLoop.cpp4
-rw-r--r--Userland/Libraries/LibCore/Group.cpp2
-rw-r--r--Userland/Libraries/LibCore/MimeData.cpp2
-rw-r--r--Userland/Libraries/LibCore/Object.h2
-rw-r--r--Userland/Libraries/LibCore/ProcessStatisticsReader.cpp14
-rw-r--r--Userland/Libraries/LibCore/SocketAddress.h4
-rw-r--r--Userland/Libraries/LibCore/StandardPaths.cpp8
-rw-r--r--Userland/Libraries/LibCore/System.cpp8
-rw-r--r--Userland/Libraries/LibCore/SystemServerTakeover.cpp2
-rw-r--r--Userland/Libraries/LibCoredump/Backtrace.cpp2
-rw-r--r--Userland/Libraries/LibCoredump/Backtrace.h2
-rw-r--r--Userland/Libraries/LibCpp/AST.cpp30
-rw-r--r--Userland/Libraries/LibCpp/AST.h10
-rw-r--r--Userland/Libraries/LibCpp/Parser.cpp12
-rw-r--r--Userland/Libraries/LibCpp/Preprocessor.cpp4
-rw-r--r--Userland/Libraries/LibCpp/SemanticSyntaxHighlighter.cpp4
-rw-r--r--Userland/Libraries/LibCpp/SyntaxHighlighter.cpp2
-rw-r--r--Userland/Libraries/LibCpp/Token.cpp4
-rw-r--r--Userland/Libraries/LibCpp/Token.h4
-rw-r--r--Userland/Libraries/LibCrypto/BigFraction/BigFraction.cpp4
-rw-r--r--Userland/Libraries/LibCrypto/BigFraction/BigFraction.h2
-rw-r--r--Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp2
-rw-r--r--Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp2
-rw-r--r--Userland/Libraries/LibCrypto/Cipher/AES.cpp4
-rw-r--r--Userland/Libraries/LibCrypto/Cipher/AES.h4
-rw-r--r--Userland/Libraries/LibDNS/Name.cpp6
-rw-r--r--Userland/Libraries/LibDebug/DebugInfo.cpp2
-rw-r--r--Userland/Libraries/LibDebug/DebugSession.cpp2
-rw-r--r--Userland/Libraries/LibDesktop/Launcher.cpp10
-rw-r--r--Userland/Libraries/LibDiff/Format.cpp2
-rw-r--r--Userland/Libraries/LibELF/Core.h2
-rw-r--r--Userland/Libraries/LibELF/DynamicLoader.cpp2
-rw-r--r--Userland/Libraries/LibGUI/AbstractTableView.cpp4
-rw-r--r--Userland/Libraries/LibGUI/AbstractView.cpp4
-rw-r--r--Userland/Libraries/LibGUI/AutocompleteProvider.cpp2
-rw-r--r--Userland/Libraries/LibGUI/ColorInput.cpp2
-rw-r--r--Userland/Libraries/LibGUI/ColorPicker.cpp4
-rw-r--r--Userland/Libraries/LibGUI/ColumnsView.cpp4
-rw-r--r--Userland/Libraries/LibGUI/ComboBox.cpp2
-rw-r--r--Userland/Libraries/LibGUI/CommandPalette.cpp2
-rw-r--r--Userland/Libraries/LibGUI/CommonLocationsProvider.cpp4
-rw-r--r--Userland/Libraries/LibGUI/ConnectionToWindowServer.cpp8
-rw-r--r--Userland/Libraries/LibGUI/EmojiInputDialog.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Event.cpp4
-rw-r--r--Userland/Libraries/LibGUI/Event.h4
-rw-r--r--Userland/Libraries/LibGUI/FileSystemModel.cpp6
-rw-r--r--Userland/Libraries/LibGUI/FileSystemModel.h2
-rw-r--r--Userland/Libraries/LibGUI/FontPicker.cpp4
-rw-r--r--Userland/Libraries/LibGUI/GML/AST.h4
-rw-r--r--Userland/Libraries/LibGUI/GML/Formatter.h2
-rw-r--r--Userland/Libraries/LibGUI/IconView.cpp2
-rw-r--r--Userland/Libraries/LibGUI/ItemListModel.h4
-rw-r--r--Userland/Libraries/LibGUI/JsonArrayModel.cpp4
-rw-r--r--Userland/Libraries/LibGUI/ListView.cpp4
-rw-r--r--Userland/Libraries/LibGUI/Menu.cpp2
-rw-r--r--Userland/Libraries/LibGUI/MenuItem.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Model.cpp6
-rw-r--r--Userland/Libraries/LibGUI/ModelEditingDelegate.h2
-rw-r--r--Userland/Libraries/LibGUI/Progressbar.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Shortcut.cpp4
-rw-r--r--Userland/Libraries/LibGUI/Shortcut.h2
-rw-r--r--Userland/Libraries/LibGUI/TabWidget.cpp2
-rw-r--r--Userland/Libraries/LibGUI/TableView.cpp2
-rw-r--r--Userland/Libraries/LibGUI/TextDocument.cpp10
-rw-r--r--Userland/Libraries/LibGUI/TextEditor.cpp4
-rw-r--r--Userland/Libraries/LibGUI/Toolbar.cpp4
-rw-r--r--Userland/Libraries/LibGUI/TreeView.cpp12
-rw-r--r--Userland/Libraries/LibGUI/Variant.cpp8
-rw-r--r--Userland/Libraries/LibGUI/Variant.h2
-rw-r--r--Userland/Libraries/LibGUI/VimEditingEngine.cpp8
-rw-r--r--Userland/Libraries/LibGUI/Widget.cpp16
-rw-r--r--Userland/Libraries/LibGUI/Window.cpp2
-rw-r--r--Userland/Libraries/LibGemini/GeminiRequest.cpp2
-rw-r--r--Userland/Libraries/LibGemini/Line.cpp4
-rw-r--r--Userland/Libraries/LibGfx/Color.cpp6
-rw-r--r--Userland/Libraries/LibGfx/Color.h4
-rw-r--r--Userland/Libraries/LibGfx/DDSLoader.cpp2
-rw-r--r--Userland/Libraries/LibGfx/Font/BitmapFont.cpp2
-rw-r--r--Userland/Libraries/LibGfx/Line.h6
-rw-r--r--Userland/Libraries/LibGfx/Painter.cpp2
-rw-r--r--Userland/Libraries/LibGfx/Path.cpp14
-rw-r--r--Userland/Libraries/LibGfx/Path.h2
-rw-r--r--Userland/Libraries/LibGfx/Point.cpp4
-rw-r--r--Userland/Libraries/LibGfx/Point.h2
-rw-r--r--Userland/Libraries/LibGfx/PortableImageLoaderCommon.h2
-rw-r--r--Userland/Libraries/LibGfx/Rect.cpp4
-rw-r--r--Userland/Libraries/LibGfx/Rect.h2
-rw-r--r--Userland/Libraries/LibGfx/Size.cpp4
-rw-r--r--Userland/Libraries/LibGfx/Size.h2
-rw-r--r--Userland/Libraries/LibGfx/TextLayout.cpp8
-rw-r--r--Userland/Libraries/LibGfx/Triangle.cpp4
-rw-r--r--Userland/Libraries/LibGfx/Triangle.h2
-rw-r--r--Userland/Libraries/LibGfx/Vector2.h2
-rw-r--r--Userland/Libraries/LibGfx/Vector3.h2
-rw-r--r--Userland/Libraries/LibGfx/Vector4.h2
-rw-r--r--Userland/Libraries/LibGfx/VectorN.h2
-rw-r--r--Userland/Libraries/LibHTTP/HttpRequest.cpp8
-rw-r--r--Userland/Libraries/LibHTTP/HttpRequest.h2
-rw-r--r--Userland/Libraries/LibHTTP/Job.cpp2
-rw-r--r--Userland/Libraries/LibIDL/IDLParser.cpp6
-rw-r--r--Userland/Libraries/LibIMAP/Client.cpp2
-rw-r--r--Userland/Libraries/LibIMAP/Objects.cpp10
-rw-r--r--Userland/Libraries/LibIMAP/Parser.cpp2
-rw-r--r--Userland/Libraries/LibIPC/Encoder.cpp2
-rw-r--r--Userland/Libraries/LibJS/AST.cpp2
-rw-r--r--Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp2
-rw-r--r--Userland/Libraries/LibJS/Bytecode/CodeGenerationError.h2
-rw-r--r--Userland/Libraries/LibJS/Bytecode/Generator.cpp2
-rw-r--r--Userland/Libraries/LibJS/Bytecode/Instruction.h2
-rw-r--r--Userland/Libraries/LibJS/Bytecode/Op.cpp116
-rw-r--r--Userland/Libraries/LibJS/Bytecode/Op.h178
-rw-r--r--Userland/Libraries/LibJS/Console.cpp14
-rw-r--r--Userland/Libraries/LibJS/Console.h2
-rw-r--r--Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp2
-rw-r--r--Userland/Libraries/LibJS/Contrib/Test262/IsHTMLDDA.cpp2
-rw-r--r--Userland/Libraries/LibJS/MarkupGenerator.cpp6
-rw-r--r--Userland/Libraries/LibJS/Parser.cpp6
-rw-r--r--Userland/Libraries/LibJS/Parser.h2
-rw-r--r--Userland/Libraries/LibJS/ParserError.cpp2
-rw-r--r--Userland/Libraries/LibJS/ParserError.h2
-rw-r--r--Userland/Libraries/LibJS/Print.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/BigInt.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/DateConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/DatePrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp10
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp18
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp24
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DurationFormatConstructor.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/ListFormat.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp12
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp36
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/PluralRulesConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/SegmenterConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/JSONObject.cpp18
-rw-r--r--Userland/Libraries/LibJS/Runtime/Object.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp18
-rw-r--r--Userland/Libraries/LibJS/Runtime/PrimitiveString.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Reference.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Reference.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringOrSymbol.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringPrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Symbol.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp20
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/VM.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Value.cpp30
-rw-r--r--Userland/Libraries/LibJS/Runtime/ValueTraits.h2
-rw-r--r--Userland/Libraries/LibJS/Token.cpp4
-rw-r--r--Userland/Libraries/LibKeyboard/CharacterMapFile.cpp2
-rw-r--r--Userland/Libraries/LibLine/Editor.cpp10
-rw-r--r--Userland/Libraries/LibLine/InternalFunctions.cpp4
-rw-r--r--Userland/Libraries/LibLine/Style.h2
-rw-r--r--Userland/Libraries/LibLocale/Locale.cpp12
-rw-r--r--Userland/Libraries/LibLocale/Locale.h4
-rw-r--r--Userland/Libraries/LibMarkdown/HorizontalRule.cpp2
-rw-r--r--Userland/Libraries/LibMarkdown/Table.cpp4
-rw-r--r--Userland/Libraries/LibPDF/Document.cpp8
-rw-r--r--Userland/Libraries/LibPDF/Document.h14
-rw-r--r--Userland/Libraries/LibPDF/DocumentParser.cpp6
-rw-r--r--Userland/Libraries/LibPDF/Object.h4
-rw-r--r--Userland/Libraries/LibPDF/ObjectDerivatives.cpp30
-rw-r--r--Userland/Libraries/LibPDF/ObjectDerivatives.h12
-rw-r--r--Userland/Libraries/LibPDF/Operator.h2
-rw-r--r--Userland/Libraries/LibPDF/Parser.cpp8
-rw-r--r--Userland/Libraries/LibPDF/Renderer.h6
-rw-r--r--Userland/Libraries/LibPDF/Value.cpp4
-rw-r--r--Userland/Libraries/LibPDF/Value.h4
-rw-r--r--Userland/Libraries/LibPDF/XRefTable.h2
-rw-r--r--Userland/Libraries/LibRegex/RegexByteCode.cpp18
-rw-r--r--Userland/Libraries/LibRegex/RegexByteCode.h4
-rw-r--r--Userland/Libraries/LibRegex/RegexDebug.h12
-rw-r--r--Userland/Libraries/LibRegex/RegexMatch.h36
-rw-r--r--Userland/Libraries/LibRegex/RegexMatcher.cpp2
-rw-r--r--Userland/Libraries/LibRegex/RegexMatcher.h10
-rw-r--r--Userland/Libraries/LibSQL/AST/Expression.cpp16
-rw-r--r--Userland/Libraries/LibSQL/AST/Parser.h2
-rw-r--r--Userland/Libraries/LibSQL/HashIndex.cpp12
-rw-r--r--Userland/Libraries/LibSQL/Meta.cpp4
-rw-r--r--Userland/Libraries/LibSQL/Serializer.h4
-rw-r--r--Userland/Libraries/LibSQL/TreeNode.cpp30
-rw-r--r--Userland/Libraries/LibSQL/Tuple.cpp8
-rw-r--r--Userland/Libraries/LibSQL/Tuple.h6
-rw-r--r--Userland/Libraries/LibSQL/TupleDescriptor.h6
-rw-r--r--Userland/Libraries/LibSQL/Value.cpp6
-rw-r--r--Userland/Libraries/LibSQL/Value.h4
-rw-r--r--Userland/Libraries/LibSoftGPU/Device.cpp2
-rw-r--r--Userland/Libraries/LibSymbolication/Symbolication.cpp2
-rw-r--r--Userland/Libraries/LibTLS/Certificate.cpp2
-rw-r--r--Userland/Libraries/LibTLS/TLSv12.cpp4
-rw-r--r--Userland/Libraries/LibTest/JavaScriptTestRunner.h6
-rw-r--r--Userland/Libraries/LibTest/TestRunner.h2
-rw-r--r--Userland/Libraries/LibTextCodec/Decoder.cpp6
-rw-r--r--Userland/Libraries/LibUnicode/Normalize.cpp2
-rw-r--r--Userland/Libraries/LibVT/Terminal.cpp2
-rw-r--r--Userland/Libraries/LibVT/TerminalWidget.cpp4
-rw-r--r--Userland/Libraries/LibVideo/PlaybackManager.cpp2
-rw-r--r--Userland/Libraries/LibWasm/AbstractMachine/Validator.h2
-rw-r--r--Userland/Libraries/LibWasm/Parser/Parser.cpp2
-rw-r--r--Userland/Libraries/LibWasm/Types.h2
-rw-r--r--Userland/Libraries/LibWeb/Bindings/LocationObject.cpp2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Angle.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Angle.h4
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSFontFaceRule.cpp6
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSImportRule.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSImportRule.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp2
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp10
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSStyleRule.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSStyleSheet.cpp2
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Display.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Display.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Frequency.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Frequency.h4
-rw-r--r--Userland/Libraries/LibWeb/CSS/GridTrackPlacement.cpp6
-rw-r--r--Userland/Libraries/LibWeb/CSS/GridTrackPlacement.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/GridTrackSize.cpp34
-rw-r--r--Userland/Libraries/LibWeb/CSS/GridTrackSize.h10
-rw-r--r--Userland/Libraries/LibWeb/CSS/Length.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Length.h4
-rw-r--r--Userland/Libraries/LibWeb/CSS/MediaList.cpp6
-rw-r--r--Userland/Libraries/LibWeb/CSS/MediaQuery.cpp36
-rw-r--r--Userland/Libraries/LibWeb/CSS/MediaQuery.h14
-rw-r--r--Userland/Libraries/LibWeb/CSS/Number.h4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Block.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Block.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.cpp12
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Declaration.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Declaration.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp8
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Function.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Function.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp18
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Rule.cpp6
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Rule.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Token.cpp2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Token.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp12
-rw-r--r--Userland/Libraries/LibWeb/CSS/Percentage.h18
-rw-r--r--Userland/Libraries/LibWeb/CSS/Ratio.cpp2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Ratio.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Resolution.cpp2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Resolution.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Selector.cpp6
-rw-r--r--Userland/Libraries/LibWeb/CSS/Selector.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/Serialize.cpp18
-rw-r--r--Userland/Libraries/LibWeb/CSS/Size.cpp6
-rw-r--r--Userland/Libraries/LibWeb/CSS/Size.h4
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleComputer.cpp6
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleProperties.cpp16
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValue.cpp228
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValue.h106
-rw-r--r--Userland/Libraries/LibWeb/CSS/Supports.cpp23
-rw-r--r--Userland/Libraries/LibWeb/CSS/Supports.h14
-rw-r--r--Userland/Libraries/LibWeb/CSS/Time.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/Time.h4
-rw-r--r--Userland/Libraries/LibWeb/CSS/UnicodeRange.h2
-rw-r--r--Userland/Libraries/LibWeb/Crypto/Crypto.cpp2
-rw-r--r--Userland/Libraries/LibWeb/DOM/CharacterData.cpp2
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp4
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.h4
-rw-r--r--Userland/Libraries/LibWeb/DOM/Element.cpp2
-rw-r--r--Userland/Libraries/LibWeb/DOM/EventTarget.cpp4
-rw-r--r--Userland/Libraries/LibWeb/DOM/Node.cpp6
-rw-r--r--Userland/Libraries/LibWeb/DOM/Position.cpp2
-rw-r--r--Userland/Libraries/LibWeb/DOM/Position.h4
-rw-r--r--Userland/Libraries/LibWeb/DOM/Range.cpp4
-rw-r--r--Userland/Libraries/LibWeb/DOM/Range.h2
-rw-r--r--Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp26
-rw-r--r--Userland/Libraries/LibWeb/Dump.cpp12
-rw-r--r--Userland/Libraries/LibWeb/Fetch/Body.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Fetch/BodyInit.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.cpp2
-rw-r--r--Userland/Libraries/LibWeb/FileAPI/Blob.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h4
-rw-r--r--Userland/Libraries/LibWeb/HTML/DOMParser.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/DOMStringMap.cpp6
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp4
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp4
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp6
-rw-r--r--Userland/Libraries/LibWeb/HTML/Origin.h2
-rw-r--r--Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp10
-rw-r--r--Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp8
-rw-r--r--Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.cpp4
-rw-r--r--Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h2
-rw-r--r--Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp4
-rw-r--r--Userland/Libraries/LibWeb/HTML/Scripting/ModuleMap.h2
-rw-r--r--Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/Worker.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Infra/JSON.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/AvailableSpace.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Layout/AvailableSpace.h8
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingContext.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/Node.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/TextNode.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Loader/ContentFilter.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Loader/FrameLoader.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Loader/LoadRequest.h2
-rw-r--r--Userland/Libraries/LibWeb/Loader/ProxyMappings.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp4
-rw-r--r--Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Page/EditEventHandler.cpp8
-rw-r--r--Userland/Libraries/LibWeb/Painting/PaintableBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Painting/StackingContext.cpp2
-rw-r--r--Userland/Libraries/LibWeb/SecureContexts/AbstractOperations.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Selection/Selection.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Selection/Selection.h2
-rw-r--r--Userland/Libraries/LibWeb/URL/URLSearchParams.cpp6
-rw-r--r--Userland/Libraries/LibWeb/URL/URLSearchParams.h2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp2
-rw-r--r--Userland/Libraries/LibWeb/WebDriver/Client.cpp8
-rw-r--r--Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp4
-rw-r--r--Userland/Libraries/LibWeb/WebSockets/WebSocket.h2
-rw-r--r--Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp4
-rw-r--r--Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp2
-rw-r--r--Userland/Libraries/LibWebSocket/ConnectionInfo.cpp2
-rw-r--r--Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp2
-rw-r--r--Userland/Libraries/LibWebSocket/WebSocket.cpp2
-rw-r--r--Userland/Libraries/LibWebView/DOMTreeModel.cpp6
-rw-r--r--Userland/Libraries/LibWebView/OutOfProcessWebView.cpp6
-rw-r--r--Userland/Libraries/LibWebView/StylePropertiesModel.cpp2
-rw-r--r--Userland/Libraries/LibX86/Instruction.cpp112
-rw-r--r--Userland/Libraries/LibX86/Instruction.h40
-rw-r--r--Userland/Libraries/LibXML/Parser/Parser.cpp8
379 files changed, 1380 insertions, 1379 deletions
diff --git a/Userland/Libraries/LibC/arpa/inet.cpp b/Userland/Libraries/LibC/arpa/inet.cpp
index 542fde7482..b404bd968d 100644
--- a/Userland/Libraries/LibC/arpa/inet.cpp
+++ b/Userland/Libraries/LibC/arpa/inet.cpp
@@ -27,7 +27,7 @@ char const* inet_ntop(int af, void const* src, char* dst, socklen_t len)
errno = ENOSPC;
return nullptr;
}
- auto str = IPv6Address(((in6_addr const*)src)->s6_addr).to_string();
+ auto str = IPv6Address(((in6_addr const*)src)->s6_addr).to_deprecated_string();
if (!str.copy_characters_to_buffer(dst, len)) {
errno = ENOSPC;
return nullptr;
diff --git a/Userland/Libraries/LibC/netdb.cpp b/Userland/Libraries/LibC/netdb.cpp
index 82042e1d16..20ba73f0ae 100644
--- a/Userland/Libraries/LibC/netdb.cpp
+++ b/Userland/Libraries/LibC/netdb.cpp
@@ -98,7 +98,7 @@ hostent* gethostbyname(char const* name)
auto ipv4_address = IPv4Address::from_string({ name, strlen(name) });
if (ipv4_address.has_value()) {
- gethostbyname_name_buffer = ipv4_address.value().to_string();
+ gethostbyname_name_buffer = ipv4_address.value().to_deprecated_string();
__gethostbyname_buffer.h_name = const_cast<char*>(gethostbyname_name_buffer.characters());
__gethostbyname_alias_list_buffer[0] = nullptr;
__gethostbyname_buffer.h_aliases = __gethostbyname_alias_list_buffer;
diff --git a/Userland/Libraries/LibC/stdio.cpp b/Userland/Libraries/LibC/stdio.cpp
index f95fb2aab1..e73c64c856 100644
--- a/Userland/Libraries/LibC/stdio.cpp
+++ b/Userland/Libraries/LibC/stdio.cpp
@@ -930,7 +930,7 @@ int vasprintf(char** strp, char const* fmt, va_list ap)
builder.appendvf(fmt, ap);
VERIFY(builder.length() <= NumericLimits<int>::max());
int length = builder.length();
- *strp = strdup(builder.to_string().characters());
+ *strp = strdup(builder.to_deprecated_string().characters());
return length;
}
@@ -944,7 +944,7 @@ int asprintf(char** strp, char const* fmt, ...)
va_end(ap);
VERIFY(builder.length() <= NumericLimits<int>::max());
int length = builder.length();
- *strp = strdup(builder.to_string().characters());
+ *strp = strdup(builder.to_deprecated_string().characters());
return length;
}
diff --git a/Userland/Libraries/LibChess/Chess.cpp b/Userland/Libraries/LibChess/Chess.cpp
index d7a5edf4b3..53aeee2501 100644
--- a/Userland/Libraries/LibChess/Chess.cpp
+++ b/Userland/Libraries/LibChess/Chess.cpp
@@ -333,7 +333,7 @@ DeprecatedString Board::to_fen() const
// 6. Fullmove number
builder.append(DeprecatedString::number(1 + m_moves.size() / 2));
- return builder.to_string();
+ return builder.to_deprecated_string();
}
Piece Board::get_piece(Square const& square) const
@@ -886,7 +886,7 @@ void Board::set_resigned(Chess::Color c)
m_resigned = c;
}
-DeprecatedString Board::result_to_string(Result result, Color turn)
+DeprecatedString Board::result_to_deprecated_string(Result result, Color turn)
{
switch (result) {
case Result::CheckMate:
@@ -915,7 +915,7 @@ DeprecatedString Board::result_to_string(Result result, Color turn)
}
}
-DeprecatedString Board::result_to_points(Result result, Color turn)
+DeprecatedString Board::result_to_points_deprecated_string(Result result, Color turn)
{
switch (result) {
case Result::CheckMate:
diff --git a/Userland/Libraries/LibChess/Chess.h b/Userland/Libraries/LibChess/Chess.h
index fd9501e156..abff2180f9 100644
--- a/Userland/Libraries/LibChess/Chess.h
+++ b/Userland/Libraries/LibChess/Chess.h
@@ -145,8 +145,8 @@ public:
NotFinished,
};
- static DeprecatedString result_to_string(Result, Color turn);
- static DeprecatedString result_to_points(Result, Color turn);
+ static DeprecatedString result_to_deprecated_string(Result, Color turn);
+ static DeprecatedString result_to_points_deprecated_string(Result, Color turn);
template<typename Callback>
void generate_moves(Callback callback, Color color = Color::None) const;
diff --git a/Userland/Libraries/LibChess/UCICommand.cpp b/Userland/Libraries/LibChess/UCICommand.cpp
index 7cad448658..3553ca3b69 100644
--- a/Userland/Libraries/LibChess/UCICommand.cpp
+++ b/Userland/Libraries/LibChess/UCICommand.cpp
@@ -17,7 +17,7 @@ UCICommand UCICommand::from_string(StringView command)
return UCICommand();
}
-DeprecatedString UCICommand::to_string() const
+DeprecatedString UCICommand::to_deprecated_string() const
{
return "uci\n";
}
@@ -35,7 +35,7 @@ DebugCommand DebugCommand::from_string(StringView command)
VERIFY_NOT_REACHED();
}
-DeprecatedString DebugCommand::to_string() const
+DeprecatedString DebugCommand::to_deprecated_string() const
{
if (flag() == Flag::On) {
return "debug on\n";
@@ -52,7 +52,7 @@ IsReadyCommand IsReadyCommand::from_string(StringView command)
return IsReadyCommand();
}
-DeprecatedString IsReadyCommand::to_string() const
+DeprecatedString IsReadyCommand::to_deprecated_string() const
{
return "isready\n";
}
@@ -92,10 +92,10 @@ SetOptionCommand SetOptionCommand::from_string(StringView command)
VERIFY(!name.is_empty());
- return SetOptionCommand(name.to_string().trim_whitespace(), value.to_string().trim_whitespace());
+ return SetOptionCommand(name.to_deprecated_string().trim_whitespace(), value.to_deprecated_string().trim_whitespace());
}
-DeprecatedString SetOptionCommand::to_string() const
+DeprecatedString SetOptionCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("setoption name "sv);
@@ -126,7 +126,7 @@ PositionCommand PositionCommand::from_string(StringView command)
return PositionCommand(fen, moves);
}
-DeprecatedString PositionCommand::to_string() const
+DeprecatedString PositionCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("position "sv);
@@ -190,7 +190,7 @@ GoCommand GoCommand::from_string(StringView command)
return go_command;
}
-DeprecatedString GoCommand::to_string() const
+DeprecatedString GoCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("go"sv);
@@ -238,7 +238,7 @@ StopCommand StopCommand::from_string(StringView command)
return StopCommand();
}
-DeprecatedString StopCommand::to_string() const
+DeprecatedString StopCommand::to_deprecated_string() const
{
return "stop\n";
}
@@ -263,7 +263,7 @@ IdCommand IdCommand::from_string(StringView command)
VERIFY_NOT_REACHED();
}
-DeprecatedString IdCommand::to_string() const
+DeprecatedString IdCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("id "sv);
@@ -285,7 +285,7 @@ UCIOkCommand UCIOkCommand::from_string(StringView command)
return UCIOkCommand();
}
-DeprecatedString UCIOkCommand::to_string() const
+DeprecatedString UCIOkCommand::to_deprecated_string() const
{
return "uciok\n";
}
@@ -298,7 +298,7 @@ ReadyOkCommand ReadyOkCommand::from_string(StringView command)
return ReadyOkCommand();
}
-DeprecatedString ReadyOkCommand::to_string() const
+DeprecatedString ReadyOkCommand::to_deprecated_string() const
{
return "readyok\n";
}
@@ -311,7 +311,7 @@ BestMoveCommand BestMoveCommand::from_string(StringView command)
return BestMoveCommand(Move(tokens[1]));
}
-DeprecatedString BestMoveCommand::to_string() const
+DeprecatedString BestMoveCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("bestmove "sv);
@@ -326,7 +326,7 @@ InfoCommand InfoCommand::from_string([[maybe_unused]] StringView command)
VERIFY_NOT_REACHED();
}
-DeprecatedString InfoCommand::to_string() const
+DeprecatedString InfoCommand::to_deprecated_string() const
{
// FIXME: Implement this.
VERIFY_NOT_REACHED();
diff --git a/Userland/Libraries/LibChess/UCICommand.h b/Userland/Libraries/LibChess/UCICommand.h
index ef2f8f0e5e..f75d22308c 100644
--- a/Userland/Libraries/LibChess/UCICommand.h
+++ b/Userland/Libraries/LibChess/UCICommand.h
@@ -44,7 +44,7 @@ public:
{
}
- virtual DeprecatedString to_string() const = 0;
+ virtual DeprecatedString to_deprecated_string() const = 0;
virtual ~Command() = default;
};
@@ -58,7 +58,7 @@ public:
static UCICommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
};
class DebugCommand : public Command {
@@ -76,7 +76,7 @@ public:
static DebugCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
Flag flag() const { return m_flag; }
@@ -93,7 +93,7 @@ public:
static IsReadyCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
};
class SetOptionCommand : public Command {
@@ -107,7 +107,7 @@ public:
static SetOptionCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
DeprecatedString const& name() const { return m_name; }
Optional<DeprecatedString> const& value() const { return m_value; }
@@ -128,7 +128,7 @@ public:
static PositionCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
Optional<DeprecatedString> const& fen() const { return m_fen; }
Vector<Chess::Move> const& moves() const { return m_moves; }
@@ -147,7 +147,7 @@ public:
static GoCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
Optional<Vector<Chess::Move>> searchmoves;
bool ponder { false };
@@ -172,7 +172,7 @@ public:
static StopCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
};
class IdCommand : public Command {
@@ -191,7 +191,7 @@ public:
static IdCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
Type field_type() const { return m_field_type; }
DeprecatedString const& value() const { return m_value; }
@@ -210,7 +210,7 @@ public:
static UCIOkCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
};
class ReadyOkCommand : public Command {
@@ -222,7 +222,7 @@ public:
static ReadyOkCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
};
class BestMoveCommand : public Command {
@@ -235,7 +235,7 @@ public:
static BestMoveCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
Chess::Move move() const { return m_move; }
@@ -252,7 +252,7 @@ public:
static InfoCommand from_string(StringView command);
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
Optional<int> depth;
Optional<int> seldepth;
diff --git a/Userland/Libraries/LibChess/UCIEndpoint.cpp b/Userland/Libraries/LibChess/UCIEndpoint.cpp
index 832290403a..286adaa409 100644
--- a/Userland/Libraries/LibChess/UCIEndpoint.cpp
+++ b/Userland/Libraries/LibChess/UCIEndpoint.cpp
@@ -23,8 +23,8 @@ Endpoint::Endpoint(NonnullRefPtr<Core::IODevice> in, NonnullRefPtr<Core::IODevic
void Endpoint::send_command(Command const& command)
{
- dbgln_if(UCI_DEBUG, "{} Sent UCI Command: {}", class_name(), DeprecatedString(command.to_string().characters(), Chomp));
- m_out->write(command.to_string());
+ dbgln_if(UCI_DEBUG, "{} Sent UCI Command: {}", class_name(), DeprecatedString(command.to_deprecated_string().characters(), Chomp));
+ m_out->write(command.to_deprecated_string());
}
void Endpoint::event(Core::Event& event)
diff --git a/Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.cpp b/Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.cpp
index df04444f35..53d6bed7e9 100644
--- a/Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.cpp
+++ b/Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.cpp
@@ -774,7 +774,7 @@ DeprecatedString CppComprehensionEngine::SymbolName::scope_as_string() const
builder.appendff("{}::", scope[i]);
}
builder.append(scope.last());
- return builder.to_string();
+ return builder.to_deprecated_string();
}
CppComprehensionEngine::SymbolName CppComprehensionEngine::SymbolName::create(StringView name, Vector<StringView>&& scope)
@@ -790,7 +790,7 @@ CppComprehensionEngine::SymbolName CppComprehensionEngine::SymbolName::create(St
return SymbolName::create(name, move(parts));
}
-DeprecatedString CppComprehensionEngine::SymbolName::to_string() const
+DeprecatedString CppComprehensionEngine::SymbolName::to_deprecated_string() const
{
if (scope.is_empty())
return name;
diff --git a/Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.h b/Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.h
index 042bb19c27..8605540f07 100644
--- a/Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.h
+++ b/Userland/Libraries/LibCodeComprehension/Cpp/CppComprehensionEngine.h
@@ -40,7 +40,7 @@ private:
static SymbolName create(StringView, Vector<StringView>&&);
static SymbolName create(StringView);
DeprecatedString scope_as_string() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool operator==(SymbolName const&) const = default;
};
diff --git a/Userland/Libraries/LibCompress/Gzip.cpp b/Userland/Libraries/LibCompress/Gzip.cpp
index 0e0e589376..8c07562b17 100644
--- a/Userland/Libraries/LibCompress/Gzip.cpp
+++ b/Userland/Libraries/LibCompress/Gzip.cpp
@@ -164,7 +164,7 @@ Optional<DeprecatedString> GzipDecompressor::describe_header(ReadonlyBytes bytes
return {};
LittleEndian<u32> original_size = *reinterpret_cast<u32 const*>(bytes.offset(bytes.size() - sizeof(u32)));
- return DeprecatedString::formatted("last modified: {}, original size {}", Core::DateTime::from_timestamp(header.modification_time).to_string(), (u32)original_size);
+ return DeprecatedString::formatted("last modified: {}, original size {}", Core::DateTime::from_timestamp(header.modification_time).to_deprecated_string(), (u32)original_size);
}
bool GzipDecompressor::read_or_error(Bytes bytes)
diff --git a/Userland/Libraries/LibCore/Account.cpp b/Userland/Libraries/LibCore/Account.cpp
index 8115bd8dcc..e48a67541a 100644
--- a/Userland/Libraries/LibCore/Account.cpp
+++ b/Userland/Libraries/LibCore/Account.cpp
@@ -252,7 +252,7 @@ ErrorOr<DeprecatedString> Account::generate_passwd_file() const
if (errno)
return Error::from_errno(errno);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
#ifndef AK_OS_BSD_GENERIC
@@ -293,7 +293,7 @@ ErrorOr<DeprecatedString> Account::generate_shadow_file() const
if (errno)
return Error::from_errno(errno);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
#endif
diff --git a/Userland/Libraries/LibCore/ArgsParser.cpp b/Userland/Libraries/LibCore/ArgsParser.cpp
index 59d3a17cf0..72d226c579 100644
--- a/Userland/Libraries/LibCore/ArgsParser.cpp
+++ b/Userland/Libraries/LibCore/ArgsParser.cpp
@@ -818,7 +818,7 @@ void ArgsParser::autocomplete(FILE* file, StringView program_name, Span<char con
object.set("invariant_offset", has_invariant ? option_to_complete.length() : 0u);
object.set("display_trivia", option.help_string);
object.set("trailing_trivia", option.argument_mode == OptionArgumentMode::Required ? " " : "");
- outln(file, "{}", object.to_string());
+ outln(file, "{}", object.to_deprecated_string());
};
if (option_to_complete.starts_with("--"sv)) {
diff --git a/Userland/Libraries/LibCore/ConfigFile.cpp b/Userland/Libraries/LibCore/ConfigFile.cpp
index aa66eb5825..f10cab2c8f 100644
--- a/Userland/Libraries/LibCore/ConfigFile.cpp
+++ b/Userland/Libraries/LibCore/ConfigFile.cpp
@@ -113,7 +113,7 @@ ErrorOr<void> ConfigFile::reparse()
builder.append(line[i]);
++i;
}
- current_group = &m_groups.ensure(builder.to_string());
+ current_group = &m_groups.ensure(builder.to_deprecated_string());
break;
}
default: { // Start of key
@@ -132,8 +132,8 @@ ErrorOr<void> ConfigFile::reparse()
// We're not in a group yet, create one with the name ""...
current_group = &m_groups.ensure("");
}
- auto value_string = value_builder.to_string();
- current_group->set(key_builder.to_string(), value_string.trim_whitespace(TrimMode::Right));
+ auto value_string = value_builder.to_deprecated_string();
+ current_group->set(key_builder.to_deprecated_string(), value_string.trim_whitespace(TrimMode::Right));
}
}
}
diff --git a/Userland/Libraries/LibCore/DateTime.cpp b/Userland/Libraries/LibCore/DateTime.cpp
index bbc9056555..25df6ca1cf 100644
--- a/Userland/Libraries/LibCore/DateTime.cpp
+++ b/Userland/Libraries/LibCore/DateTime.cpp
@@ -84,7 +84,7 @@ void DateTime::set_time(int year, int month, int day, int hour, int minute, int
m_second = tm.tm_sec;
}
-DeprecatedString DateTime::to_string(StringView format) const
+DeprecatedString DateTime::to_deprecated_string(StringView format) const
{
struct tm tm;
localtime_r(&m_timestamp, &tm);
diff --git a/Userland/Libraries/LibCore/DateTime.h b/Userland/Libraries/LibCore/DateTime.h
index 76fe34a68d..fe050a2df3 100644
--- a/Userland/Libraries/LibCore/DateTime.h
+++ b/Userland/Libraries/LibCore/DateTime.h
@@ -31,7 +31,7 @@ public:
bool is_leap_year() const;
void set_time(int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0);
- DeprecatedString to_string(StringView format = "%Y-%m-%d %H:%M:%S"sv) const;
+ DeprecatedString to_deprecated_string(StringView format = "%Y-%m-%d %H:%M:%S"sv) const;
static DateTime create(int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0);
static DateTime now();
diff --git a/Userland/Libraries/LibCore/DirIterator.cpp b/Userland/Libraries/LibCore/DirIterator.cpp
index f4871a8051..fb17a82f05 100644
--- a/Userland/Libraries/LibCore/DirIterator.cpp
+++ b/Userland/Libraries/LibCore/DirIterator.cpp
@@ -92,7 +92,7 @@ DeprecatedString DirIterator::next_full_path()
if (!m_path.ends_with('/'))
builder.append('/');
builder.append(next_path());
- return builder.to_string();
+ return builder.to_deprecated_string();
}
int DirIterator::fd() const
diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp
index e30fd3eb38..c4cf6f229a 100644
--- a/Userland/Libraries/LibCore/EventLoop.cpp
+++ b/Userland/Libraries/LibCore/EventLoop.cpp
@@ -211,7 +211,7 @@ private:
public:
void send_response(JsonObject const& response)
{
- auto serialized = response.to_string();
+ auto serialized = response.to_deprecated_string();
auto bytes_to_send = serialized.bytes();
u32 length = bytes_to_send.size();
// FIXME: Propagate errors
@@ -280,7 +280,7 @@ public:
auto address = request.get("address"sv).to_number<FlatPtr>();
for (auto& object : Object::all_objects()) {
if ((FlatPtr)&object == address) {
- bool success = object.set_property(request.get("name"sv).to_string(), request.get("value"sv));
+ bool success = object.set_property(request.get("name"sv).to_deprecated_string(), request.get("value"sv));
JsonObject response;
response.set("type", "SetProperty");
response.set("success", success);
diff --git a/Userland/Libraries/LibCore/Group.cpp b/Userland/Libraries/LibCore/Group.cpp
index 8eff79cabd..3ebc090fe3 100644
--- a/Userland/Libraries/LibCore/Group.cpp
+++ b/Userland/Libraries/LibCore/Group.cpp
@@ -45,7 +45,7 @@ ErrorOr<DeprecatedString> Group::generate_group_file() const
if (errno)
return Error::from_errno(errno);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
ErrorOr<void> Group::sync()
diff --git a/Userland/Libraries/LibCore/MimeData.cpp b/Userland/Libraries/LibCore/MimeData.cpp
index 54595a1ea5..750b02fe25 100644
--- a/Userland/Libraries/LibCore/MimeData.cpp
+++ b/Userland/Libraries/LibCore/MimeData.cpp
@@ -35,7 +35,7 @@ void MimeData::set_urls(Vector<URL> const& urls)
{
StringBuilder builder;
for (auto& url : urls) {
- builder.append(url.to_string());
+ builder.append(url.to_deprecated_string());
builder.append('\n');
}
set_data("text/uri-list", builder.to_byte_buffer());
diff --git a/Userland/Libraries/LibCore/Object.h b/Userland/Libraries/LibCore/Object.h
index 9ce1cb548b..050204af65 100644
--- a/Userland/Libraries/LibCore/Object.h
+++ b/Userland/Libraries/LibCore/Object.h
@@ -301,7 +301,7 @@ requires IsBaseOf<Object, T>
property_name, \
[this] { return this->getter(); }, \
[this](auto& value) { \
- this->setter(value.to_string()); \
+ this->setter(value.to_deprecated_string()); \
return true; \
});
diff --git a/Userland/Libraries/LibCore/ProcessStatisticsReader.cpp b/Userland/Libraries/LibCore/ProcessStatisticsReader.cpp
index 4cb19be547..c5f79f6d2e 100644
--- a/Userland/Libraries/LibCore/ProcessStatisticsReader.cpp
+++ b/Userland/Libraries/LibCore/ProcessStatisticsReader.cpp
@@ -53,11 +53,11 @@ Optional<AllProcessesStatistics> ProcessStatisticsReader::get_all(RefPtr<Core::F
process.ppid = process_object.get("ppid"sv).to_u32();
process.nfds = process_object.get("nfds"sv).to_u32();
process.kernel = process_object.get("kernel"sv).to_bool();
- process.name = process_object.get("name"sv).to_string();
- process.executable = process_object.get("executable"sv).to_string();
- process.tty = process_object.get("tty"sv).to_string();
- process.pledge = process_object.get("pledge"sv).to_string();
- process.veil = process_object.get("veil"sv).to_string();
+ process.name = process_object.get("name"sv).to_deprecated_string();
+ process.executable = process_object.get("executable"sv).to_deprecated_string();
+ process.tty = process_object.get("tty"sv).to_deprecated_string();
+ process.pledge = process_object.get("pledge"sv).to_deprecated_string();
+ process.veil = process_object.get("veil"sv).to_deprecated_string();
process.amount_virtual = process_object.get("amount_virtual"sv).to_u32();
process.amount_resident = process_object.get("amount_resident"sv).to_u32();
process.amount_shared = process_object.get("amount_shared"sv).to_u32();
@@ -73,8 +73,8 @@ Optional<AllProcessesStatistics> ProcessStatisticsReader::get_all(RefPtr<Core::F
Core::ThreadStatistics thread;
thread.tid = thread_object.get("tid"sv).to_u32();
thread.times_scheduled = thread_object.get("times_scheduled"sv).to_u32();
- thread.name = thread_object.get("name"sv).to_string();
- thread.state = thread_object.get("state"sv).to_string();
+ thread.name = thread_object.get("name"sv).to_deprecated_string();
+ thread.state = thread_object.get("state"sv).to_deprecated_string();
thread.time_user = thread_object.get("time_user"sv).to_u64();
thread.time_kernel = thread_object.get("time_kernel"sv).to_u64();
thread.cpu = thread_object.get("cpu"sv).to_u32();
diff --git a/Userland/Libraries/LibCore/SocketAddress.h b/Userland/Libraries/LibCore/SocketAddress.h
index d4166605bf..97403906ca 100644
--- a/Userland/Libraries/LibCore/SocketAddress.h
+++ b/Userland/Libraries/LibCore/SocketAddress.h
@@ -51,7 +51,7 @@ public:
IPv4Address ipv4_address() const { return m_ipv4_address; }
u16 port() const { return m_port; }
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
switch (m_type) {
case Type::IPv4:
@@ -97,6 +97,6 @@ template<>
struct AK::Formatter<Core::SocketAddress> : Formatter<DeprecatedString> {
ErrorOr<void> format(FormatBuilder& builder, Core::SocketAddress const& value)
{
- return Formatter<DeprecatedString>::format(builder, value.to_string());
+ return Formatter<DeprecatedString>::format(builder, value.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibCore/StandardPaths.cpp b/Userland/Libraries/LibCore/StandardPaths.cpp
index 51e1e4c108..f0d4fc7b2c 100644
--- a/Userland/Libraries/LibCore/StandardPaths.cpp
+++ b/Userland/Libraries/LibCore/StandardPaths.cpp
@@ -30,7 +30,7 @@ DeprecatedString StandardPaths::desktop_directory()
StringBuilder builder;
builder.append(home_directory());
builder.append("/Desktop"sv);
- return LexicalPath::canonicalized_path(builder.to_string());
+ return LexicalPath::canonicalized_path(builder.to_deprecated_string());
}
DeprecatedString StandardPaths::documents_directory()
@@ -38,7 +38,7 @@ DeprecatedString StandardPaths::documents_directory()
StringBuilder builder;
builder.append(home_directory());
builder.append("/Documents"sv);
- return LexicalPath::canonicalized_path(builder.to_string());
+ return LexicalPath::canonicalized_path(builder.to_deprecated_string());
}
DeprecatedString StandardPaths::downloads_directory()
@@ -46,7 +46,7 @@ DeprecatedString StandardPaths::downloads_directory()
StringBuilder builder;
builder.append(home_directory());
builder.append("/Downloads"sv);
- return LexicalPath::canonicalized_path(builder.to_string());
+ return LexicalPath::canonicalized_path(builder.to_deprecated_string());
}
DeprecatedString StandardPaths::config_directory()
@@ -54,7 +54,7 @@ DeprecatedString StandardPaths::config_directory()
StringBuilder builder;
builder.append(home_directory());
builder.append("/.config"sv);
- return LexicalPath::canonicalized_path(builder.to_string());
+ return LexicalPath::canonicalized_path(builder.to_deprecated_string());
}
DeprecatedString StandardPaths::tempfile_directory()
diff --git a/Userland/Libraries/LibCore/System.cpp b/Userland/Libraries/LibCore/System.cpp
index 6ce5714103..2970c23dfe 100644
--- a/Userland/Libraries/LibCore/System.cpp
+++ b/Userland/Libraries/LibCore/System.cpp
@@ -702,7 +702,7 @@ ErrorOr<void> clock_settime(clockid_t clock_id, struct timespec* ts)
static ALWAYS_INLINE ErrorOr<pid_t> posix_spawn_wrapper(StringView path, posix_spawn_file_actions_t const* file_actions, posix_spawnattr_t const* attr, char* const arguments[], char* const envp[], StringView function_name, decltype(::posix_spawn) spawn_function)
{
pid_t child_pid;
- if ((errno = spawn_function(&child_pid, path.to_string().characters(), file_actions, attr, arguments, envp)))
+ if ((errno = spawn_function(&child_pid, path.to_deprecated_string().characters(), file_actions, attr, arguments, envp)))
return Error::from_syscall(function_name, -errno);
return child_pid;
}
@@ -1082,7 +1082,7 @@ ErrorOr<void> exec(StringView filename, Span<StringView> arguments, SearchInPath
exec_filename = maybe_executable.release_value();
} else {
- exec_filename = filename.to_string();
+ exec_filename = filename.to_deprecated_string();
}
params.path = { exec_filename.characters(), exec_filename.length() };
@@ -1094,7 +1094,7 @@ ErrorOr<void> exec(StringView filename, Span<StringView> arguments, SearchInPath
auto argument_strings = TRY(FixedArray<DeprecatedString>::try_create(arguments.size()));
auto argv = TRY(FixedArray<char*>::try_create(arguments.size() + 1));
for (size_t i = 0; i < arguments.size(); ++i) {
- argument_strings[i] = arguments[i].to_string();
+ argument_strings[i] = arguments[i].to_deprecated_string();
argv[i] = const_cast<char*>(argument_strings[i].characters());
}
argv[arguments.size()] = nullptr;
@@ -1104,7 +1104,7 @@ ErrorOr<void> exec(StringView filename, Span<StringView> arguments, SearchInPath
auto environment_strings = TRY(FixedArray<DeprecatedString>::try_create(environment->size()));
auto envp = TRY(FixedArray<char*>::try_create(environment->size() + 1));
for (size_t i = 0; i < environment->size(); ++i) {
- environment_strings[i] = environment->at(i).to_string();
+ environment_strings[i] = environment->at(i).to_deprecated_string();
envp[i] = const_cast<char*>(environment_strings[i].characters());
}
envp[environment->size()] = nullptr;
diff --git a/Userland/Libraries/LibCore/SystemServerTakeover.cpp b/Userland/Libraries/LibCore/SystemServerTakeover.cpp
index 92075a3b75..d5f32e9854 100644
--- a/Userland/Libraries/LibCore/SystemServerTakeover.cpp
+++ b/Userland/Libraries/LibCore/SystemServerTakeover.cpp
@@ -25,7 +25,7 @@ static void parse_sockets_from_system_server()
for (auto& socket : StringView { sockets, strlen(sockets) }.split_view(' ')) {
auto params = socket.split_view(':');
- s_overtaken_sockets.set(params[0].to_string(), strtol(params[1].to_string().characters(), nullptr, 10));
+ s_overtaken_sockets.set(params[0].to_deprecated_string(), strtol(params[1].to_deprecated_string().characters(), nullptr, 10));
}
s_overtaken_sockets_parsed = true;
diff --git a/Userland/Libraries/LibCoredump/Backtrace.cpp b/Userland/Libraries/LibCoredump/Backtrace.cpp
index 068305c3b6..e147732fd1 100644
--- a/Userland/Libraries/LibCoredump/Backtrace.cpp
+++ b/Userland/Libraries/LibCoredump/Backtrace.cpp
@@ -128,7 +128,7 @@ void Backtrace::add_entry(Reader const& coredump, FlatPtr ip)
m_entries.append({ ip, object_name, function_name, source_position });
}
-DeprecatedString Backtrace::Entry::to_string(bool color) const
+DeprecatedString Backtrace::Entry::to_deprecated_string(bool color) const
{
StringBuilder builder;
builder.appendff("{:p}: ", eip);
diff --git a/Userland/Libraries/LibCoredump/Backtrace.h b/Userland/Libraries/LibCoredump/Backtrace.h
index fab3130473..9ce037f3c5 100644
--- a/Userland/Libraries/LibCoredump/Backtrace.h
+++ b/Userland/Libraries/LibCoredump/Backtrace.h
@@ -35,7 +35,7 @@ public:
DeprecatedString function_name;
Debug::DebugInfo::SourcePositionWithInlines source_position_with_inlines;
- DeprecatedString to_string(bool color = false) const;
+ DeprecatedString to_deprecated_string(bool color = false) const;
};
Backtrace(Reader const&, const ELF::Core::ThreadInfo&, Function<void(size_t, size_t)> on_progress = {});
diff --git a/Userland/Libraries/LibCpp/AST.cpp b/Userland/Libraries/LibCpp/AST.cpp
index 7ac8a12aa7..21419bd889 100644
--- a/Userland/Libraries/LibCpp/AST.cpp
+++ b/Userland/Libraries/LibCpp/AST.cpp
@@ -72,10 +72,10 @@ void Type::dump(FILE* output, size_t indent) const
{
ASTNode::dump(output, indent);
print_indent(output, indent + 1);
- outln(output, "{}", to_string());
+ outln(output, "{}", to_deprecated_string());
}
-DeprecatedString NamedType::to_string() const
+DeprecatedString NamedType::to_deprecated_string() const
{
DeprecatedString qualifiers_string;
if (!qualifiers().is_empty())
@@ -90,33 +90,33 @@ DeprecatedString NamedType::to_string() const
return DeprecatedString::formatted("{}{}", qualifiers_string, name);
}
-DeprecatedString Pointer::to_string() const
+DeprecatedString Pointer::to_deprecated_string() const
{
if (!m_pointee)
return {};
StringBuilder builder;
- builder.append(m_pointee->to_string());
+ builder.append(m_pointee->to_deprecated_string());
builder.append('*');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString Reference::to_string() const
+DeprecatedString Reference::to_deprecated_string() const
{
if (!m_referenced_type)
return {};
StringBuilder builder;
- builder.append(m_referenced_type->to_string());
+ builder.append(m_referenced_type->to_deprecated_string());
if (m_kind == Kind::Lvalue)
builder.append('&');
else
builder.append("&&"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString FunctionType::to_string() const
+DeprecatedString FunctionType::to_deprecated_string() const
{
StringBuilder builder;
- builder.append(m_return_type->to_string());
+ builder.append(m_return_type->to_deprecated_string());
builder.append('(');
bool first = true;
for (auto& parameter : m_parameters) {
@@ -125,14 +125,14 @@ DeprecatedString FunctionType::to_string() const
else
builder.append(", "sv);
if (parameter.type())
- builder.append(parameter.type()->to_string());
+ builder.append(parameter.type()->to_deprecated_string());
if (parameter.name() && !parameter.full_name().is_empty()) {
builder.append(' ');
builder.append(parameter.full_name());
}
}
builder.append(')');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void Parameter::dump(FILE* output, size_t indent) const
@@ -552,7 +552,7 @@ StringView Name::full_name() const
builder.appendff("{}::", scope.name());
}
}
- m_full_name = DeprecatedString::formatted("{}{}", builder.to_string(), m_name.is_null() ? ""sv : m_name->name());
+ m_full_name = DeprecatedString::formatted("{}{}", builder.to_deprecated_string(), m_name.is_null() ? ""sv : m_name->name());
return *m_full_name;
}
@@ -565,10 +565,10 @@ StringView TemplatizedName::full_name() const
name.append(Name::full_name());
name.append('<');
for (auto& type : m_template_arguments) {
- name.append(type.to_string());
+ name.append(type.to_deprecated_string());
}
name.append('>');
- m_full_name = name.to_string();
+ m_full_name = name.to_deprecated_string();
return *m_full_name;
}
diff --git a/Userland/Libraries/LibCpp/AST.h b/Userland/Libraries/LibCpp/AST.h
index 7d4f48b0a2..095306e585 100644
--- a/Userland/Libraries/LibCpp/AST.h
+++ b/Userland/Libraries/LibCpp/AST.h
@@ -228,7 +228,7 @@ public:
virtual bool is_type() const override { return true; }
virtual bool is_templatized() const { return false; }
virtual bool is_named_type() const { return false; }
- virtual DeprecatedString to_string() const = 0;
+ virtual DeprecatedString to_deprecated_string() const = 0;
virtual void dump(FILE* = stdout, size_t indent = 0) const override;
bool is_auto() const { return m_is_auto; }
@@ -251,7 +251,7 @@ class NamedType : public Type {
public:
virtual ~NamedType() override = default;
virtual StringView class_name() const override { return "NamedType"sv; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool is_named_type() const override { return true; }
NamedType(ASTNode* parent, Optional<Position> start, Optional<Position> end, DeprecatedString const& filename)
@@ -271,7 +271,7 @@ public:
virtual ~Pointer() override = default;
virtual StringView class_name() const override { return "Pointer"sv; }
virtual void dump(FILE* = stdout, size_t indent = 0) const override;
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
Pointer(ASTNode* parent, Optional<Position> start, Optional<Position> end, DeprecatedString const& filename)
: Type(parent, start, end, filename)
@@ -290,7 +290,7 @@ public:
virtual ~Reference() override = default;
virtual StringView class_name() const override { return "Reference"sv; }
virtual void dump(FILE* = stdout, size_t indent = 0) const override;
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
enum class Kind {
Lvalue,
@@ -317,7 +317,7 @@ public:
virtual ~FunctionType() override = default;
virtual StringView class_name() const override { return "FunctionType"sv; }
virtual void dump(FILE* = stdout, size_t indent = 0) const override;
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
FunctionType(ASTNode* parent, Optional<Position> start, Optional<Position> end, DeprecatedString const& filename)
: Type(parent, start, end, filename)
diff --git a/Userland/Libraries/LibCpp/Parser.cpp b/Userland/Libraries/LibCpp/Parser.cpp
index b6a2a6ffa7..9976c73ac7 100644
--- a/Userland/Libraries/LibCpp/Parser.cpp
+++ b/Userland/Libraries/LibCpp/Parser.cpp
@@ -11,7 +11,7 @@
#include <AK/ScopeLogger.h>
#include <LibCpp/Lexer.h>
-#define LOG_SCOPE() ScopeLogger<CPP_DEBUG> logger(DeprecatedString::formatted("'{}' - {} ({})", peek().text(), peek().type_as_string(), m_state.token_index))
+#define LOG_SCOPE() ScopeLogger<CPP_DEBUG> logger(DeprecatedString::formatted("'{}' - {} ({})", peek().text(), peek().type_as_deprecated_string(), m_state.token_index))
namespace Cpp {
@@ -22,7 +22,7 @@ Parser::Parser(Vector<Token> tokens, DeprecatedString const& filename)
if constexpr (CPP_DEBUG) {
dbgln("Tokens:");
for (size_t i = 0; i < m_tokens.size(); ++i) {
- dbgln("{}- {}", i, m_tokens[i].to_string());
+ dbgln("{}- {}", i, m_tokens[i].to_deprecated_string());
}
}
}
@@ -579,7 +579,7 @@ NonnullRefPtr<Expression> Parser::parse_secondary_expression(ASTNode& parent, No
return func;
}
default: {
- error(DeprecatedString::formatted("unexpected operator for expression. operator: {}", peek().to_string()));
+ error(DeprecatedString::formatted("unexpected operator for expression. operator: {}", peek().to_deprecated_string()));
auto token = consume();
return create_ast_node<InvalidExpression>(parent, token.start(), token.end());
}
@@ -880,7 +880,7 @@ DeprecatedString Parser::text_in_range(Position start, Position end) const
for (auto token : tokens_in_range(start, end)) {
builder.append(token.text());
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
Vector<Token> Parser::tokens_in_range(Position start, Position end) const
@@ -1008,7 +1008,7 @@ Optional<size_t> Parser::index_of_token_at(Position pos) const
void Parser::print_tokens() const
{
for (auto& token : m_tokens) {
- outln("{}", token.to_string());
+ outln("{}", token.to_deprecated_string());
}
}
@@ -1110,7 +1110,7 @@ Token Parser::consume_keyword(DeprecatedString const& keyword)
{
auto token = consume();
if (token.type() != Token::Type::Keyword) {
- error(DeprecatedString::formatted("unexpected token: {}, expected Keyword", token.to_string()));
+ error(DeprecatedString::formatted("unexpected token: {}, expected Keyword", token.to_deprecated_string()));
return token;
}
if (text_of_token(token) != keyword) {
diff --git a/Userland/Libraries/LibCpp/Preprocessor.cpp b/Userland/Libraries/LibCpp/Preprocessor.cpp
index efd78d11ba..a5b3815e56 100644
--- a/Userland/Libraries/LibCpp/Preprocessor.cpp
+++ b/Userland/Libraries/LibCpp/Preprocessor.cpp
@@ -371,7 +371,7 @@ DeprecatedString Preprocessor::remove_escaped_newlines(StringView value)
processed_value.append(lexer.consume_until(escaped_newline));
lexer.ignore(escaped_newline.length());
}
- return processed_value.to_string();
+ return processed_value.to_deprecated_string();
}
DeprecatedString Preprocessor::evaluate_macro_call(MacroCall const& macro_call, Definition const& definition)
@@ -401,7 +401,7 @@ DeprecatedString Preprocessor::evaluate_macro_call(MacroCall const& macro_call,
}
});
- return processed_value.to_string();
+ return processed_value.to_deprecated_string();
}
};
diff --git a/Userland/Libraries/LibCpp/SemanticSyntaxHighlighter.cpp b/Userland/Libraries/LibCpp/SemanticSyntaxHighlighter.cpp
index f477fdb917..27a7e47ee0 100644
--- a/Userland/Libraries/LibCpp/SemanticSyntaxHighlighter.cpp
+++ b/Userland/Libraries/LibCpp/SemanticSyntaxHighlighter.cpp
@@ -27,10 +27,10 @@ void SemanticSyntaxHighlighter::rehighlight(Palette const& palette)
StringBuilder previous_tokens_as_lines;
for (auto& token : current_tokens)
- current_tokens_as_lines.appendff("{}\n", token.type_as_string());
+ current_tokens_as_lines.appendff("{}\n", token.type_as_deprecated_string());
for (Cpp::Token const& token : m_saved_tokens)
- previous_tokens_as_lines.appendff("{}\n", token.type_as_string());
+ previous_tokens_as_lines.appendff("{}\n", token.type_as_deprecated_string());
auto previous = previous_tokens_as_lines.build();
auto current = current_tokens_as_lines.build();
diff --git a/Userland/Libraries/LibCpp/SyntaxHighlighter.cpp b/Userland/Libraries/LibCpp/SyntaxHighlighter.cpp
index b62c3c33b8..9e56602987 100644
--- a/Userland/Libraries/LibCpp/SyntaxHighlighter.cpp
+++ b/Userland/Libraries/LibCpp/SyntaxHighlighter.cpp
@@ -63,7 +63,7 @@ void SyntaxHighlighter::rehighlight(Palette const& palette)
Vector<GUI::TextDocumentSpan> spans;
lexer.lex_iterable([&](auto token) {
// FIXME: The +1 for the token end column is a quick hack due to not wanting to modify the lexer (which is also used by the parser). Maybe there's a better way to do this.
- dbgln_if(SYNTAX_HIGHLIGHTING_DEBUG, "{} @ {}:{} - {}:{}", token.type_as_string(), token.start().line, token.start().column, token.end().line, token.end().column + 1);
+ dbgln_if(SYNTAX_HIGHLIGHTING_DEBUG, "{} @ {}:{} - {}:{}", token.type_as_deprecated_string(), token.start().line, token.start().column, token.end().line, token.end().column + 1);
GUI::TextDocumentSpan span;
span.range.set_start({ token.start().line, token.start().column });
span.range.set_end({ token.end().line, token.end().column + 1 });
diff --git a/Userland/Libraries/LibCpp/Token.cpp b/Userland/Libraries/LibCpp/Token.cpp
index 5d6d96b736..60b5a1fb8a 100644
--- a/Userland/Libraries/LibCpp/Token.cpp
+++ b/Userland/Libraries/LibCpp/Token.cpp
@@ -26,12 +26,12 @@ bool Position::operator<=(Position const& other) const
return !(*this > other);
}
-DeprecatedString Token::to_string() const
+DeprecatedString Token::to_deprecated_string() const
{
return DeprecatedString::formatted("{} {}:{}-{}:{} ({})", type_to_string(m_type), start().line, start().column, end().line, end().column, text());
}
-DeprecatedString Token::type_as_string() const
+DeprecatedString Token::type_as_deprecated_string() const
{
return type_to_string(m_type);
}
diff --git a/Userland/Libraries/LibCpp/Token.h b/Userland/Libraries/LibCpp/Token.h
index 42916b9bd4..7986aaa9c8 100644
--- a/Userland/Libraries/LibCpp/Token.h
+++ b/Userland/Libraries/LibCpp/Token.h
@@ -116,8 +116,8 @@ struct Token {
VERIFY_NOT_REACHED();
}
- DeprecatedString to_string() const;
- DeprecatedString type_as_string() const;
+ DeprecatedString to_deprecated_string() const;
+ DeprecatedString type_as_deprecated_string() const;
Position const& start() const { return m_start; }
Position const& end() const { return m_end; }
diff --git a/Userland/Libraries/LibCrypto/BigFraction/BigFraction.cpp b/Userland/Libraries/LibCrypto/BigFraction/BigFraction.cpp
index 67e1700ce5..ce85134792 100644
--- a/Userland/Libraries/LibCrypto/BigFraction/BigFraction.cpp
+++ b/Userland/Libraries/LibCrypto/BigFraction/BigFraction.cpp
@@ -184,7 +184,7 @@ void BigFraction::reduce()
m_denominator = denominator_divide.quotient;
}
-DeprecatedString BigFraction::to_string(unsigned rounding_threshold) const
+DeprecatedString BigFraction::to_deprecated_string(unsigned rounding_threshold) const
{
StringBuilder builder;
if (m_numerator.is_negative() && m_numerator != "0"_bigint)
@@ -239,7 +239,7 @@ DeprecatedString BigFraction::to_string(unsigned rounding_threshold) const
builder.append(fractional_value);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
BigFraction BigFraction::sqrt() const
diff --git a/Userland/Libraries/LibCrypto/BigFraction/BigFraction.h b/Userland/Libraries/LibCrypto/BigFraction/BigFraction.h
index 4da35620d6..25a8352ad9 100644
--- a/Userland/Libraries/LibCrypto/BigFraction/BigFraction.h
+++ b/Userland/Libraries/LibCrypto/BigFraction/BigFraction.h
@@ -54,7 +54,7 @@ public:
// - m_denominator = 10000
BigFraction rounded(unsigned rounding_threshold) const;
- DeprecatedString to_string(unsigned rounding_threshold) const;
+ DeprecatedString to_deprecated_string(unsigned rounding_threshold) const;
double to_double() const;
private:
diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp
index ac764cdd1d..020ce8b6f3 100644
--- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp
+++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp
@@ -60,7 +60,7 @@ DeprecatedString SignedBigInteger::to_base(u16 N) const
builder.append(m_unsigned_data.to_base(N));
- return builder.to_string();
+ return builder.to_deprecated_string();
}
u64 SignedBigInteger::to_u64() const
diff --git a/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp b/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp
index a9cf9a2b47..003b40e27b 100644
--- a/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp
+++ b/Userland/Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp
@@ -164,7 +164,7 @@ DeprecatedString UnsignedBigInteger::to_base(u16 N) const
temp.set_to(quotient);
}
- return builder.to_string().reverse();
+ return builder.to_deprecated_string().reverse();
}
u64 UnsignedBigInteger::to_u64() const
diff --git a/Userland/Libraries/LibCrypto/Cipher/AES.cpp b/Userland/Libraries/LibCrypto/Cipher/AES.cpp
index c7d58b7a20..084ca4f659 100644
--- a/Userland/Libraries/LibCrypto/Cipher/AES.cpp
+++ b/Userland/Libraries/LibCrypto/Cipher/AES.cpp
@@ -25,7 +25,7 @@ constexpr void swap_keys(u32* keys, size_t i, size_t j)
}
#ifndef KERNEL
-DeprecatedString AESCipherBlock::to_string() const
+DeprecatedString AESCipherBlock::to_deprecated_string() const
{
StringBuilder builder;
for (auto value : m_data)
@@ -33,7 +33,7 @@ DeprecatedString AESCipherBlock::to_string() const
return builder.build();
}
-DeprecatedString AESCipherKey::to_string() const
+DeprecatedString AESCipherKey::to_deprecated_string() const
{
StringBuilder builder;
for (size_t i = 0; i < (rounds() + 1) * 4; ++i)
diff --git a/Userland/Libraries/LibCrypto/Cipher/AES.h b/Userland/Libraries/LibCrypto/Cipher/AES.h
index 28788186af..24b6c33f72 100644
--- a/Userland/Libraries/LibCrypto/Cipher/AES.h
+++ b/Userland/Libraries/LibCrypto/Cipher/AES.h
@@ -49,7 +49,7 @@ public:
}
#ifndef KERNEL
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
#endif
private:
@@ -65,7 +65,7 @@ struct AESCipherKey : public CipherKey {
static bool is_valid_key_size(size_t bits) { return bits == 128 || bits == 192 || bits == 256; };
#ifndef KERNEL
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
#endif
u32 const* round_keys() const
diff --git a/Userland/Libraries/LibDNS/Name.cpp b/Userland/Libraries/LibDNS/Name.cpp
index 111a1d1529..fcc0c41ff0 100644
--- a/Userland/Libraries/LibDNS/Name.cpp
+++ b/Userland/Libraries/LibDNS/Name.cpp
@@ -32,7 +32,7 @@ Name Name::parse(u8 const* data, size_t& offset, size_t max_offset, size_t recur
u8 b = data[offset++];
if (b == '\0') {
// This terminates the name.
- return builder.to_string();
+ return builder.to_deprecated_string();
} else if ((b & 0xc0) == 0xc0) {
// The two bytes tell us the offset when to continue from.
if (offset >= max_offset)
@@ -40,7 +40,7 @@ Name Name::parse(u8 const* data, size_t& offset, size_t max_offset, size_t recur
size_t dummy = (b & 0x3f) << 8 | data[offset++];
auto rest_of_name = parse(data, dummy, max_offset, recursion_level + 1);
builder.append(rest_of_name.as_string());
- return builder.to_string();
+ return builder.to_deprecated_string();
} else {
// This is the length of a part.
if (offset + b >= max_offset)
@@ -72,7 +72,7 @@ void Name::randomize_case()
}
builder.append(c);
}
- m_name = builder.to_string();
+ m_name = builder.to_deprecated_string();
}
OutputStream& operator<<(OutputStream& stream, Name const& name)
diff --git a/Userland/Libraries/LibDebug/DebugInfo.cpp b/Userland/Libraries/LibDebug/DebugInfo.cpp
index 290974b822..57f1ad4830 100644
--- a/Userland/Libraries/LibDebug/DebugInfo.cpp
+++ b/Userland/Libraries/LibDebug/DebugInfo.cpp
@@ -334,7 +334,7 @@ void DebugInfo::add_type_info_to_variable(Dwarf::DIE const& type_die, PtraceRegi
array_type_name.append(DeprecatedString::formatted("{:d}", array_size));
array_type_name.append(']');
}
- parent_variable->type_name = array_type_name.to_string();
+ parent_variable->type_name = array_type_name.to_deprecated_string();
}
parent_variable->type = move(type_info);
parent_variable->type->type_tag = type_die.tag();
diff --git a/Userland/Libraries/LibDebug/DebugSession.cpp b/Userland/Libraries/LibDebug/DebugSession.cpp
index efb0fe5d0d..c195673b6b 100644
--- a/Userland/Libraries/LibDebug/DebugSession.cpp
+++ b/Userland/Libraries/LibDebug/DebugSession.cpp
@@ -447,7 +447,7 @@ void DebugSession::update_loaded_libs()
auto rc = segment_name_re.search(vm_name, result);
if (!rc)
return {};
- auto lib_name = result.capture_group_matches.at(0).at(0).view.string_view().to_string();
+ auto lib_name = result.capture_group_matches.at(0).at(0).view.string_view().to_deprecated_string();
if (lib_name.starts_with('/'))
return lib_name;
return DeprecatedString::formatted("/usr/lib/{}", lib_name);
diff --git a/Userland/Libraries/LibDesktop/Launcher.cpp b/Userland/Libraries/LibDesktop/Launcher.cpp
index cdd71ea6dd..eaa253cb55 100644
--- a/Userland/Libraries/LibDesktop/Launcher.cpp
+++ b/Userland/Libraries/LibDesktop/Launcher.cpp
@@ -19,10 +19,10 @@ auto Launcher::Details::from_details_str(DeprecatedString const& details_str) ->
auto details = adopt_ref(*new Details);
auto json = JsonValue::from_string(details_str).release_value_but_fixme_should_propagate_errors();
auto const& obj = json.as_object();
- details->executable = obj.get("executable"sv).to_string();
- details->name = obj.get("name"sv).to_string();
+ details->executable = obj.get("executable"sv).to_deprecated_string();
+ details->name = obj.get("name"sv).to_deprecated_string();
if (auto type_value = obj.get_ptr("type"sv)) {
- auto type_str = type_value->to_string();
+ auto type_str = type_value->to_deprecated_string();
if (type_str == "app")
details->launcher_type = LauncherType::Application;
else if (type_str == "userpreferred")
@@ -100,12 +100,12 @@ bool Launcher::open(const URL& url, Details const& details)
Vector<DeprecatedString> Launcher::get_handlers_for_url(const URL& url)
{
- return connection().get_handlers_for_url(url.to_string());
+ return connection().get_handlers_for_url(url.to_deprecated_string());
}
auto Launcher::get_handlers_with_details_for_url(const URL& url) -> NonnullRefPtrVector<Details>
{
- auto details = connection().get_handlers_with_details_for_url(url.to_string());
+ auto details = connection().get_handlers_with_details_for_url(url.to_deprecated_string());
NonnullRefPtrVector<Details> handlers_with_details;
for (auto& value : details) {
handlers_with_details.append(Details::from_details_str(value));
diff --git a/Userland/Libraries/LibDiff/Format.cpp b/Userland/Libraries/LibDiff/Format.cpp
index dd08aece36..7956777325 100644
--- a/Userland/Libraries/LibDiff/Format.cpp
+++ b/Userland/Libraries/LibDiff/Format.cpp
@@ -18,6 +18,6 @@ DeprecatedString generate_only_additions(DeprecatedString const& text)
for (auto const& line : lines) {
builder.appendff("+{}\n", line);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
};
diff --git a/Userland/Libraries/LibELF/Core.h b/Userland/Libraries/LibELF/Core.h
index d7f98f906a..ca9a36db77 100644
--- a/Userland/Libraries/LibELF/Core.h
+++ b/Userland/Libraries/LibELF/Core.h
@@ -67,7 +67,7 @@ struct [[gnu::packed]] MemoryRegionInfo {
auto maybe_colon_index = memory_region_name.find(':');
if (!maybe_colon_index.has_value())
return {};
- return memory_region_name.substring_view(0, *maybe_colon_index).to_string();
+ return memory_region_name.substring_view(0, *maybe_colon_index).to_deprecated_string();
}
#endif
};
diff --git a/Userland/Libraries/LibELF/DynamicLoader.cpp b/Userland/Libraries/LibELF/DynamicLoader.cpp
index 1a836f5f00..5b19b22ec9 100644
--- a/Userland/Libraries/LibELF/DynamicLoader.cpp
+++ b/Userland/Libraries/LibELF/DynamicLoader.cpp
@@ -408,7 +408,7 @@ void DynamicLoader::load_program_headers()
MAP_FILE | MAP_SHARED | MAP_FIXED,
m_image_fd,
VirtualAddress { region.offset() }.page_base().get(),
- builder.to_string().characters());
+ builder.to_deprecated_string().characters());
if (segment_base == MAP_FAILED) {
perror("mmap non-writable");
diff --git a/Userland/Libraries/LibGUI/AbstractTableView.cpp b/Userland/Libraries/LibGUI/AbstractTableView.cpp
index 99007318fc..9fd946c3bd 100644
--- a/Userland/Libraries/LibGUI/AbstractTableView.cpp
+++ b/Userland/Libraries/LibGUI/AbstractTableView.cpp
@@ -72,7 +72,7 @@ void AbstractTableView::auto_resize_column(int column)
} else if (cell_data.is_bitmap()) {
cell_width = cell_data.as_bitmap().width();
} else if (cell_data.is_valid()) {
- cell_width = font().width(cell_data.to_string());
+ cell_width = font().width(cell_data.to_deprecated_string());
}
if (is_empty && cell_width > 0)
is_empty = false;
@@ -110,7 +110,7 @@ void AbstractTableView::update_column_sizes()
} else if (cell_data.is_bitmap()) {
cell_width = cell_data.as_bitmap().width();
} else if (cell_data.is_valid()) {
- cell_width = font().width(cell_data.to_string());
+ cell_width = font().width(cell_data.to_deprecated_string());
}
column_width = max(column_width, cell_width);
}
diff --git a/Userland/Libraries/LibGUI/AbstractView.cpp b/Userland/Libraries/LibGUI/AbstractView.cpp
index 7ca950a281..384bb084eb 100644
--- a/Userland/Libraries/LibGUI/AbstractView.cpp
+++ b/Userland/Libraries/LibGUI/AbstractView.cpp
@@ -605,7 +605,7 @@ void AbstractView::keydown_event(KeyEvent& event)
}
auto index = find_next_search_match(sb.string_view());
if (index.is_valid()) {
- m_highlighted_search = sb.to_string();
+ m_highlighted_search = sb.to_deprecated_string();
highlight_search(index);
start_highlighted_search_timer();
}
@@ -630,7 +630,7 @@ void AbstractView::keydown_event(KeyEvent& event)
auto index = find_next_search_match(sb.string_view());
if (index.is_valid()) {
- m_highlighted_search = sb.to_string();
+ m_highlighted_search = sb.to_deprecated_string();
highlight_search(index);
start_highlighted_search_timer();
set_cursor(index, SelectionUpdate::None, true);
diff --git a/Userland/Libraries/LibGUI/AutocompleteProvider.cpp b/Userland/Libraries/LibGUI/AutocompleteProvider.cpp
index 0be4c90c5f..b71fb4fc1b 100644
--- a/Userland/Libraries/LibGUI/AutocompleteProvider.cpp
+++ b/Userland/Libraries/LibGUI/AutocompleteProvider.cpp
@@ -183,7 +183,7 @@ CodeComprehension::AutocompleteResultEntry::HideAutocompleteAfterApplying Autoco
return hide_when_done;
auto suggestion_index = m_suggestion_view->model()->index(selected_index.row());
- auto completion = suggestion_index.data((GUI::ModelRole)AutocompleteSuggestionModel::InternalRole::Completion).to_string();
+ auto completion = suggestion_index.data((GUI::ModelRole)AutocompleteSuggestionModel::InternalRole::Completion).to_deprecated_string();
size_t partial_length = suggestion_index.data((GUI::ModelRole)AutocompleteSuggestionModel::InternalRole::PartialInputLength).to_i64();
auto hide_after_applying = suggestion_index.data((GUI::ModelRole)AutocompleteSuggestionModel::InternalRole::HideAutocompleteAfterApplying).to_bool();
diff --git a/Userland/Libraries/LibGUI/ColorInput.cpp b/Userland/Libraries/LibGUI/ColorInput.cpp
index 3af27a0d8d..c537bbb51c 100644
--- a/Userland/Libraries/LibGUI/ColorInput.cpp
+++ b/Userland/Libraries/LibGUI/ColorInput.cpp
@@ -43,7 +43,7 @@ void ColorInput::set_color_internal(Color color, AllowCallback allow_callback, b
return;
m_color = color;
if (change_text)
- set_text(m_color_has_alpha_channel ? color.to_string() : color.to_string_without_alpha(), AllowCallback::No);
+ set_text(m_color_has_alpha_channel ? color.to_deprecated_string() : color.to_deprecated_string_without_alpha(), AllowCallback::No);
update();
if (allow_callback == AllowCallback::Yes && on_change)
on_change();
diff --git a/Userland/Libraries/LibGUI/ColorPicker.cpp b/Userland/Libraries/LibGUI/ColorPicker.cpp
index 1b3bb5bc01..f7fde0e42e 100644
--- a/Userland/Libraries/LibGUI/ColorPicker.cpp
+++ b/Userland/Libraries/LibGUI/ColorPicker.cpp
@@ -320,7 +320,7 @@ void ColorPicker::build_ui_custom(Widget& root_container)
html_label.set_text("HTML:");
m_html_text = html_container.add<GUI::TextBox>();
- m_html_text->set_text(m_color_has_alpha_channel ? m_color.to_string() : m_color.to_string_without_alpha());
+ m_html_text->set_text(m_color_has_alpha_channel ? m_color.to_deprecated_string() : m_color.to_deprecated_string_without_alpha());
m_html_text->on_change = [this]() {
auto color_name = m_html_text->text();
auto optional_color = Color::from_string(color_name);
@@ -416,7 +416,7 @@ void ColorPicker::update_color_widgets()
{
m_preview_widget->set_color(m_color);
- m_html_text->set_text(m_color_has_alpha_channel ? m_color.to_string() : m_color.to_string_without_alpha());
+ m_html_text->set_text(m_color_has_alpha_channel ? m_color.to_deprecated_string() : m_color.to_deprecated_string_without_alpha());
m_red_spinbox->set_value(m_color.red());
m_green_spinbox->set_value(m_color.green());
diff --git a/Userland/Libraries/LibGUI/ColumnsView.cpp b/Userland/Libraries/LibGUI/ColumnsView.cpp
index 6ba2000d90..4bd374f5c5 100644
--- a/Userland/Libraries/LibGUI/ColumnsView.cpp
+++ b/Userland/Libraries/LibGUI/ColumnsView.cpp
@@ -158,7 +158,7 @@ void ColumnsView::paint_event(PaintEvent& event)
icon_rect.right() + 1 + icon_spacing(), row * item_height(),
column.width - icon_spacing() - icon_size() - icon_spacing() - icon_spacing() - static_cast<int>(s_arrow_bitmap.width()) - icon_spacing(), item_height()
};
- draw_item_text(painter, index, is_selected_row, text_rect, index.data().to_string(), font_for_index(index), Gfx::TextAlignment::CenterLeft, Gfx::TextElision::None);
+ draw_item_text(painter, index, is_selected_row, text_rect, index.data().to_deprecated_string(), font_for_index(index), Gfx::TextAlignment::CenterLeft, Gfx::TextElision::None);
if (is_focused() && index == cursor_index()) {
painter.draw_rect(row_rect, palette().color(background_role()));
@@ -227,7 +227,7 @@ void ColumnsView::update_column_sizes()
for (int row = 0; row < row_count; row++) {
ModelIndex index = model()->index(row, m_model_column, column.parent_index);
VERIFY(index.is_valid());
- auto text = index.data().to_string();
+ auto text = index.data().to_deprecated_string();
int row_width = icon_spacing() + icon_size() + icon_spacing() + font().width(text) + icon_spacing() + s_arrow_bitmap.width() + icon_spacing();
if (row_width > column.width)
column.width = row_width;
diff --git a/Userland/Libraries/LibGUI/ComboBox.cpp b/Userland/Libraries/LibGUI/ComboBox.cpp
index 30468e4b28..7d95f2e26b 100644
--- a/Userland/Libraries/LibGUI/ComboBox.cpp
+++ b/Userland/Libraries/LibGUI/ComboBox.cpp
@@ -182,7 +182,7 @@ void ComboBox::selection_updated(ModelIndex const& index)
m_selected_index = index;
else
m_selected_index.clear();
- auto new_value = index.data().to_string();
+ auto new_value = index.data().to_deprecated_string();
m_editor->set_text(new_value);
if (!m_only_allow_values_from_model)
m_editor->select_all();
diff --git a/Userland/Libraries/LibGUI/CommandPalette.cpp b/Userland/Libraries/LibGUI/CommandPalette.cpp
index 4d714d4c58..52a4501d69 100644
--- a/Userland/Libraries/LibGUI/CommandPalette.cpp
+++ b/Userland/Libraries/LibGUI/CommandPalette.cpp
@@ -129,7 +129,7 @@ public:
case Column::Shortcut:
if (!action.shortcut().is_valid())
return "";
- return action.shortcut().to_string();
+ return action.shortcut().to_deprecated_string();
}
VERIFY_NOT_REACHED();
diff --git a/Userland/Libraries/LibGUI/CommonLocationsProvider.cpp b/Userland/Libraries/LibGUI/CommonLocationsProvider.cpp
index 373f75d53a..132b428636 100644
--- a/Userland/Libraries/LibGUI/CommonLocationsProvider.cpp
+++ b/Userland/Libraries/LibGUI/CommonLocationsProvider.cpp
@@ -61,8 +61,8 @@ void CommonLocationsProvider::load_from_json(DeprecatedString const& json_path)
if (!entry_value.is_object())
continue;
auto entry = entry_value.as_object();
- auto name = entry.get("name"sv).to_string();
- auto path = entry.get("path"sv).to_string();
+ auto name = entry.get("name"sv).to_deprecated_string();
+ auto path = entry.get("path"sv).to_deprecated_string();
s_common_locations.append({ name, path });
}
diff --git a/Userland/Libraries/LibGUI/ConnectionToWindowServer.cpp b/Userland/Libraries/LibGUI/ConnectionToWindowServer.cpp
index 09a7cf9b5d..89a08fc0fa 100644
--- a/Userland/Libraries/LibGUI/ConnectionToWindowServer.cpp
+++ b/Userland/Libraries/LibGUI/ConnectionToWindowServer.cpp
@@ -155,24 +155,24 @@ static Action* action_for_shortcut(Window& window, Shortcut const& shortcut)
if (!shortcut.is_valid())
return nullptr;
- dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, "Looking up action for {}", shortcut.to_string());
+ dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, "Looking up action for {}", shortcut.to_deprecated_string());
for (auto* widget = window.focused_widget(); widget; widget = widget->parent_widget()) {
if (auto* action = widget->action_for_shortcut(shortcut)) {
- dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, " > Focused widget {} gave action: {} {} (enabled: {}, shortcut: {}, alt-shortcut: {})", *widget, action, action->text(), action->is_enabled(), action->shortcut().to_string(), action->alternate_shortcut().to_string());
+ dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, " > Focused widget {} gave action: {} {} (enabled: {}, shortcut: {}, alt-shortcut: {})", *widget, action, action->text(), action->is_enabled(), action->shortcut().to_deprecated_string(), action->alternate_shortcut().to_deprecated_string());
return action;
}
}
if (auto* action = window.action_for_shortcut(shortcut)) {
- dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, " > Asked window {}, got action: {} {} (enabled: {}, shortcut: {}, alt-shortcut: {})", window, action, action->text(), action->is_enabled(), action->shortcut().to_string(), action->alternate_shortcut().to_string());
+ dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, " > Asked window {}, got action: {} {} (enabled: {}, shortcut: {}, alt-shortcut: {})", window, action, action->text(), action->is_enabled(), action->shortcut().to_deprecated_string(), action->alternate_shortcut().to_deprecated_string());
return action;
}
// NOTE: Application-global shortcuts are ignored while a blocking modal window is up.
if (!window.is_blocking() && !window.is_popup()) {
if (auto* action = Application::the()->action_for_shortcut(shortcut)) {
- dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, " > Asked application, got action: {} {} (enabled: {}, shortcut: {}, alt-shortcut: {})", action, action->text(), action->is_enabled(), action->shortcut().to_string(), action->alternate_shortcut().to_string());
+ dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, " > Asked application, got action: {} {} (enabled: {}, shortcut: {}, alt-shortcut: {})", action, action->text(), action->is_enabled(), action->shortcut().to_deprecated_string(), action->alternate_shortcut().to_deprecated_string());
return action;
}
}
diff --git a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp
index 849177ce4a..d7fb5dd912 100644
--- a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp
+++ b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp
@@ -174,7 +174,7 @@ auto EmojiInputDialog::supported_emoji() -> Vector<Emoji>
builder.append_code_point(*code_point);
code_points.append(*code_point);
});
- auto text = builder.to_string();
+ auto text = builder.to_deprecated_string();
auto emoji = Unicode::find_emoji_for_code_points(code_points);
if (!emoji.has_value()) {
diff --git a/Userland/Libraries/LibGUI/Event.cpp b/Userland/Libraries/LibGUI/Event.cpp
index be7d390e29..b24b698660 100644
--- a/Userland/Libraries/LibGUI/Event.cpp
+++ b/Userland/Libraries/LibGUI/Event.cpp
@@ -20,7 +20,7 @@ DropEvent::DropEvent(Gfx::IntPoint const& position, DeprecatedString const& text
{
}
-DeprecatedString KeyEvent::to_string() const
+DeprecatedString KeyEvent::to_deprecated_string() const
{
Vector<DeprecatedString, 8> parts;
@@ -44,7 +44,7 @@ DeprecatedString KeyEvent::to_string() const
if (i != parts.size() - 1)
builder.append('+');
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
ActionEvent::ActionEvent(Type type, Action& action)
diff --git a/Userland/Libraries/LibGUI/Event.h b/Userland/Libraries/LibGUI/Event.h
index 721243c8dc..0f4c6f5620 100644
--- a/Userland/Libraries/LibGUI/Event.h
+++ b/Userland/Libraries/LibGUI/Event.h
@@ -390,11 +390,11 @@ public:
{
StringBuilder sb;
sb.append_code_point(m_code_point);
- return sb.to_string();
+ return sb.to_deprecated_string();
}
u32 scancode() const { return m_scancode; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool is_arrow_key() const
{
diff --git a/Userland/Libraries/LibGUI/FileSystemModel.cpp b/Userland/Libraries/LibGUI/FileSystemModel.cpp
index 1ec1fe93c4..cf37edac5b 100644
--- a/Userland/Libraries/LibGUI/FileSystemModel.cpp
+++ b/Userland/Libraries/LibGUI/FileSystemModel.cpp
@@ -194,7 +194,7 @@ DeprecatedString FileSystemModel::Node::full_path() const
}
builder.append('/');
builder.append(name);
- return LexicalPath::canonicalized_path(builder.to_string());
+ return LexicalPath::canonicalized_path(builder.to_deprecated_string());
}
ModelIndex FileSystemModel::index(DeprecatedString path, int column) const
@@ -325,7 +325,7 @@ static DeprecatedString permission_string(mode_t mode)
builder.append('t');
else
builder.append(mode & S_IXOTH ? 'x' : '-');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void FileSystemModel::Node::set_selected(bool selected)
@@ -761,7 +761,7 @@ void FileSystemModel::set_data(ModelIndex const& index, Variant const& data)
VERIFY(is_editable(index));
Node& node = const_cast<Node&>(this->node(index));
auto dirname = LexicalPath::dirname(node.full_path());
- auto new_full_path = DeprecatedString::formatted("{}/{}", dirname, data.to_string());
+ auto new_full_path = DeprecatedString::formatted("{}/{}", dirname, data.to_deprecated_string());
int rc = rename(node.full_path().characters(), new_full_path.characters());
if (rc < 0) {
if (on_rename_error)
diff --git a/Userland/Libraries/LibGUI/FileSystemModel.h b/Userland/Libraries/LibGUI/FileSystemModel.h
index 210e8e755c..085d0644f2 100644
--- a/Userland/Libraries/LibGUI/FileSystemModel.h
+++ b/Userland/Libraries/LibGUI/FileSystemModel.h
@@ -140,7 +140,7 @@ public:
static DeprecatedString timestamp_string(time_t timestamp)
{
- return Core::DateTime::from_timestamp(timestamp).to_string();
+ return Core::DateTime::from_timestamp(timestamp).to_deprecated_string();
}
bool should_show_dotfiles() const { return m_should_show_dotfiles; }
diff --git a/Userland/Libraries/LibGUI/FontPicker.cpp b/Userland/Libraries/LibGUI/FontPicker.cpp
index 3092a35d2d..78479bba22 100644
--- a/Userland/Libraries/LibGUI/FontPicker.cpp
+++ b/Userland/Libraries/LibGUI/FontPicker.cpp
@@ -58,7 +58,7 @@ FontPicker::FontPicker(Window* parent_window, Gfx::Font const* current_font, boo
m_family_list_view->on_selection_change = [this] {
const auto& index = m_family_list_view->selection().first();
- m_family = index.data().to_string();
+ m_family = index.data().to_deprecated_string();
m_variants.clear();
Gfx::FontDatabase::the().for_each_typeface([&](auto& typeface) {
if (m_fixed_width_only && !typeface.is_fixed_width())
@@ -79,7 +79,7 @@ FontPicker::FontPicker(Window* parent_window, Gfx::Font const* current_font, boo
m_variant_list_view->on_selection_change = [this] {
const auto& index = m_variant_list_view->selection().first();
bool font_is_fixed_size = false;
- m_variant = index.data().to_string();
+ m_variant = index.data().to_deprecated_string();
m_sizes.clear();
Gfx::FontDatabase::the().for_each_typeface([&](auto& typeface) {
if (m_fixed_width_only && !typeface.is_fixed_width())
diff --git a/Userland/Libraries/LibGUI/GML/AST.h b/Userland/Libraries/LibGUI/GML/AST.h
index 0d899b8538..f5c0104f80 100644
--- a/Userland/Libraries/LibGUI/GML/AST.h
+++ b/Userland/Libraries/LibGUI/GML/AST.h
@@ -37,11 +37,11 @@ public:
return try_make_ref_counted<NodeT>(token.m_view);
}
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
StringBuilder builder;
format(builder, 0, false);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// Format this AST node with the builder at the given indentation level.
diff --git a/Userland/Libraries/LibGUI/GML/Formatter.h b/Userland/Libraries/LibGUI/GML/Formatter.h
index 91d4b9defe..beb3123d0c 100644
--- a/Userland/Libraries/LibGUI/GML/Formatter.h
+++ b/Userland/Libraries/LibGUI/GML/Formatter.h
@@ -15,7 +15,7 @@ namespace GUI::GML {
inline ErrorOr<DeprecatedString> format_gml(StringView string)
{
- return TRY(parse_gml(string))->to_string();
+ return TRY(parse_gml(string))->to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibGUI/IconView.cpp b/Userland/Libraries/LibGUI/IconView.cpp
index 6b05fcdff2..493cf4a736 100644
--- a/Userland/Libraries/LibGUI/IconView.cpp
+++ b/Userland/Libraries/LibGUI/IconView.cpp
@@ -100,7 +100,7 @@ auto IconView::get_item_data(int item_index) const -> ItemData&
return item_data;
item_data.index = model()->index(item_index, model_column());
- item_data.text = item_data.index.data().to_string();
+ item_data.text = item_data.index.data().to_deprecated_string();
get_item_rects(item_index, item_data, font_for_index(item_data.index));
item_data.valid = true;
return item_data;
diff --git a/Userland/Libraries/LibGUI/ItemListModel.h b/Userland/Libraries/LibGUI/ItemListModel.h
index 644d213419..224ec72fe4 100644
--- a/Userland/Libraries/LibGUI/ItemListModel.h
+++ b/Userland/Libraries/LibGUI/ItemListModel.h
@@ -96,7 +96,7 @@ public:
for (auto it = m_data.begin(); it != m_data.end(); ++it) {
for (auto it2d = (*it).begin(); it2d != (*it).end(); ++it2d) {
GUI::ModelIndex index = this->index(it.index(), it2d.index());
- if (!string_matches(data(index, ModelRole::Display).to_string(), searching, flags))
+ if (!string_matches(data(index, ModelRole::Display).to_deprecated_string(), searching, flags))
continue;
found_indices.append(index);
@@ -107,7 +107,7 @@ public:
} else {
for (auto it = m_data.begin(); it != m_data.end(); ++it) {
GUI::ModelIndex index = this->index(it.index());
- if (!string_matches(data(index, ModelRole::Display).to_string(), searching, flags))
+ if (!string_matches(data(index, ModelRole::Display).to_deprecated_string(), searching, flags))
continue;
found_indices.append(index);
diff --git a/Userland/Libraries/LibGUI/JsonArrayModel.cpp b/Userland/Libraries/LibGUI/JsonArrayModel.cpp
index 063715e45d..5a647b1a0a 100644
--- a/Userland/Libraries/LibGUI/JsonArrayModel.cpp
+++ b/Userland/Libraries/LibGUI/JsonArrayModel.cpp
@@ -54,7 +54,7 @@ bool JsonArrayModel::store()
return false;
}
- file->write(m_array.to_string());
+ file->write(m_array.to_deprecated_string());
file->close();
return true;
}
@@ -124,7 +124,7 @@ Variant JsonArrayModel::data(ModelIndex const& index, ModelRole role) const
return field_spec.massage_for_display(object);
if (data.is_number())
return data;
- return object.get(json_field_name).to_string();
+ return object.get(json_field_name).to_deprecated_string();
}
if (role == ModelRole::Sort) {
diff --git a/Userland/Libraries/LibGUI/ListView.cpp b/Userland/Libraries/LibGUI/ListView.cpp
index cf0f4ec514..d20f8ef5d4 100644
--- a/Userland/Libraries/LibGUI/ListView.cpp
+++ b/Userland/Libraries/LibGUI/ListView.cpp
@@ -42,7 +42,7 @@ void ListView::update_content_size()
int content_width = 0;
for (int row = 0, row_count = model()->row_count(); row < row_count; ++row) {
auto text = model()->index(row, m_model_column).data();
- content_width = max(content_width, font().width(text.to_string()) + horizontal_padding() * 2);
+ content_width = max(content_width, font().width(text.to_deprecated_string()) + horizontal_padding() * 2);
}
m_max_item_width = content_width;
content_width = max(content_width, widget_inner_rect().width());
@@ -133,7 +133,7 @@ void ListView::paint_list_item(Painter& painter, int row_index, int painted_item
text_rect.translate_by(horizontal_padding(), 0);
text_rect.set_width(text_rect.width() - horizontal_padding() * 2);
auto text_alignment = index.data(ModelRole::TextAlignment).to_text_alignment(Gfx::TextAlignment::CenterLeft);
- draw_item_text(painter, index, is_selected_row, text_rect, data.to_string(), font, text_alignment, Gfx::TextElision::None);
+ draw_item_text(painter, index, is_selected_row, text_rect, data.to_deprecated_string(), font, text_alignment, Gfx::TextElision::None);
}
}
diff --git a/Userland/Libraries/LibGUI/Menu.cpp b/Userland/Libraries/LibGUI/Menu.cpp
index f35bf01016..87a8848174 100644
--- a/Userland/Libraries/LibGUI/Menu.cpp
+++ b/Userland/Libraries/LibGUI/Menu.cpp
@@ -197,7 +197,7 @@ void Menu::realize_menu_item(MenuItem& item, int item_id)
break;
case MenuItem::Type::Action: {
auto& action = *item.action();
- auto shortcut_text = action.shortcut().is_valid() ? action.shortcut().to_string() : DeprecatedString();
+ auto shortcut_text = action.shortcut().is_valid() ? action.shortcut().to_deprecated_string() : DeprecatedString();
bool exclusive = action.group() && action.group()->is_exclusive() && action.is_checkable();
bool is_default = (m_current_default_action.ptr() == &action);
auto icon = action.icon() ? action.icon()->to_shareable_bitmap() : Gfx::ShareableBitmap();
diff --git a/Userland/Libraries/LibGUI/MenuItem.cpp b/Userland/Libraries/LibGUI/MenuItem.cpp
index ba81b72486..426c5492eb 100644
--- a/Userland/Libraries/LibGUI/MenuItem.cpp
+++ b/Userland/Libraries/LibGUI/MenuItem.cpp
@@ -73,7 +73,7 @@ void MenuItem::update_window_server()
if (m_menu_id < 0)
return;
auto& action = *m_action;
- auto shortcut_text = action.shortcut().is_valid() ? action.shortcut().to_string() : DeprecatedString();
+ auto shortcut_text = action.shortcut().is_valid() ? action.shortcut().to_deprecated_string() : DeprecatedString();
auto icon = action.icon() ? action.icon()->to_shareable_bitmap() : Gfx::ShareableBitmap();
ConnectionToWindowServer::the().async_update_menu_item(m_menu_id, m_identifier, -1, action.text(), action.is_enabled(), action.is_checkable(), action.is_checkable() ? action.is_checked() : false, m_default, shortcut_text, icon);
}
diff --git a/Userland/Libraries/LibGUI/Model.cpp b/Userland/Libraries/LibGUI/Model.cpp
index fae2a6be6b..af17ebc9ec 100644
--- a/Userland/Libraries/LibGUI/Model.cpp
+++ b/Userland/Libraries/LibGUI/Model.cpp
@@ -109,12 +109,12 @@ RefPtr<Core::MimeData> Model::mime_data(ModelSelection const& selection) const
auto text_data = index.data();
if (!first)
text_builder.append(", "sv);
- text_builder.append(text_data.to_string());
+ text_builder.append(text_data.to_deprecated_string());
if (!first)
data_builder.append('\n');
auto data = index.data(ModelRole::MimeData);
- data_builder.append(data.to_string());
+ data_builder.append(data.to_deprecated_string());
first = false;
@@ -126,7 +126,7 @@ RefPtr<Core::MimeData> Model::mime_data(ModelSelection const& selection) const
});
mime_data->set_data(drag_data_type(), data_builder.to_byte_buffer());
- mime_data->set_text(text_builder.to_string());
+ mime_data->set_text(text_builder.to_deprecated_string());
if (bitmap)
mime_data->set_data("image/x-raw-bitmap", bitmap->serialize_to_byte_buffer());
diff --git a/Userland/Libraries/LibGUI/ModelEditingDelegate.h b/Userland/Libraries/LibGUI/ModelEditingDelegate.h
index 56a1ee5307..71a9ca2c70 100644
--- a/Userland/Libraries/LibGUI/ModelEditingDelegate.h
+++ b/Userland/Libraries/LibGUI/ModelEditingDelegate.h
@@ -96,7 +96,7 @@ public:
virtual void set_value(Variant const& value, SelectionBehavior selection_behavior) override
{
auto& textbox = static_cast<TextBox&>(*widget());
- textbox.set_text(value.to_string());
+ textbox.set_text(value.to_deprecated_string());
if (selection_behavior == SelectionBehavior::SelectAll)
textbox.select_all();
}
diff --git a/Userland/Libraries/LibGUI/Progressbar.cpp b/Userland/Libraries/LibGUI/Progressbar.cpp
index 765ab93c7d..f54b9fdf45 100644
--- a/Userland/Libraries/LibGUI/Progressbar.cpp
+++ b/Userland/Libraries/LibGUI/Progressbar.cpp
@@ -67,7 +67,7 @@ void Progressbar::paint_event(PaintEvent& event)
} else if (m_format == Format::ValueSlashMax) {
builder.appendff("{}/{}", m_value, m_max);
}
- progress_text = builder.to_string();
+ progress_text = builder.to_deprecated_string();
}
Gfx::StylePainter::paint_progressbar(painter, rect, palette(), m_min, m_max, m_value, progress_text, m_orientation);
diff --git a/Userland/Libraries/LibGUI/Shortcut.cpp b/Userland/Libraries/LibGUI/Shortcut.cpp
index 4f2f4c61f7..086e773459 100644
--- a/Userland/Libraries/LibGUI/Shortcut.cpp
+++ b/Userland/Libraries/LibGUI/Shortcut.cpp
@@ -12,7 +12,7 @@
namespace GUI {
-DeprecatedString Shortcut::to_string() const
+DeprecatedString Shortcut::to_deprecated_string() const
{
Vector<DeprecatedString, 8> parts;
@@ -41,7 +41,7 @@ DeprecatedString Shortcut::to_string() const
StringBuilder builder;
builder.join('+', parts);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibGUI/Shortcut.h b/Userland/Libraries/LibGUI/Shortcut.h
index 1954bf7b76..835d626bfc 100644
--- a/Userland/Libraries/LibGUI/Shortcut.h
+++ b/Userland/Libraries/LibGUI/Shortcut.h
@@ -46,7 +46,7 @@ public:
Mouse,
};
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Type type() const { return m_type; }
bool is_valid() const { return m_type == Type::Keyboard ? (m_keyboard_key != Key_Invalid) : (m_mouse_button != MouseButton::None); }
u8 modifiers() const { return m_modifiers; }
diff --git a/Userland/Libraries/LibGUI/TabWidget.cpp b/Userland/Libraries/LibGUI/TabWidget.cpp
index 0fd059cb2c..9daaac68d6 100644
--- a/Userland/Libraries/LibGUI/TabWidget.cpp
+++ b/Userland/Libraries/LibGUI/TabWidget.cpp
@@ -42,7 +42,7 @@ TabWidget::TabWidget()
"text_alignment",
[this] { return Gfx::to_string(text_alignment()); },
[this](auto& value) {
- auto alignment = Gfx::text_alignment_from_string(value.to_string());
+ auto alignment = Gfx::text_alignment_from_string(value.to_deprecated_string());
if (alignment.has_value()) {
set_text_alignment(alignment.value());
return true;
diff --git a/Userland/Libraries/LibGUI/TableView.cpp b/Userland/Libraries/LibGUI/TableView.cpp
index 9e4b4a0fdc..d4abd6cd92 100644
--- a/Userland/Libraries/LibGUI/TableView.cpp
+++ b/Userland/Libraries/LibGUI/TableView.cpp
@@ -131,7 +131,7 @@ void TableView::paint_event(PaintEvent& event)
}
auto text_alignment = cell_index.data(ModelRole::TextAlignment).to_text_alignment(Gfx::TextAlignment::CenterLeft);
- draw_item_text(painter, cell_index, is_selected_row, cell_rect, data.to_string(), font_for_index(cell_index), text_alignment, Gfx::TextElision::Right);
+ draw_item_text(painter, cell_index, is_selected_row, cell_rect, data.to_deprecated_string(), font_for_index(cell_index), text_alignment, Gfx::TextElision::Right);
}
}
diff --git a/Userland/Libraries/LibGUI/TextDocument.cpp b/Userland/Libraries/LibGUI/TextDocument.cpp
index bdd6175862..abe9f2b33e 100644
--- a/Userland/Libraries/LibGUI/TextDocument.cpp
+++ b/Userland/Libraries/LibGUI/TextDocument.cpp
@@ -152,7 +152,7 @@ DeprecatedString TextDocumentLine::to_utf8() const
{
StringBuilder builder;
builder.append(view());
- return builder.to_string();
+ return builder.to_deprecated_string();
}
TextDocumentLine::TextDocumentLine(TextDocument& document)
@@ -353,7 +353,7 @@ DeprecatedString TextDocument::text() const
if (i != line_count() - 1)
builder.append('\n');
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
DeprecatedString TextDocument::text_in_range(TextRange const& a_range) const
@@ -379,7 +379,7 @@ DeprecatedString TextDocument::text_in_range(TextRange const& a_range) const
builder.append('\n');
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
u32 TextDocument::code_point_at(TextPosition const& position) const
@@ -800,7 +800,7 @@ bool InsertTextCommand::merge_with(GUI::Command const& other)
StringBuilder builder(m_text.length() + typed_other.m_text.length());
builder.append(m_text);
builder.append(typed_other.m_text);
- m_text = builder.to_string();
+ m_text = builder.to_deprecated_string();
m_range.set_end(typed_other.m_range.end());
m_timestamp = Time::now_monotonic();
@@ -900,7 +900,7 @@ bool RemoveTextCommand::merge_with(GUI::Command const& other)
StringBuilder builder(m_text.length() + typed_other.m_text.length());
builder.append(typed_other.m_text);
builder.append(m_text);
- m_text = builder.to_string();
+ m_text = builder.to_deprecated_string();
m_range.set_start(typed_other.m_range.start());
m_timestamp = Time::now_monotonic();
diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp
index a1f102f14d..c447c8245d 100644
--- a/Userland/Libraries/LibGUI/TextEditor.cpp
+++ b/Userland/Libraries/LibGUI/TextEditor.cpp
@@ -1189,7 +1189,7 @@ void TextEditor::add_code_point(u32 code_point)
else
m_autocomplete_timer->start();
}
- insert_at_cursor_or_replace_selection(sb.to_string());
+ insert_at_cursor_or_replace_selection(sb.to_deprecated_string());
};
void TextEditor::reset_cursor_blink()
@@ -2047,7 +2047,7 @@ void TextEditor::document_did_update_undo_stack()
builder.append(' ');
builder.append(suffix.value());
}
- return builder.to_string();
+ return builder.to_deprecated_string();
};
m_undo_action->set_enabled(can_undo() && !text_is_secret());
diff --git a/Userland/Libraries/LibGUI/Toolbar.cpp b/Userland/Libraries/LibGUI/Toolbar.cpp
index 91e5ed20bd..27b8d387e8 100644
--- a/Userland/Libraries/LibGUI/Toolbar.cpp
+++ b/Userland/Libraries/LibGUI/Toolbar.cpp
@@ -76,10 +76,10 @@ private:
builder.append(action.text());
if (action.shortcut().is_valid()) {
builder.append(" ("sv);
- builder.append(action.shortcut().to_string());
+ builder.append(action.shortcut().to_deprecated_string());
builder.append(')');
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
virtual void enter_event(Core::Event& event) override
diff --git a/Userland/Libraries/LibGUI/TreeView.cpp b/Userland/Libraries/LibGUI/TreeView.cpp
index a92df5cc9e..5108dfc37c 100644
--- a/Userland/Libraries/LibGUI/TreeView.cpp
+++ b/Userland/Libraries/LibGUI/TreeView.cpp
@@ -185,7 +185,7 @@ void TreeView::traverse_in_paint_order(Callback callback) const
if (index.is_valid()) {
auto& metadata = ensure_metadata_for_index(index);
int x_offset = tree_column_x_offset + horizontal_padding() + indent_level * indent_width_in_pixels();
- auto node_text = index.data().to_string();
+ auto node_text = index.data().to_deprecated_string();
Gfx::IntRect rect = {
x_offset, y_offset,
icon_size() + icon_spacing() + text_padding() + font_for_index(index)->width(node_text) + text_padding(), row_height()
@@ -317,7 +317,7 @@ void TreeView::paint_event(PaintEvent& event)
}
} else {
auto text_alignment = cell_index.data(ModelRole::TextAlignment).to_text_alignment(Gfx::TextAlignment::CenterLeft);
- draw_item_text(painter, cell_index, is_selected_row, cell_rect, data.to_string(), font_for_index(cell_index), text_alignment, Gfx::TextElision::Right);
+ draw_item_text(painter, cell_index, is_selected_row, cell_rect, data.to_deprecated_string(), font_for_index(cell_index), text_alignment, Gfx::TextElision::Right);
}
}
} else {
@@ -346,7 +346,7 @@ void TreeView::paint_event(PaintEvent& event)
}
auto display_data = index.data();
if (display_data.is_string() || display_data.is_u32() || display_data.is_i32() || display_data.is_u64() || display_data.is_i64() || display_data.is_bool() || display_data.is_float())
- draw_item_text(painter, index, is_selected_row, text_rect, display_data.to_string(), font_for_index(index), Gfx::TextAlignment::CenterLeft, Gfx::TextElision::Right);
+ draw_item_text(painter, index, is_selected_row, text_rect, display_data.to_deprecated_string(), font_for_index(index), Gfx::TextAlignment::CenterLeft, Gfx::TextElision::Right);
if (selection_behavior() == SelectionBehavior::SelectItems && is_focused() && index == cursor_index()) {
painter.draw_rect(background_rect, palette().color(background_role()));
@@ -683,7 +683,7 @@ void TreeView::auto_resize_column(int column)
} else if (cell_data.is_bitmap()) {
cell_width = cell_data.as_bitmap().width();
} else if (cell_data.is_valid()) {
- cell_width = font().width(cell_data.to_string());
+ cell_width = font().width(cell_data.to_deprecated_string());
}
if (is_empty && cell_width > 0)
is_empty = false;
@@ -726,7 +726,7 @@ void TreeView::update_column_sizes()
} else if (cell_data.is_bitmap()) {
cell_width = cell_data.as_bitmap().width();
} else if (cell_data.is_valid()) {
- cell_width = font().width(cell_data.to_string());
+ cell_width = font().width(cell_data.to_deprecated_string());
}
column_width = max(column_width, cell_width);
return IterationDecision::Continue;
@@ -743,7 +743,7 @@ void TreeView::update_column_sizes()
auto cell_data = model.index(index.row(), tree_column, index.parent()).data();
int cell_width = 0;
if (cell_data.is_valid()) {
- cell_width = font().width(cell_data.to_string());
+ cell_width = font().width(cell_data.to_deprecated_string());
cell_width += horizontal_padding() * 2 + indent_level * indent_width_in_pixels() + icon_size() / 2 + text_padding() * 2;
}
tree_column_width = max(tree_column_width, cell_width);
diff --git a/Userland/Libraries/LibGUI/Variant.cpp b/Userland/Libraries/LibGUI/Variant.cpp
index c257c1b432..d7b94f2455 100644
--- a/Userland/Libraries/LibGUI/Variant.cpp
+++ b/Userland/Libraries/LibGUI/Variant.cpp
@@ -66,11 +66,11 @@ bool Variant::operator==(Variant const& other) const
return &own_value.impl() == &other_value.impl();
// FIXME: Figure out if this silly behaviour is actually used anywhere, then get rid of it.
else
- return to_string() == other.to_string();
+ return to_deprecated_string() == other.to_deprecated_string();
},
[&](auto const&) {
// FIXME: Figure out if this silly behaviour is actually used anywhere, then get rid of it.
- return to_string() == other.to_string();
+ return to_deprecated_string() == other.to_deprecated_string();
});
});
}
@@ -92,10 +92,10 @@ bool Variant::operator<(Variant const& other) const
return own_value < other_value;
// FIXME: Figure out if this silly behaviour is actually used anywhere, then get rid of it.
else
- return to_string() < other.to_string();
+ return to_deprecated_string() < other.to_deprecated_string();
},
[&](auto const&) -> bool {
- return to_string() < other.to_string(); // FIXME: Figure out if this silly behaviour is actually used anywhere, then get rid of it.
+ return to_deprecated_string() < other.to_deprecated_string(); // FIXME: Figure out if this silly behaviour is actually used anywhere, then get rid of it.
});
});
}
diff --git a/Userland/Libraries/LibGUI/Variant.h b/Userland/Libraries/LibGUI/Variant.h
index 1a9b97c563..57ad3a5094 100644
--- a/Userland/Libraries/LibGUI/Variant.h
+++ b/Userland/Libraries/LibGUI/Variant.h
@@ -199,7 +199,7 @@ public:
return default_value;
}
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
return visit(
[](Empty) -> DeprecatedString { return "[null]"; },
diff --git a/Userland/Libraries/LibGUI/VimEditingEngine.cpp b/Userland/Libraries/LibGUI/VimEditingEngine.cpp
index 7a52ef10c0..be69a72cc8 100644
--- a/Userland/Libraries/LibGUI/VimEditingEngine.cpp
+++ b/Userland/Libraries/LibGUI/VimEditingEngine.cpp
@@ -1489,14 +1489,14 @@ void VimEditingEngine::put_before()
sb.append(m_yank_buffer);
sb.append_code_point(0x0A);
}
- m_editor->insert_at_cursor_or_replace_selection(sb.to_string());
+ m_editor->insert_at_cursor_or_replace_selection(sb.to_deprecated_string());
m_editor->set_cursor({ m_editor->cursor().line(), m_editor->current_line().first_non_whitespace_column() });
} else {
StringBuilder sb = StringBuilder(m_yank_buffer.length() * amount);
for (auto i = 0; i < amount; i++) {
sb.append(m_yank_buffer);
}
- m_editor->insert_at_cursor_or_replace_selection(sb.to_string());
+ m_editor->insert_at_cursor_or_replace_selection(sb.to_deprecated_string());
move_one_left();
}
}
@@ -1512,7 +1512,7 @@ void VimEditingEngine::put_after()
sb.append_code_point(0x0A);
sb.append(m_yank_buffer);
}
- m_editor->insert_at_cursor_or_replace_selection(sb.to_string());
+ m_editor->insert_at_cursor_or_replace_selection(sb.to_deprecated_string());
m_editor->set_cursor({ m_editor->cursor().line(), m_editor->current_line().first_non_whitespace_column() });
} else {
// FIXME: If attempting to put on the last column a line,
@@ -1522,7 +1522,7 @@ void VimEditingEngine::put_after()
for (auto i = 0; i < amount; i++) {
sb.append(m_yank_buffer);
}
- m_editor->insert_at_cursor_or_replace_selection(sb.to_string());
+ m_editor->insert_at_cursor_or_replace_selection(sb.to_deprecated_string());
move_one_left();
}
}
diff --git a/Userland/Libraries/LibGUI/Widget.cpp b/Userland/Libraries/LibGUI/Widget.cpp
index 1b70be870a..0d84ce25d3 100644
--- a/Userland/Libraries/LibGUI/Widget.cpp
+++ b/Userland/Libraries/LibGUI/Widget.cpp
@@ -81,11 +81,11 @@ Widget::Widget()
register_property(
"font_type", [this] { return m_font->is_fixed_width() ? "FixedWidth" : "Normal"; },
[this](auto& value) {
- if (value.to_string() == "FixedWidth") {
+ if (value.to_deprecated_string() == "FixedWidth") {
set_font_fixed_width(true);
return true;
}
- if (value.to_string() == "Normal") {
+ if (value.to_deprecated_string() == "Normal") {
set_font_fixed_width(false);
return true;
}
@@ -127,9 +127,9 @@ Widget::Widget()
});
register_property(
- "foreground_color", [this]() -> JsonValue { return palette().color(foreground_role()).to_string(); },
+ "foreground_color", [this]() -> JsonValue { return palette().color(foreground_role()).to_deprecated_string(); },
[this](auto& value) {
- auto c = Color::from_string(value.to_string());
+ auto c = Color::from_string(value.to_deprecated_string());
if (c.has_value()) {
auto _palette = palette();
_palette.set_color(foreground_role(), c.value());
@@ -140,9 +140,9 @@ Widget::Widget()
});
register_property(
- "background_color", [this]() -> JsonValue { return palette().color(background_role()).to_string(); },
+ "background_color", [this]() -> JsonValue { return palette().color(background_role()).to_deprecated_string(); },
[this](auto& value) {
- auto c = Color::from_string(value.to_string());
+ auto c = Color::from_string(value.to_deprecated_string());
if (c.has_value()) {
auto _palette = palette();
_palette.set_color(background_role(), c.value());
@@ -1188,12 +1188,12 @@ bool Widget::load_from_gml_ast(NonnullRefPtr<GUI::GML::Node> ast, RefPtr<Core::O
if (auto* registration = Core::ObjectClassRegistration::find(class_name)) {
auto layout = registration->construct();
if (!layout || !registration->is_derived_from(layout_class)) {
- dbgln("Invalid layout class: '{}'", class_name.to_string());
+ dbgln("Invalid layout class: '{}'", class_name.to_deprecated_string());
return false;
}
set_layout(static_ptr_cast<Layout>(layout).release_nonnull());
} else {
- dbgln("Unknown layout class: '{}'", class_name.to_string());
+ dbgln("Unknown layout class: '{}'", class_name.to_deprecated_string());
return false;
}
diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp
index e2063ae262..86f76209bf 100644
--- a/Userland/Libraries/LibGUI/Window.cpp
+++ b/Userland/Libraries/LibGUI/Window.cpp
@@ -80,7 +80,7 @@ Window::Window(Core::Object* parent)
"title",
[this] { return title(); },
[this](auto& value) {
- set_title(value.to_string());
+ set_title(value.to_deprecated_string());
return true;
});
diff --git a/Userland/Libraries/LibGemini/GeminiRequest.cpp b/Userland/Libraries/LibGemini/GeminiRequest.cpp
index 37c5798ab4..ef395771ac 100644
--- a/Userland/Libraries/LibGemini/GeminiRequest.cpp
+++ b/Userland/Libraries/LibGemini/GeminiRequest.cpp
@@ -13,7 +13,7 @@ namespace Gemini {
ByteBuffer GeminiRequest::to_raw_request() const
{
StringBuilder builder;
- builder.append(m_url.to_string());
+ builder.append(m_url.to_deprecated_string());
builder.append("\r\n"sv);
return builder.to_byte_buffer();
}
diff --git a/Userland/Libraries/LibGemini/Line.cpp b/Userland/Libraries/LibGemini/Line.cpp
index 78beeb53e2..8db3ef4156 100644
--- a/Userland/Libraries/LibGemini/Line.cpp
+++ b/Userland/Libraries/LibGemini/Line.cpp
@@ -70,14 +70,14 @@ Link::Link(DeprecatedString text, Document const& document)
}
m_url = document.url().complete_url(url);
if (m_name.is_null())
- m_name = m_url.to_string();
+ m_name = m_url.to_deprecated_string();
}
DeprecatedString Link::render_to_html() const
{
StringBuilder builder;
builder.append("<a href=\""sv);
- builder.append(escape_html_entities(m_url.to_string()));
+ builder.append(escape_html_entities(m_url.to_deprecated_string()));
builder.append("\">"sv);
builder.append(escape_html_entities(m_name));
builder.append("</a><br>\n"sv);
diff --git a/Userland/Libraries/LibGfx/Color.cpp b/Userland/Libraries/LibGfx/Color.cpp
index f9294247cd..22e17c8c12 100644
--- a/Userland/Libraries/LibGfx/Color.cpp
+++ b/Userland/Libraries/LibGfx/Color.cpp
@@ -18,12 +18,12 @@
namespace Gfx {
-DeprecatedString Color::to_string() const
+DeprecatedString Color::to_deprecated_string() const
{
return DeprecatedString::formatted("#{:02x}{:02x}{:02x}{:02x}", red(), green(), blue(), alpha());
}
-DeprecatedString Color::to_string_without_alpha() const
+DeprecatedString Color::to_deprecated_string_without_alpha() const
{
return DeprecatedString::formatted("#{:02x}{:02x}{:02x}", red(), green(), blue());
}
@@ -384,5 +384,5 @@ ErrorOr<void> IPC::decode(Decoder& decoder, Color& color)
ErrorOr<void> AK::Formatter<Gfx::Color>::format(FormatBuilder& builder, Gfx::Color const& value)
{
- return Formatter<StringView>::format(builder, value.to_string());
+ return Formatter<StringView>::format(builder, value.to_deprecated_string());
}
diff --git a/Userland/Libraries/LibGfx/Color.h b/Userland/Libraries/LibGfx/Color.h
index bad930b356..cf34f6e017 100644
--- a/Userland/Libraries/LibGfx/Color.h
+++ b/Userland/Libraries/LibGfx/Color.h
@@ -352,8 +352,8 @@ public:
return m_value == other.m_value;
}
- DeprecatedString to_string() const;
- DeprecatedString to_string_without_alpha() const;
+ DeprecatedString to_deprecated_string() const;
+ DeprecatedString to_deprecated_string_without_alpha() const;
static Optional<Color> from_string(StringView);
constexpr HSV to_hsv() const
diff --git a/Userland/Libraries/LibGfx/DDSLoader.cpp b/Userland/Libraries/LibGfx/DDSLoader.cpp
index b122d2f7d6..12de4cbc91 100644
--- a/Userland/Libraries/LibGfx/DDSLoader.cpp
+++ b/Userland/Libraries/LibGfx/DDSLoader.cpp
@@ -930,7 +930,7 @@ void DDSLoadingContext::dump_debug()
builder.append(" DDS_ALPHA_MODE_CUSTOM"sv);
builder.append("\n"sv);
- dbgln("{}", builder.to_string());
+ dbgln("{}", builder.to_deprecated_string());
}
DDSImageDecoderPlugin::DDSImageDecoderPlugin(u8 const* data, size_t size)
diff --git a/Userland/Libraries/LibGfx/Font/BitmapFont.cpp b/Userland/Libraries/LibGfx/Font/BitmapFont.cpp
index 55bf9845ea..395f779a5c 100644
--- a/Userland/Libraries/LibGfx/Font/BitmapFont.cpp
+++ b/Userland/Libraries/LibGfx/Font/BitmapFont.cpp
@@ -380,7 +380,7 @@ DeprecatedString BitmapFont::variant() const
builder.append(' ');
builder.append(slope_to_name(slope()));
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
Font const& Font::bold_variant() const
diff --git a/Userland/Libraries/LibGfx/Line.h b/Userland/Libraries/LibGfx/Line.h
index 0fd7812374..487cb7a2df 100644
--- a/Userland/Libraries/LibGfx/Line.h
+++ b/Userland/Libraries/LibGfx/Line.h
@@ -141,7 +141,7 @@ public:
return Line<U>(*this);
}
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
Point<T> m_a;
@@ -149,13 +149,13 @@ private:
};
template<>
-inline DeprecatedString IntLine::to_string() const
+inline DeprecatedString IntLine::to_deprecated_string() const
{
return DeprecatedString::formatted("[{},{} -> {},{}]", m_a.x(), m_a.y(), m_b.x(), m_b.y());
}
template<>
-inline DeprecatedString FloatLine::to_string() const
+inline DeprecatedString FloatLine::to_deprecated_string() const
{
return DeprecatedString::formatted("[{},{} -> {},{}]", m_a.x(), m_a.y(), m_b.x(), m_b.y());
}
diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp
index 498e068c83..98023587ca 100644
--- a/Userland/Libraries/LibGfx/Painter.cpp
+++ b/Userland/Libraries/LibGfx/Painter.cpp
@@ -2417,7 +2417,7 @@ DeprecatedString parse_ampersand_string(StringView raw_text, Optional<size_t>* u
}
builder.append(raw_text[i]);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void Gfx::Painter::draw_ui_text(Gfx::IntRect const& rect, StringView text, Gfx::Font const& font, Gfx::TextAlignment text_alignment, Gfx::Color color)
diff --git a/Userland/Libraries/LibGfx/Path.cpp b/Userland/Libraries/LibGfx/Path.cpp
index cc758e06f8..c95b0458f5 100644
--- a/Userland/Libraries/LibGfx/Path.cpp
+++ b/Userland/Libraries/LibGfx/Path.cpp
@@ -177,7 +177,7 @@ void Path::close_all_subpaths()
}
}
-DeprecatedString Path::to_string() const
+DeprecatedString Path::to_deprecated_string() const
{
StringBuilder builder;
builder.append("Path { "sv);
@@ -207,19 +207,19 @@ DeprecatedString Path::to_string() const
switch (segment.type()) {
case Segment::Type::QuadraticBezierCurveTo:
builder.append(", "sv);
- builder.append(static_cast<QuadraticBezierCurveSegment const&>(segment).through().to_string());
+ builder.append(static_cast<QuadraticBezierCurveSegment const&>(segment).through().to_deprecated_string());
break;
case Segment::Type::CubicBezierCurveTo:
builder.append(", "sv);
- builder.append(static_cast<CubicBezierCurveSegment const&>(segment).through_0().to_string());
+ builder.append(static_cast<CubicBezierCurveSegment const&>(segment).through_0().to_deprecated_string());
builder.append(", "sv);
- builder.append(static_cast<CubicBezierCurveSegment const&>(segment).through_1().to_string());
+ builder.append(static_cast<CubicBezierCurveSegment const&>(segment).through_1().to_deprecated_string());
break;
case Segment::Type::EllipticalArcTo: {
auto& arc = static_cast<EllipticalArcSegment const&>(segment);
builder.appendff(", {}, {}, {}, {}, {}",
- arc.radii().to_string().characters(),
- arc.center().to_string().characters(),
+ arc.radii().to_deprecated_string().characters(),
+ arc.center().to_deprecated_string().characters(),
arc.x_axis_rotation(),
arc.theta_1(),
arc.theta_delta());
@@ -232,7 +232,7 @@ DeprecatedString Path::to_string() const
builder.append(") "sv);
}
builder.append('}');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void Path::segmentize_path()
diff --git a/Userland/Libraries/LibGfx/Path.h b/Userland/Libraries/LibGfx/Path.h
index de60976ad4..5349020d3d 100644
--- a/Userland/Libraries/LibGfx/Path.h
+++ b/Userland/Libraries/LibGfx/Path.h
@@ -245,7 +245,7 @@ public:
Path copy_transformed(AffineTransform const&) const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
void invalidate_split_lines()
diff --git a/Userland/Libraries/LibGfx/Point.cpp b/Userland/Libraries/LibGfx/Point.cpp
index dd9d3bd2e5..f5a99bf82e 100644
--- a/Userland/Libraries/LibGfx/Point.cpp
+++ b/Userland/Libraries/LibGfx/Point.cpp
@@ -36,13 +36,13 @@ template<typename T>
}
template<>
-DeprecatedString IntPoint::to_string() const
+DeprecatedString IntPoint::to_deprecated_string() const
{
return DeprecatedString::formatted("[{},{}]", x(), y());
}
template<>
-DeprecatedString FloatPoint::to_string() const
+DeprecatedString FloatPoint::to_deprecated_string() const
{
return DeprecatedString::formatted("[{},{}]", x(), y());
}
diff --git a/Userland/Libraries/LibGfx/Point.h b/Userland/Libraries/LibGfx/Point.h
index f74d395332..452bc605dc 100644
--- a/Userland/Libraries/LibGfx/Point.h
+++ b/Userland/Libraries/LibGfx/Point.h
@@ -248,7 +248,7 @@ public:
return Point<U>(ceil(x()), ceil(y()));
}
- [[nodiscard]] DeprecatedString to_string() const;
+ [[nodiscard]] DeprecatedString to_deprecated_string() const;
private:
T m_x { 0 };
diff --git a/Userland/Libraries/LibGfx/PortableImageLoaderCommon.h b/Userland/Libraries/LibGfx/PortableImageLoaderCommon.h
index 35bf7fcbae..74a5ad17b9 100644
--- a/Userland/Libraries/LibGfx/PortableImageLoaderCommon.h
+++ b/Userland/Libraries/LibGfx/PortableImageLoaderCommon.h
@@ -45,7 +45,7 @@ static bool read_number(Streamer& streamer, TValue* value)
sb.append(byte);
}
- auto const opt_value = sb.to_string().to_uint();
+ auto const opt_value = sb.to_deprecated_string().to_uint();
if (!opt_value.has_value()) {
*value = 0;
return false;
diff --git a/Userland/Libraries/LibGfx/Rect.cpp b/Userland/Libraries/LibGfx/Rect.cpp
index 4c16507004..6c85b50fac 100644
--- a/Userland/Libraries/LibGfx/Rect.cpp
+++ b/Userland/Libraries/LibGfx/Rect.cpp
@@ -15,13 +15,13 @@
namespace Gfx {
template<>
-DeprecatedString IntRect::to_string() const
+DeprecatedString IntRect::to_deprecated_string() const
{
return DeprecatedString::formatted("[{},{} {}x{}]", x(), y(), width(), height());
}
template<>
-DeprecatedString FloatRect::to_string() const
+DeprecatedString FloatRect::to_deprecated_string() const
{
return DeprecatedString::formatted("[{},{} {}x{}]", x(), y(), width(), height());
}
diff --git a/Userland/Libraries/LibGfx/Rect.h b/Userland/Libraries/LibGfx/Rect.h
index 2565297771..953b26f6db 100644
--- a/Userland/Libraries/LibGfx/Rect.h
+++ b/Userland/Libraries/LibGfx/Rect.h
@@ -997,7 +997,7 @@ public:
};
}
- [[nodiscard]] DeprecatedString to_string() const;
+ [[nodiscard]] DeprecatedString to_deprecated_string() const;
private:
Point<T> m_location;
diff --git a/Userland/Libraries/LibGfx/Size.cpp b/Userland/Libraries/LibGfx/Size.cpp
index 767487dd6e..718312d052 100644
--- a/Userland/Libraries/LibGfx/Size.cpp
+++ b/Userland/Libraries/LibGfx/Size.cpp
@@ -12,13 +12,13 @@
namespace Gfx {
template<>
-DeprecatedString IntSize::to_string() const
+DeprecatedString IntSize::to_deprecated_string() const
{
return DeprecatedString::formatted("[{}x{}]", m_width, m_height);
}
template<>
-DeprecatedString FloatSize::to_string() const
+DeprecatedString FloatSize::to_deprecated_string() const
{
return DeprecatedString::formatted("[{}x{}]", m_width, m_height);
}
diff --git a/Userland/Libraries/LibGfx/Size.h b/Userland/Libraries/LibGfx/Size.h
index 55f1c20532..ec461de9c2 100644
--- a/Userland/Libraries/LibGfx/Size.h
+++ b/Userland/Libraries/LibGfx/Size.h
@@ -182,7 +182,7 @@ public:
return Size<U>(*this);
}
- [[nodiscard]] DeprecatedString to_string() const;
+ [[nodiscard]] DeprecatedString to_deprecated_string() const;
template<Integral I>
[[nodiscard]] Size<I> to_rounded() const
diff --git a/Userland/Libraries/LibGfx/TextLayout.cpp b/Userland/Libraries/LibGfx/TextLayout.cpp
index 78dfe1699b..afb9d2e07a 100644
--- a/Userland/Libraries/LibGfx/TextLayout.cpp
+++ b/Userland/Libraries/LibGfx/TextLayout.cpp
@@ -125,7 +125,7 @@ Vector<DeprecatedString, 32> TextLayout::wrap_lines(TextElision elision, TextWra
for (Block& block : blocks) {
switch (block.type) {
case BlockType::Newline: {
- lines.append(builder.to_string());
+ lines.append(builder.to_deprecated_string());
builder.clear();
line_width = 0;
@@ -147,7 +147,7 @@ Vector<DeprecatedString, 32> TextLayout::wrap_lines(TextElision elision, TextWra
}
if (wrapping == TextWrapping::Wrap && line_width + block_width > static_cast<unsigned>(m_rect.width())) {
- lines.append(builder.to_string());
+ lines.append(builder.to_deprecated_string());
builder.clear();
line_width = 0;
}
@@ -166,7 +166,7 @@ Vector<DeprecatedString, 32> TextLayout::wrap_lines(TextElision elision, TextWra
blocks_processed:
if (!did_not_finish) {
- auto last_line = builder.to_string();
+ auto last_line = builder.to_deprecated_string();
if (!last_line.is_empty())
lines.append(last_line);
}
@@ -212,7 +212,7 @@ DeprecatedString TextLayout::elide_text_from_right(Utf8View text, bool force_eli
StringBuilder builder;
builder.append(text.substring_view(0, offset).as_string());
builder.append("..."sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibGfx/Triangle.cpp b/Userland/Libraries/LibGfx/Triangle.cpp
index 71a5e428be..1642aaed0d 100644
--- a/Userland/Libraries/LibGfx/Triangle.cpp
+++ b/Userland/Libraries/LibGfx/Triangle.cpp
@@ -11,13 +11,13 @@
namespace Gfx {
template<>
-DeprecatedString Triangle<int>::to_string() const
+DeprecatedString Triangle<int>::to_deprecated_string() const
{
return DeprecatedString::formatted("({},{},{})", m_a, m_b, m_c);
}
template<>
-DeprecatedString Triangle<float>::to_string() const
+DeprecatedString Triangle<float>::to_deprecated_string() const
{
return DeprecatedString::formatted("({},{},{})", m_a, m_b, m_c);
}
diff --git a/Userland/Libraries/LibGfx/Triangle.h b/Userland/Libraries/LibGfx/Triangle.h
index 599f5b7603..5b50c6081f 100644
--- a/Userland/Libraries/LibGfx/Triangle.h
+++ b/Userland/Libraries/LibGfx/Triangle.h
@@ -49,7 +49,7 @@ public:
return true;
}
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
T m_determinant { 0 };
diff --git a/Userland/Libraries/LibGfx/Vector2.h b/Userland/Libraries/LibGfx/Vector2.h
index 2de733de44..64efd3c769 100644
--- a/Userland/Libraries/LibGfx/Vector2.h
+++ b/Userland/Libraries/LibGfx/Vector2.h
@@ -29,7 +29,7 @@ template<typename T>
struct Formatter<Gfx::Vector2<T>> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Gfx::Vector2<T> const& value)
{
- return Formatter<StringView>::format(builder, value.to_string());
+ return Formatter<StringView>::format(builder, value.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibGfx/Vector3.h b/Userland/Libraries/LibGfx/Vector3.h
index 4c73f91551..7ff4ec40c8 100644
--- a/Userland/Libraries/LibGfx/Vector3.h
+++ b/Userland/Libraries/LibGfx/Vector3.h
@@ -29,7 +29,7 @@ template<typename T>
struct Formatter<Gfx::Vector3<T>> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Gfx::Vector3<T> const& value)
{
- return Formatter<StringView>::format(builder, value.to_string());
+ return Formatter<StringView>::format(builder, value.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibGfx/Vector4.h b/Userland/Libraries/LibGfx/Vector4.h
index dd059b006b..829d7b2601 100644
--- a/Userland/Libraries/LibGfx/Vector4.h
+++ b/Userland/Libraries/LibGfx/Vector4.h
@@ -29,7 +29,7 @@ template<typename T>
struct Formatter<Gfx::Vector4<T>> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Gfx::Vector4<T> const& value)
{
- return Formatter<StringView>::format(builder, value.to_string());
+ return Formatter<StringView>::format(builder, value.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibGfx/VectorN.h b/Userland/Libraries/LibGfx/VectorN.h
index 676494edde..7e67a72695 100644
--- a/Userland/Libraries/LibGfx/VectorN.h
+++ b/Userland/Libraries/LibGfx/VectorN.h
@@ -243,7 +243,7 @@ public:
return VectorN<3, T>(x(), y(), z());
}
- [[nodiscard]] DeprecatedString to_string() const
+ [[nodiscard]] DeprecatedString to_deprecated_string() const
{
if constexpr (N == 2)
return DeprecatedString::formatted("[{},{}]", x(), y());
diff --git a/Userland/Libraries/LibHTTP/HttpRequest.cpp b/Userland/Libraries/LibHTTP/HttpRequest.cpp
index 694752f2ac..ab6538e3bc 100644
--- a/Userland/Libraries/LibHTTP/HttpRequest.cpp
+++ b/Userland/Libraries/LibHTTP/HttpRequest.cpp
@@ -12,7 +12,7 @@
namespace HTTP {
-DeprecatedString to_string(HttpRequest::Method method)
+DeprecatedString to_deprecated_string(HttpRequest::Method method)
{
switch (method) {
case HttpRequest::Method::GET:
@@ -40,7 +40,7 @@ DeprecatedString to_string(HttpRequest::Method method)
DeprecatedString HttpRequest::method_name() const
{
- return to_string(m_method);
+ return to_deprecated_string(m_method);
}
ByteBuffer HttpRequest::to_raw_request() const
@@ -242,11 +242,11 @@ Optional<HttpRequest::Header> HttpRequest::get_http_basic_authentication_header(
builder.append(url.username());
builder.append(':');
builder.append(url.password());
- auto token = encode_base64(builder.to_string().bytes());
+ auto token = encode_base64(builder.to_deprecated_string().bytes());
builder.clear();
builder.append("Basic "sv);
builder.append(token);
- return Header { "Authorization", builder.to_string() };
+ return Header { "Authorization", builder.to_deprecated_string() };
}
Optional<HttpRequest::BasicAuthenticationCredentials> HttpRequest::parse_http_basic_authentication_header(DeprecatedString const& value)
diff --git a/Userland/Libraries/LibHTTP/HttpRequest.h b/Userland/Libraries/LibHTTP/HttpRequest.h
index 0f7e8e71aa..7ab76f6c77 100644
--- a/Userland/Libraries/LibHTTP/HttpRequest.h
+++ b/Userland/Libraries/LibHTTP/HttpRequest.h
@@ -73,6 +73,6 @@ private:
ByteBuffer m_body;
};
-DeprecatedString to_string(HttpRequest::Method);
+DeprecatedString to_deprecated_string(HttpRequest::Method);
}
diff --git a/Userland/Libraries/LibHTTP/Job.cpp b/Userland/Libraries/LibHTTP/Job.cpp
index ad089536d9..25c04d951c 100644
--- a/Userland/Libraries/LibHTTP/Job.cpp
+++ b/Userland/Libraries/LibHTTP/Job.cpp
@@ -337,7 +337,7 @@ void Job::on_socket_connected()
}
if (on_headers_received) {
if (!m_set_cookie_headers.is_empty())
- m_headers.set("Set-Cookie", JsonArray { m_set_cookie_headers }.to_string());
+ m_headers.set("Set-Cookie", JsonArray { m_set_cookie_headers }.to_deprecated_string());
on_headers_received(m_headers, m_code > 0 ? m_code : Optional<u32> {});
}
m_state = State::InBody;
diff --git a/Userland/Libraries/LibIDL/IDLParser.cpp b/Userland/Libraries/LibIDL/IDLParser.cpp
index 7a71c01bf2..e54d78861c 100644
--- a/Userland/Libraries/LibIDL/IDLParser.cpp
+++ b/Userland/Libraries/LibIDL/IDLParser.cpp
@@ -218,9 +218,9 @@ NonnullRefPtr<Type> Parser::parse_type()
builder.append(name);
if (is_parameterized_type)
- return adopt_ref(*new ParameterizedType(builder.to_string(), nullable, move(parameters)));
+ return adopt_ref(*new ParameterizedType(builder.to_deprecated_string(), nullable, move(parameters)));
- return adopt_ref(*new Type(builder.to_string(), nullable));
+ return adopt_ref(*new Type(builder.to_deprecated_string(), nullable));
}
void Parser::parse_attribute(HashMap<DeprecatedString, DeprecatedString>& extended_attributes, Interface& interface)
@@ -243,7 +243,7 @@ void Parser::parse_attribute(HashMap<DeprecatedString, DeprecatedString>& extend
assert_specific(';');
- auto name_as_string = name.to_string();
+ auto name_as_string = name.to_deprecated_string();
auto getter_callback_name = DeprecatedString::formatted("{}_getter", name_as_string.to_snakecase());
auto setter_callback_name = DeprecatedString::formatted("{}_setter", name_as_string.to_snakecase());
diff --git a/Userland/Libraries/LibIMAP/Client.cpp b/Userland/Libraries/LibIMAP/Client.cpp
index 6a8371d52b..0ce5a6a4c0 100644
--- a/Userland/Libraries/LibIMAP/Client.cpp
+++ b/Userland/Libraries/LibIMAP/Client.cpp
@@ -378,7 +378,7 @@ RefPtr<Promise<Optional<SolidResponse>>> Client::append(StringView mailbox, Mess
args.append(flags_sb.build());
}
if (date_time.has_value())
- args.append(date_time.value().to_string("\"%d-%b-%Y %H:%M:%S +0000\""sv));
+ args.append(date_time.value().to_deprecated_string("\"%d-%b-%Y %H:%M:%S +0000\""sv));
args.append(DeprecatedString::formatted("{{{}}}", message.data.length()));
diff --git a/Userland/Libraries/LibIMAP/Objects.cpp b/Userland/Libraries/LibIMAP/Objects.cpp
index 01d946b8cd..ed5dc56578 100644
--- a/Userland/Libraries/LibIMAP/Objects.cpp
+++ b/Userland/Libraries/LibIMAP/Objects.cpp
@@ -151,7 +151,7 @@ DeprecatedString SearchKey::serialize() const
[&](New const&) { return DeprecatedString("NEW"); },
[&](Not const& x) { return DeprecatedString::formatted("NOT {}", x.operand->serialize()); },
[&](Old const&) { return DeprecatedString("OLD"); },
- [&](On const& x) { return DeprecatedString::formatted("ON {}", x.date.to_string("%d-%b-%Y"sv)); },
+ [&](On const& x) { return DeprecatedString::formatted("ON {}", x.date.to_deprecated_string("%d-%b-%Y"sv)); },
[&](Or const& x) { return DeprecatedString::formatted("OR {} {}", x.lhs->serialize(), x.rhs->serialize()); },
[&](Recent const&) { return DeprecatedString("RECENT"); },
[&](SearchKeys const& x) {
@@ -167,11 +167,11 @@ DeprecatedString SearchKey::serialize() const
return sb.build();
},
[&](Seen const&) { return DeprecatedString("SEEN"); },
- [&](SentBefore const& x) { return DeprecatedString::formatted("SENTBEFORE {}", x.date.to_string("%d-%b-%Y"sv)); },
- [&](SentOn const& x) { return DeprecatedString::formatted("SENTON {}", x.date.to_string("%d-%b-%Y"sv)); },
- [&](SentSince const& x) { return DeprecatedString::formatted("SENTSINCE {}", x.date.to_string("%d-%b-%Y"sv)); },
+ [&](SentBefore const& x) { return DeprecatedString::formatted("SENTBEFORE {}", x.date.to_deprecated_string("%d-%b-%Y"sv)); },
+ [&](SentOn const& x) { return DeprecatedString::formatted("SENTON {}", x.date.to_deprecated_string("%d-%b-%Y"sv)); },
+ [&](SentSince const& x) { return DeprecatedString::formatted("SENTSINCE {}", x.date.to_deprecated_string("%d-%b-%Y"sv)); },
[&](SequenceSet const& x) { return x.sequence.serialize(); },
- [&](Since const& x) { return DeprecatedString::formatted("SINCE {}", x.date.to_string("%d-%b-%Y"sv)); },
+ [&](Since const& x) { return DeprecatedString::formatted("SINCE {}", x.date.to_deprecated_string("%d-%b-%Y"sv)); },
[&](Smaller const& x) { return DeprecatedString::formatted("SMALLER {}", x.number); },
[&](Subject const& x) { return DeprecatedString::formatted("SUBJECT {}", serialize_astring(x.subject)); },
[&](Text const& x) { return DeprecatedString::formatted("TEXT {}", serialize_astring(x.text)); },
diff --git a/Userland/Libraries/LibIMAP/Parser.cpp b/Userland/Libraries/LibIMAP/Parser.cpp
index 24b5cc91a4..489ab0e233 100644
--- a/Userland/Libraries/LibIMAP/Parser.cpp
+++ b/Userland/Libraries/LibIMAP/Parser.cpp
@@ -130,7 +130,7 @@ void Parser::parse_untagged()
auto number = try_parse_number();
if (number.has_value()) {
consume(" "sv);
- auto data_type = parse_atom().to_string();
+ auto data_type = parse_atom().to_deprecated_string();
if (data_type == "EXISTS"sv) {
m_response.data().set_exists(number.value());
consume("\r\n"sv);
diff --git a/Userland/Libraries/LibIPC/Encoder.cpp b/Userland/Libraries/LibIPC/Encoder.cpp
index 496b87e6e6..1794915cdb 100644
--- a/Userland/Libraries/LibIPC/Encoder.cpp
+++ b/Userland/Libraries/LibIPC/Encoder.cpp
@@ -169,7 +169,7 @@ Encoder& Encoder::operator<<(JsonValue const& value)
Encoder& Encoder::operator<<(URL const& value)
{
- return *this << value.to_string();
+ return *this << value.to_deprecated_string();
}
Encoder& Encoder::operator<<(Dictionary const& dictionary)
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp
index 0edf9e5610..f2aedf9061 100644
--- a/Userland/Libraries/LibJS/AST.cpp
+++ b/Userland/Libraries/LibJS/AST.cpp
@@ -3443,7 +3443,7 @@ Completion ImportCall::execute(Interpreter& interpreter) const
// 4. If supportedAssertions contains key, then
if (supported_assertions.contains_slow(property_key.to_string())) {
// a. Append { [[Key]]: key, [[Value]]: value } to assertions.
- assertions.empend(property_key.to_string(), value.as_string().string());
+ assertions.empend(property_key.to_string(), value.as_string().deprecated_string());
}
}
}
diff --git a/Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp b/Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp
index 81e84da4b1..840ee53b16 100644
--- a/Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp
+++ b/Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp
@@ -53,7 +53,7 @@ void BasicBlock::dump(Bytecode::Executable const& executable) const
if (!m_name.is_empty())
warnln("{}:", m_name);
while (!it.at_end()) {
- warnln("[{:4x}] {}", it.offset(), (*it).to_string(executable));
+ warnln("[{:4x}] {}", it.offset(), (*it).to_deprecated_string(executable));
++it;
}
}
diff --git a/Userland/Libraries/LibJS/Bytecode/CodeGenerationError.h b/Userland/Libraries/LibJS/Bytecode/CodeGenerationError.h
index 5839d03194..3d448fc38c 100644
--- a/Userland/Libraries/LibJS/Bytecode/CodeGenerationError.h
+++ b/Userland/Libraries/LibJS/Bytecode/CodeGenerationError.h
@@ -16,7 +16,7 @@ struct CodeGenerationError {
ASTNode const* failing_node { nullptr };
StringView reason_literal;
- DeprecatedString to_string();
+ DeprecatedString to_deprecated_string();
};
template<typename T>
diff --git a/Userland/Libraries/LibJS/Bytecode/Generator.cpp b/Userland/Libraries/LibJS/Bytecode/Generator.cpp
index 5aa330ed96..132f5fab65 100644
--- a/Userland/Libraries/LibJS/Bytecode/Generator.cpp
+++ b/Userland/Libraries/LibJS/Bytecode/Generator.cpp
@@ -316,7 +316,7 @@ Label Generator::perform_needed_unwinds_for_labelled_continue_and_return_target_
VERIFY_NOT_REACHED();
}
-DeprecatedString CodeGenerationError::to_string()
+DeprecatedString CodeGenerationError::to_deprecated_string()
{
return DeprecatedString::formatted("CodeGenerationError in {}: {}", failing_node ? failing_node->class_name() : "<unknown node>", reason_literal);
}
diff --git a/Userland/Libraries/LibJS/Bytecode/Instruction.h b/Userland/Libraries/LibJS/Bytecode/Instruction.h
index 5ab3d82df1..bf4c624b65 100644
--- a/Userland/Libraries/LibJS/Bytecode/Instruction.h
+++ b/Userland/Libraries/LibJS/Bytecode/Instruction.h
@@ -106,7 +106,7 @@ public:
bool is_terminator() const;
Type type() const { return m_type; }
size_t length() const;
- DeprecatedString to_string(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string(Bytecode::Executable const&) const;
ThrowCompletionOr<void> execute(Bytecode::Interpreter&) const;
void replace_references(BasicBlock const&, BasicBlock const&);
void replace_references(Register, Register);
diff --git a/Userland/Libraries/LibJS/Bytecode/Op.cpp b/Userland/Libraries/LibJS/Bytecode/Op.cpp
index 3498246368..c4d1007b5d 100644
--- a/Userland/Libraries/LibJS/Bytecode/Op.cpp
+++ b/Userland/Libraries/LibJS/Bytecode/Op.cpp
@@ -29,11 +29,11 @@
namespace JS::Bytecode {
-DeprecatedString Instruction::to_string(Bytecode::Executable const& executable) const
+DeprecatedString Instruction::to_deprecated_string(Bytecode::Executable const& executable) const
{
#define __BYTECODE_OP(op) \
case Instruction::Type::op: \
- return static_cast<Bytecode::Op::op const&>(*this).to_string_impl(executable);
+ return static_cast<Bytecode::Op::op const&>(*this).to_deprecated_string_impl(executable);
switch (type()) {
ENUMERATE_BYTECODE_OPS(__BYTECODE_OP)
@@ -136,7 +136,7 @@ static ThrowCompletionOr<Value> typed_equals(VM&, Value src1, Value src2)
interpreter.accumulator() = TRY(op_snake_case(vm, lhs, rhs)); \
return {}; \
} \
- DeprecatedString OpTitleCase::to_string_impl(Bytecode::Executable const&) const \
+ DeprecatedString OpTitleCase::to_deprecated_string_impl(Bytecode::Executable const&) const \
{ \
return DeprecatedString::formatted(#OpTitleCase " {}", m_lhs_reg); \
}
@@ -160,7 +160,7 @@ static ThrowCompletionOr<Value> typeof_(VM& vm, Value value)
interpreter.accumulator() = TRY(op_snake_case(vm, interpreter.accumulator())); \
return {}; \
} \
- DeprecatedString OpTitleCase::to_string_impl(Bytecode::Executable const&) const \
+ DeprecatedString OpTitleCase::to_deprecated_string_impl(Bytecode::Executable const&) const \
{ \
return #OpTitleCase; \
}
@@ -1017,64 +1017,64 @@ ThrowCompletionOr<void> TypeofVariable::execute_impl(Bytecode::Interpreter& inte
return {};
}
-DeprecatedString Load::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString Load::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return DeprecatedString::formatted("Load {}", m_src);
}
-DeprecatedString LoadImmediate::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString LoadImmediate::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return DeprecatedString::formatted("LoadImmediate {}", m_value);
}
-DeprecatedString Store::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString Store::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return DeprecatedString::formatted("Store {}", m_dst);
}
-DeprecatedString NewBigInt::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString NewBigInt::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return DeprecatedString::formatted("NewBigInt \"{}\"", m_bigint.to_base(10));
}
-DeprecatedString NewArray::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString NewArray::to_deprecated_string_impl(Bytecode::Executable const&) const
{
StringBuilder builder;
builder.append("NewArray"sv);
if (m_element_count != 0) {
builder.appendff(" [{}-{}]", m_elements[0], m_elements[1]);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString Append::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString Append::to_deprecated_string_impl(Bytecode::Executable const&) const
{
if (m_is_spread)
return DeprecatedString::formatted("Append lhs: **{}", m_lhs);
return DeprecatedString::formatted("Append lhs: {}", m_lhs);
}
-DeprecatedString IteratorToArray::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString IteratorToArray::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "IteratorToArray";
}
-DeprecatedString NewString::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString NewString::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
return DeprecatedString::formatted("NewString {} (\"{}\")", m_string, executable.string_table->get(m_string));
}
-DeprecatedString NewObject::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString NewObject::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "NewObject";
}
-DeprecatedString NewRegExp::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString NewRegExp::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
return DeprecatedString::formatted("NewRegExp source:{} (\"{}\") flags:{} (\"{}\")", m_source_index, executable.get_string(m_source_index), m_flags_index, executable.get_string(m_flags_index));
}
-DeprecatedString CopyObjectExcludingProperties::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString CopyObjectExcludingProperties::to_deprecated_string_impl(Bytecode::Executable const&) const
{
StringBuilder builder;
builder.appendff("CopyObjectExcludingProperties from:{}", m_from_object);
@@ -1083,25 +1083,25 @@ DeprecatedString CopyObjectExcludingProperties::to_string_impl(Bytecode::Executa
builder.join(", "sv, Span<Register const>(m_excluded_names, m_excluded_names_count));
builder.append(']');
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString ConcatString::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString ConcatString::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return DeprecatedString::formatted("ConcatString {}", m_lhs);
}
-DeprecatedString GetVariable::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString GetVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
return DeprecatedString::formatted("GetVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
}
-DeprecatedString DeleteVariable::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString DeleteVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
return DeprecatedString::formatted("DeleteVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
}
-DeprecatedString CreateEnvironment::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString CreateEnvironment::to_deprecated_string_impl(Bytecode::Executable const&) const
{
auto mode_string = m_mode == EnvironmentMode::Lexical
? "Lexical"
@@ -1109,18 +1109,18 @@ DeprecatedString CreateEnvironment::to_string_impl(Bytecode::Executable const&)
return DeprecatedString::formatted("CreateEnvironment mode:{}", mode_string);
}
-DeprecatedString CreateVariable::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString CreateVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
auto mode_string = m_mode == EnvironmentMode::Lexical ? "Lexical" : "Variable";
return DeprecatedString::formatted("CreateVariable env:{} immutable:{} global:{} {} ({})", mode_string, m_is_immutable, m_is_global, m_identifier, executable.identifier_table->get(m_identifier));
}
-DeprecatedString EnterObjectEnvironment::to_string_impl(Executable const&) const
+DeprecatedString EnterObjectEnvironment::to_deprecated_string_impl(Executable const&) const
{
return DeprecatedString::formatted("EnterObjectEnvironment");
}
-DeprecatedString SetVariable::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString SetVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
auto initialization_mode_name = m_initialization_mode == InitializationMode ::Initialize ? "Initialize"
: m_initialization_mode == InitializationMode::Set ? "Set"
@@ -1129,7 +1129,7 @@ DeprecatedString SetVariable::to_string_impl(Bytecode::Executable const& executa
return DeprecatedString::formatted("SetVariable env:{} init:{} {} ({})", mode_string, initialization_mode_name, m_identifier, executable.identifier_table->get(m_identifier));
}
-DeprecatedString PutById::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString PutById::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
auto kind = m_kind == PropertyKind::Getter
? "getter"
@@ -1140,45 +1140,45 @@ DeprecatedString PutById::to_string_impl(Bytecode::Executable const& executable)
return DeprecatedString::formatted("PutById kind:{} base:{}, property:{} ({})", kind, m_base, m_property, executable.identifier_table->get(m_property));
}
-DeprecatedString GetById::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString GetById::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
return DeprecatedString::formatted("GetById {} ({})", m_property, executable.identifier_table->get(m_property));
}
-DeprecatedString DeleteById::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString DeleteById::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
return DeprecatedString::formatted("DeleteById {} ({})", m_property, executable.identifier_table->get(m_property));
}
-DeprecatedString Jump::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString Jump::to_deprecated_string_impl(Bytecode::Executable const&) const
{
if (m_true_target.has_value())
return DeprecatedString::formatted("Jump {}", *m_true_target);
return DeprecatedString::formatted("Jump <empty>");
}
-DeprecatedString JumpConditional::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString JumpConditional::to_deprecated_string_impl(Bytecode::Executable const&) const
{
auto true_string = m_true_target.has_value() ? DeprecatedString::formatted("{}", *m_true_target) : "<empty>";
auto false_string = m_false_target.has_value() ? DeprecatedString::formatted("{}", *m_false_target) : "<empty>";
return DeprecatedString::formatted("JumpConditional true:{} false:{}", true_string, false_string);
}
-DeprecatedString JumpNullish::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString JumpNullish::to_deprecated_string_impl(Bytecode::Executable const&) const
{
auto true_string = m_true_target.has_value() ? DeprecatedString::formatted("{}", *m_true_target) : "<empty>";
auto false_string = m_false_target.has_value() ? DeprecatedString::formatted("{}", *m_false_target) : "<empty>";
return DeprecatedString::formatted("JumpNullish null:{} nonnull:{}", true_string, false_string);
}
-DeprecatedString JumpUndefined::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString JumpUndefined::to_deprecated_string_impl(Bytecode::Executable const&) const
{
auto true_string = m_true_target.has_value() ? DeprecatedString::formatted("{}", *m_true_target) : "<empty>";
auto false_string = m_false_target.has_value() ? DeprecatedString::formatted("{}", *m_false_target) : "<empty>";
return DeprecatedString::formatted("JumpUndefined undefined:{} not undefined:{}", true_string, false_string);
}
-DeprecatedString Call::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString Call::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
if (m_expression_string.has_value())
return DeprecatedString::formatted("Call callee:{}, this:{}, arguments:[...acc] ({})", m_callee, m_this_value, executable.get_string(m_expression_string.value()));
@@ -1186,55 +1186,55 @@ DeprecatedString Call::to_string_impl(Bytecode::Executable const& executable) co
return DeprecatedString::formatted("Call callee:{}, this:{}, arguments:[...acc]", m_callee, m_this_value);
}
-DeprecatedString SuperCall::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString SuperCall::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "SuperCall arguments:[...acc]"sv;
}
-DeprecatedString NewFunction::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString NewFunction::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "NewFunction";
}
-DeprecatedString NewClass::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString NewClass::to_deprecated_string_impl(Bytecode::Executable const&) const
{
auto name = m_class_expression.name();
return DeprecatedString::formatted("NewClass '{}'", name.is_null() ? ""sv : name);
}
-DeprecatedString Return::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString Return::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "Return";
}
-DeprecatedString Increment::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString Increment::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "Increment";
}
-DeprecatedString Decrement::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString Decrement::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "Decrement";
}
-DeprecatedString Throw::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString Throw::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "Throw";
}
-DeprecatedString EnterUnwindContext::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString EnterUnwindContext::to_deprecated_string_impl(Bytecode::Executable const&) const
{
auto handler_string = m_handler_target.has_value() ? DeprecatedString::formatted("{}", *m_handler_target) : "<empty>";
auto finalizer_string = m_finalizer_target.has_value() ? DeprecatedString::formatted("{}", *m_finalizer_target) : "<empty>";
return DeprecatedString::formatted("EnterUnwindContext handler:{} finalizer:{} entry:{}", handler_string, finalizer_string, m_entry_point);
}
-DeprecatedString FinishUnwind::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString FinishUnwind::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return DeprecatedString::formatted("FinishUnwind next:{}", m_next_target);
}
-DeprecatedString LeaveEnvironment::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString LeaveEnvironment::to_deprecated_string_impl(Bytecode::Executable const&) const
{
auto mode_string = m_mode == EnvironmentMode::Lexical
? "Lexical"
@@ -1242,17 +1242,17 @@ DeprecatedString LeaveEnvironment::to_string_impl(Bytecode::Executable const&) c
return DeprecatedString::formatted("LeaveEnvironment env:{}", mode_string);
}
-DeprecatedString LeaveUnwindContext::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString LeaveUnwindContext::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "LeaveUnwindContext";
}
-DeprecatedString ContinuePendingUnwind::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString ContinuePendingUnwind::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return DeprecatedString::formatted("ContinuePendingUnwind resume:{}", m_resume_target);
}
-DeprecatedString PushDeclarativeEnvironment::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString PushDeclarativeEnvironment::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
StringBuilder builder;
builder.append("PushDeclarativeEnvironment"sv);
@@ -1264,22 +1264,22 @@ DeprecatedString PushDeclarativeEnvironment::to_string_impl(Bytecode::Executable
builder.append('}');
builder.join(", "sv, names);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString Yield::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString Yield::to_deprecated_string_impl(Bytecode::Executable const&) const
{
if (m_continuation_label.has_value())
return DeprecatedString::formatted("Yield continuation:@{}", m_continuation_label->block().name());
return DeprecatedString::formatted("Yield return");
}
-DeprecatedString GetByValue::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString GetByValue::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return DeprecatedString::formatted("GetByValue base:{}", m_base);
}
-DeprecatedString PutByValue::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString PutByValue::to_deprecated_string_impl(Bytecode::Executable const&) const
{
auto kind = m_kind == PropertyKind::Getter
? "getter"
@@ -1290,47 +1290,47 @@ DeprecatedString PutByValue::to_string_impl(Bytecode::Executable const&) const
return DeprecatedString::formatted("PutByValue kind:{} base:{}, property:{}", kind, m_base, m_property);
}
-DeprecatedString DeleteByValue::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString DeleteByValue::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return DeprecatedString::formatted("DeleteByValue base:{}", m_base);
}
-DeprecatedString GetIterator::to_string_impl(Executable const&) const
+DeprecatedString GetIterator::to_deprecated_string_impl(Executable const&) const
{
return "GetIterator";
}
-DeprecatedString GetObjectPropertyIterator::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString GetObjectPropertyIterator::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "GetObjectPropertyIterator";
}
-DeprecatedString IteratorNext::to_string_impl(Executable const&) const
+DeprecatedString IteratorNext::to_deprecated_string_impl(Executable const&) const
{
return "IteratorNext";
}
-DeprecatedString IteratorResultDone::to_string_impl(Executable const&) const
+DeprecatedString IteratorResultDone::to_deprecated_string_impl(Executable const&) const
{
return "IteratorResultDone";
}
-DeprecatedString IteratorResultValue::to_string_impl(Executable const&) const
+DeprecatedString IteratorResultValue::to_deprecated_string_impl(Executable const&) const
{
return "IteratorResultValue";
}
-DeprecatedString ResolveThisBinding::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString ResolveThisBinding::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "ResolveThisBinding"sv;
}
-DeprecatedString GetNewTarget::to_string_impl(Bytecode::Executable const&) const
+DeprecatedString GetNewTarget::to_deprecated_string_impl(Bytecode::Executable const&) const
{
return "GetNewTarget"sv;
}
-DeprecatedString TypeofVariable::to_string_impl(Bytecode::Executable const& executable) const
+DeprecatedString TypeofVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
{
return DeprecatedString::formatted("TypeofVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
}
diff --git a/Userland/Libraries/LibJS/Bytecode/Op.h b/Userland/Libraries/LibJS/Bytecode/Op.h
index bdb6d974a3..0ec5498884 100644
--- a/Userland/Libraries/LibJS/Bytecode/Op.h
+++ b/Userland/Libraries/LibJS/Bytecode/Op.h
@@ -32,7 +32,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register from, Register to)
{
@@ -53,7 +53,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -70,7 +70,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -104,28 +104,28 @@ private:
O(RightShift, right_shift) \
O(UnsignedRightShift, unsigned_right_shift)
-#define JS_DECLARE_COMMON_BINARY_OP(OpTitleCase, op_snake_case) \
- class OpTitleCase final : public Instruction { \
- public: \
- explicit OpTitleCase(Register lhs_reg) \
- : Instruction(Type::OpTitleCase) \
- , m_lhs_reg(lhs_reg) \
- { \
- } \
- \
- ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
- DeprecatedString to_string_impl(Bytecode::Executable const&) const; \
- void replace_references_impl(BasicBlock const&, BasicBlock const&) \
- { \
- } \
- void replace_references_impl(Register from, Register to) \
- { \
- if (m_lhs_reg == from) \
- m_lhs_reg = to; \
- } \
- \
- private: \
- Register m_lhs_reg; \
+#define JS_DECLARE_COMMON_BINARY_OP(OpTitleCase, op_snake_case) \
+ class OpTitleCase final : public Instruction { \
+ public: \
+ explicit OpTitleCase(Register lhs_reg) \
+ : Instruction(Type::OpTitleCase) \
+ , m_lhs_reg(lhs_reg) \
+ { \
+ } \
+ \
+ ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const; \
+ void replace_references_impl(BasicBlock const&, BasicBlock const&) \
+ { \
+ } \
+ void replace_references_impl(Register from, Register to) \
+ { \
+ if (m_lhs_reg == from) \
+ m_lhs_reg = to; \
+ } \
+ \
+ private: \
+ Register m_lhs_reg; \
};
JS_ENUMERATE_COMMON_BINARY_OPS(JS_DECLARE_COMMON_BINARY_OP)
@@ -138,22 +138,22 @@ JS_ENUMERATE_COMMON_BINARY_OPS(JS_DECLARE_COMMON_BINARY_OP)
O(UnaryMinus, unary_minus) \
O(Typeof, typeof_)
-#define JS_DECLARE_COMMON_UNARY_OP(OpTitleCase, op_snake_case) \
- class OpTitleCase final : public Instruction { \
- public: \
- OpTitleCase() \
- : Instruction(Type::OpTitleCase) \
- { \
- } \
- \
- ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
- DeprecatedString to_string_impl(Bytecode::Executable const&) const; \
- void replace_references_impl(BasicBlock const&, BasicBlock const&) \
- { \
- } \
- void replace_references_impl(Register, Register) \
- { \
- } \
+#define JS_DECLARE_COMMON_UNARY_OP(OpTitleCase, op_snake_case) \
+ class OpTitleCase final : public Instruction { \
+ public: \
+ OpTitleCase() \
+ : Instruction(Type::OpTitleCase) \
+ { \
+ } \
+ \
+ ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const; \
+ void replace_references_impl(BasicBlock const&, BasicBlock const&) \
+ { \
+ } \
+ void replace_references_impl(Register, Register) \
+ { \
+ } \
};
JS_ENUMERATE_COMMON_UNARY_OPS(JS_DECLARE_COMMON_UNARY_OP)
@@ -168,7 +168,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -184,7 +184,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -199,7 +199,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -221,7 +221,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register from, Register to);
@@ -242,7 +242,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -268,7 +268,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
// Note: The underlying element range shall never be changed item, by item
// shifting it may be done in the future
@@ -308,7 +308,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
// Note: This should never do anything, the lhs should always be an array, that is currently being constructed
@@ -327,7 +327,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -341,7 +341,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
// Note: lhs should always be a string in construction, so this should never do anything
void replace_references_impl(Register from, Register) { VERIFY(from != m_lhs); }
@@ -364,7 +364,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -380,7 +380,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -397,7 +397,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -424,7 +424,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -445,7 +445,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -466,7 +466,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -485,7 +485,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -512,7 +512,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register from, Register to)
{
@@ -535,7 +535,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -552,7 +552,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register from, Register to)
{
@@ -575,7 +575,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register from, Register to)
{
@@ -598,7 +598,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register from, Register to)
{
@@ -635,7 +635,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&);
void replace_references_impl(Register, Register) { }
@@ -655,7 +655,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
};
class JumpNullish final : public Jump {
@@ -666,7 +666,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
};
class JumpUndefined final : public Jump {
@@ -677,7 +677,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
};
// NOTE: This instruction is variable-width depending on the number of arguments!
@@ -698,7 +698,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register);
@@ -721,7 +721,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -738,7 +738,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -755,7 +755,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -773,7 +773,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -786,7 +786,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -799,7 +799,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -814,7 +814,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -832,7 +832,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&);
void replace_references_impl(Register, Register) { }
@@ -855,7 +855,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -871,7 +871,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -887,7 +887,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&);
void replace_references_impl(Register, Register) { }
@@ -908,7 +908,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&);
void replace_references_impl(Register, Register) { }
@@ -934,7 +934,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&);
void replace_references_impl(Register, Register) { }
@@ -953,7 +953,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
@@ -969,7 +969,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -982,7 +982,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -995,7 +995,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -1008,7 +1008,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -1021,7 +1021,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -1034,7 +1034,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -1047,7 +1047,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
};
@@ -1061,7 +1061,7 @@ public:
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
- DeprecatedString to_string_impl(Bytecode::Executable const&) const;
+ DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
diff --git a/Userland/Libraries/LibJS/Console.cpp b/Userland/Libraries/LibJS/Console.cpp
index 0c4edd9483..5a2fd1ce85 100644
--- a/Userland/Libraries/LibJS/Console.cpp
+++ b/Userland/Libraries/LibJS/Console.cpp
@@ -107,7 +107,7 @@ ThrowCompletionOr<Value> Console::trace()
StringBuilder builder;
auto data = vm_arguments();
auto formatted_data = TRY(m_client->formatter(data));
- trace.label = TRY(value_vector_to_string(formatted_data));
+ trace.label = TRY(value_vector_to_deprecated_string(formatted_data));
}
// 3. Perform Printer("trace", « trace »).
@@ -212,7 +212,7 @@ ThrowCompletionOr<Value> Console::assert_()
// 3. Otherwise:
else {
// 1. Let concat be the concatenation of message, U+003A (:), U+0020 SPACE, and first.
- auto concat = js_string(vm, DeprecatedString::formatted("{}: {}", message->string(), first.to_string(vm).value()));
+ auto concat = js_string(vm, DeprecatedString::formatted("{}: {}", message->deprecated_string(), first.to_string(vm).value()));
// 2. Set data[0] to concat.
data[0] = concat;
}
@@ -235,7 +235,7 @@ ThrowCompletionOr<Value> Console::group()
auto data = vm_arguments();
if (!data.is_empty()) {
auto formatted_data = TRY(m_client->formatter(data));
- group_label = TRY(value_vector_to_string(formatted_data));
+ group_label = TRY(value_vector_to_deprecated_string(formatted_data));
}
// ... Otherwise, let groupLabel be an implementation-chosen label representing a group.
else {
@@ -269,7 +269,7 @@ ThrowCompletionOr<Value> Console::group_collapsed()
auto data = vm_arguments();
if (!data.is_empty()) {
auto formatted_data = TRY(m_client->formatter(data));
- group_label = TRY(value_vector_to_string(formatted_data));
+ group_label = TRY(value_vector_to_deprecated_string(formatted_data));
}
// ... Otherwise, let groupLabel be an implementation-chosen label representing a group.
else {
@@ -457,7 +457,7 @@ void Console::report_exception(JS::Error const& exception, bool in_promise) cons
m_client->report_exception(exception, in_promise);
}
-ThrowCompletionOr<DeprecatedString> Console::value_vector_to_string(MarkedVector<Value> const& values)
+ThrowCompletionOr<DeprecatedString> Console::value_vector_to_deprecated_string(MarkedVector<Value> const& values)
{
auto& vm = realm().vm();
StringBuilder builder;
@@ -466,7 +466,7 @@ ThrowCompletionOr<DeprecatedString> Console::value_vector_to_string(MarkedVector
builder.append(' ');
builder.append(TRY(item.to_string(vm)));
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
ThrowCompletionOr<DeprecatedString> Console::format_time_since(Core::ElapsedTimer timer)
@@ -493,7 +493,7 @@ ThrowCompletionOr<DeprecatedString> Console::format_time_since(Core::ElapsedTime
append(builder, "{:.3} seconds"sv, combined_seconds);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 2.1. Logger(logLevel, args), https://console.spec.whatwg.org/#logger
diff --git a/Userland/Libraries/LibJS/Console.h b/Userland/Libraries/LibJS/Console.h
index 3d4f3f65bf..e8db5059c6 100644
--- a/Userland/Libraries/LibJS/Console.h
+++ b/Userland/Libraries/LibJS/Console.h
@@ -85,7 +85,7 @@ public:
void report_exception(JS::Error const&, bool) const;
private:
- ThrowCompletionOr<DeprecatedString> value_vector_to_string(MarkedVector<Value> const&);
+ ThrowCompletionOr<DeprecatedString> value_vector_to_deprecated_string(MarkedVector<Value> const&);
ThrowCompletionOr<DeprecatedString> format_time_since(Core::ElapsedTimer timer);
Realm& m_realm;
diff --git a/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp b/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp
index 41439b3ec8..3691d034b5 100644
--- a/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp
+++ b/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp
@@ -97,7 +97,7 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::eval_script)
auto& error = script_or_error.error()[0];
// b. Return Completion { [[Type]]: throw, [[Value]]: error, [[Target]]: empty }.
- return vm.throw_completion<SyntaxError>(error.to_string());
+ return vm.throw_completion<SyntaxError>(error.to_deprecated_string());
}
// 5. Let status be ScriptEvaluation(s).
diff --git a/Userland/Libraries/LibJS/Contrib/Test262/IsHTMLDDA.cpp b/Userland/Libraries/LibJS/Contrib/Test262/IsHTMLDDA.cpp
index c7fef16128..115972fbed 100644
--- a/Userland/Libraries/LibJS/Contrib/Test262/IsHTMLDDA.cpp
+++ b/Userland/Libraries/LibJS/Contrib/Test262/IsHTMLDDA.cpp
@@ -20,7 +20,7 @@ ThrowCompletionOr<Value> IsHTMLDDA::call()
auto& vm = this->vm();
if (vm.argument_count() == 0)
return js_null();
- if (vm.argument(0).is_string() && vm.argument(0).as_string().string().is_empty())
+ if (vm.argument(0).is_string() && vm.argument(0).as_string().deprecated_string().is_empty())
return js_null();
// Not sure if this really matters, INTERPRETING.md simply says:
// * IsHTMLDDA - (present only in implementations that can provide it) an object that:
diff --git a/Userland/Libraries/LibJS/MarkupGenerator.cpp b/Userland/Libraries/LibJS/MarkupGenerator.cpp
index 07edc6ff06..38e73e3ea7 100644
--- a/Userland/Libraries/LibJS/MarkupGenerator.cpp
+++ b/Userland/Libraries/LibJS/MarkupGenerator.cpp
@@ -26,21 +26,21 @@ DeprecatedString MarkupGenerator::html_from_source(StringView source)
builder.append(token.trivia());
builder.append(wrap_string_in_style(token.value(), style_type_for_token(token)));
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
DeprecatedString MarkupGenerator::html_from_value(Value value)
{
StringBuilder output_html;
value_to_html(value, output_html);
- return output_html.to_string();
+ return output_html.to_deprecated_string();
}
DeprecatedString MarkupGenerator::html_from_error(Error const& object, bool in_promise)
{
StringBuilder output_html;
error_to_html(object, output_html, in_promise);
- return output_html.to_string();
+ return output_html.to_deprecated_string();
}
void MarkupGenerator::value_to_html(Value value, StringBuilder& output_html, HashTable<Object*> seen_objects)
diff --git a/Userland/Libraries/LibJS/Parser.cpp b/Userland/Libraries/LibJS/Parser.cpp
index 774fedb506..bf5dfd21ea 100644
--- a/Userland/Libraries/LibJS/Parser.cpp
+++ b/Userland/Libraries/LibJS/Parser.cpp
@@ -1556,7 +1556,7 @@ NonnullRefPtr<RegExpLiteral> Parser::parse_regexp_literal()
syntax_error(DeprecatedString::formatted("RegExp compile error: {}", Regex<ECMA262>(parsed_regex, parsed_pattern, parsed_flags).error_string()), rule_start.position());
SourceRange range { m_source_code, rule_start.position(), position() };
- return create_ast_node<RegExpLiteral>(move(range), move(parsed_regex), move(parsed_pattern), move(parsed_flags), pattern.to_string(), move(flags));
+ return create_ast_node<RegExpLiteral>(move(range), move(parsed_regex), move(parsed_pattern), move(parsed_flags), pattern.to_deprecated_string(), move(flags));
}
static bool is_simple_assignment_target(Expression const& expression, bool allow_web_reality_call_expression = true)
@@ -4104,7 +4104,7 @@ ModuleRequest Parser::parse_module_request()
while (!done() && !match(TokenType::CurlyClose)) {
DeprecatedString key;
if (match(TokenType::StringLiteral)) {
- key = parse_string_literal(m_state.current_token)->value().to_string();
+ key = parse_string_literal(m_state.current_token)->value().to_deprecated_string();
consume();
} else if (match_identifier_name()) {
key = consume().value();
@@ -4120,7 +4120,7 @@ ModuleRequest Parser::parse_module_request()
if (entries.key == key)
syntax_error(DeprecatedString::formatted("Duplicate assertion clauses with name: {}", key));
}
- request.add_assertion(move(key), parse_string_literal(m_state.current_token)->value().to_string());
+ request.add_assertion(move(key), parse_string_literal(m_state.current_token)->value().to_deprecated_string());
}
consume(TokenType::StringLiteral);
diff --git a/Userland/Libraries/LibJS/Parser.h b/Userland/Libraries/LibJS/Parser.h
index c4cf00a0c0..7fd192f5e6 100644
--- a/Userland/Libraries/LibJS/Parser.h
+++ b/Userland/Libraries/LibJS/Parser.h
@@ -184,7 +184,7 @@ public:
if (!hint.is_empty())
warnln("{}", hint);
}
- warnln("SyntaxError: {}", error.to_string());
+ warnln("SyntaxError: {}", error.to_deprecated_string());
}
}
diff --git a/Userland/Libraries/LibJS/ParserError.cpp b/Userland/Libraries/LibJS/ParserError.cpp
index d881524519..ae12e82d56 100644
--- a/Userland/Libraries/LibJS/ParserError.cpp
+++ b/Userland/Libraries/LibJS/ParserError.cpp
@@ -12,7 +12,7 @@
namespace JS {
-DeprecatedString ParserError::to_string() const
+DeprecatedString ParserError::to_deprecated_string() const
{
if (!position.has_value())
return message;
diff --git a/Userland/Libraries/LibJS/ParserError.h b/Userland/Libraries/LibJS/ParserError.h
index 5225ce46f9..3f5eefec7c 100644
--- a/Userland/Libraries/LibJS/ParserError.h
+++ b/Userland/Libraries/LibJS/ParserError.h
@@ -17,7 +17,7 @@ struct ParserError {
DeprecatedString message;
Optional<Position> position;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
DeprecatedString source_location_hint(StringView source, char const spacer = ' ', char const indicator = '^') const;
};
diff --git a/Userland/Libraries/LibJS/Print.cpp b/Userland/Libraries/LibJS/Print.cpp
index 85a695f239..d9bd91fc56 100644
--- a/Userland/Libraries/LibJS/Print.cpp
+++ b/Userland/Libraries/LibJS/Print.cpp
@@ -82,7 +82,7 @@ DeprecatedString strip_ansi(StringView format_string)
}
if (i < format_string.length())
builder.append(format_string[i]);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
template<typename... Args>
diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
index d3824857b2..e759ef3c50 100644
--- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
@@ -575,13 +575,13 @@ ThrowCompletionOr<Value> perform_eval(VM& vm, Value x, CallerMode strict_caller,
.in_class_field_initializer = in_class_field_initializer,
};
- Parser parser { Lexer { code_string.string() }, Program::Type::Script, move(initial_state) };
+ Parser parser { Lexer { code_string.deprecated_string() }, Program::Type::Script, move(initial_state) };
auto program = parser.parse_program(strict_caller == CallerMode::Strict);
// b. If script is a List of errors, throw a SyntaxError exception.
if (parser.has_errors()) {
auto& error = parser.errors()[0];
- return vm.throw_completion<SyntaxError>(error.to_string());
+ return vm.throw_completion<SyntaxError>(error.to_deprecated_string());
}
bool strict_eval = false;
@@ -683,7 +683,7 @@ ThrowCompletionOr<Value> perform_eval(VM& vm, Value x, CallerMode strict_caller,
if (auto* bytecode_interpreter = Bytecode::Interpreter::current()) {
auto executable_result = Bytecode::Generator::generate(program);
if (executable_result.is_error())
- return vm.throw_completion<InternalError>(ErrorType::NotImplemented, executable_result.error().to_string());
+ return vm.throw_completion<InternalError>(ErrorType::NotImplemented, executable_result.error().to_deprecated_string());
auto executable = executable_result.release_value();
executable->name = "eval"sv;
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
index d9eb4357d9..cfb05f7fa3 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
@@ -1012,7 +1012,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::join)
builder.append(string);
}
- return js_string(vm, builder.to_string());
+ return js_string(vm, builder.to_deprecated_string());
}
// 23.1.3.19 Array.prototype.keys ( ), https://tc39.es/ecma262/#sec-array.prototype.keys
@@ -1743,7 +1743,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::to_locale_string)
}
// 7. Return R.
- return js_string(vm, builder.to_string());
+ return js_string(vm, builder.to_deprecated_string());
}
// 1.1.1.4 Array.prototype.toReversed ( ), https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toReversed
diff --git a/Userland/Libraries/LibJS/Runtime/BigInt.h b/Userland/Libraries/LibJS/Runtime/BigInt.h
index 73bdf27871..8c58a58df6 100644
--- a/Userland/Libraries/LibJS/Runtime/BigInt.h
+++ b/Userland/Libraries/LibJS/Runtime/BigInt.h
@@ -19,7 +19,7 @@ public:
virtual ~BigInt() override = default;
Crypto::SignedBigInteger const& big_integer() const { return m_big_integer; }
- const DeprecatedString to_string() const { return DeprecatedString::formatted("{}n", m_big_integer.to_base(10)); }
+ const DeprecatedString to_deprecated_string() const { return DeprecatedString::formatted("{}n", m_big_integer.to_base(10)); }
private:
explicit BigInt(Crypto::SignedBigInteger);
diff --git a/Userland/Libraries/LibJS/Runtime/DateConstructor.cpp b/Userland/Libraries/LibJS/Runtime/DateConstructor.cpp
index 7a8ac037a1..5e5a00a991 100644
--- a/Userland/Libraries/LibJS/Runtime/DateConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/DateConstructor.cpp
@@ -239,7 +239,7 @@ ThrowCompletionOr<Object*> DateConstructor::construct(FunctionObject& new_target
if (primitive.is_string()) {
// 1. Assert: The next step never returns an abrupt completion because Type(v) is String.
// 2. Let tv be the result of parsing v as a date, in exactly the same manner as for the parse method (21.4.3.2).
- time_value = parse_date_string(primitive.as_string().string());
+ time_value = parse_date_string(primitive.as_string().deprecated_string());
}
// iii. Else,
else {
diff --git a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp
index c4f9365c01..627454334e 100644
--- a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp
@@ -1258,7 +1258,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::symbol_to_primitive)
auto hint_value = vm.argument(0);
if (!hint_value.is_string())
return vm.throw_completion<TypeError>(ErrorType::InvalidHint, hint_value.to_string_without_side_effects());
- auto& hint = hint_value.as_string().string();
+ auto& hint = hint_value.as_string().deprecated_string();
Value::PreferredType try_first;
if (hint == "string" || hint == "default")
try_first = Value::PreferredType::String;
diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
index 1bccffefc5..becb8b684e 100644
--- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
@@ -810,7 +810,7 @@ Completion ECMAScriptFunctionObject::ordinary_call_evaluate_body()
auto compile = [&](auto& node, auto kind, auto name) -> ThrowCompletionOr<NonnullOwnPtr<Bytecode::Executable>> {
auto executable_result = Bytecode::Generator::generate(node, kind);
if (executable_result.is_error())
- return vm.throw_completion<InternalError>(ErrorType::NotImplemented, executable_result.error().to_string());
+ return vm.throw_completion<InternalError>(ErrorType::NotImplemented, executable_result.error().to_deprecated_string());
auto bytecode_executable = executable_result.release_value();
bytecode_executable->name = name;
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp b/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp
index 5eaaf26763..c3afc3947d 100644
--- a/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp
@@ -176,7 +176,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> FunctionConstructor::create_dynamic
// 17. If parameters is a List of errors, throw a SyntaxError exception.
if (parameters_parser.has_errors()) {
auto error = parameters_parser.errors()[0];
- return vm.throw_completion<SyntaxError>(error.to_string());
+ return vm.throw_completion<SyntaxError>(error.to_deprecated_string());
}
// 18. Let body be ParseText(StringToCodePoints(bodyString), bodySym).
@@ -193,7 +193,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> FunctionConstructor::create_dynamic
// 19. If body is a List of errors, throw a SyntaxError exception.
if (body_parser.has_errors()) {
auto error = body_parser.errors()[0];
- return vm.throw_completion<SyntaxError>(error.to_string());
+ return vm.throw_completion<SyntaxError>(error.to_deprecated_string());
}
// 20. NOTE: The parameters and body are parsed separately to ensure that each is valid alone. For example, new Function("/*", "*/ ) {") is not legal.
@@ -207,7 +207,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> FunctionConstructor::create_dynamic
// 23. If expr is a List of errors, throw a SyntaxError exception.
if (source_parser.has_errors()) {
auto error = source_parser.errors()[0];
- return vm.throw_completion<SyntaxError>(error.to_string());
+ return vm.throw_completion<SyntaxError>(error.to_deprecated_string());
}
// 24. Let proto be ? GetPrototypeFromConstructor(newTarget, fallbackProto).
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp
index c70fed0ef5..c418d1215c 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp
@@ -306,7 +306,7 @@ static MatcherResult lookup_matcher(Vector<DeprecatedString> const& requested_lo
// a. Let noExtensionsLocale be the String value that is locale with any Unicode locale extension sequences removed.
auto extensions = locale_id->remove_extension_type<::Locale::LocaleExtension>();
- auto no_extensions_locale = locale_id->to_string();
+ auto no_extensions_locale = locale_id->to_deprecated_string();
// b. Let availableLocale be ! BestAvailableLocale(availableLocales, noExtensionsLocale).
auto available_locale = best_available_locale(no_extensions_locale);
@@ -383,7 +383,7 @@ LocaleResult resolve_locale(Vector<DeprecatedString> const& requested_locales, L
MatcherResult matcher_result;
// 2. If matcher is "lookup", then
- if (matcher.is_string() && (matcher.as_string().string() == "lookup"sv)) {
+ if (matcher.is_string() && (matcher.as_string().deprecated_string() == "lookup"sv)) {
// a. Let r be ! LookupMatcher(availableLocales, requestedLocales).
matcher_result = lookup_matcher(requested_locales);
}
@@ -538,7 +538,7 @@ Vector<DeprecatedString> lookup_supported_locales(Vector<DeprecatedString> const
// a. Let noExtensionsLocale be the String value that is locale with any Unicode locale extension sequences removed.
locale_id->remove_extension_type<::Locale::LocaleExtension>();
- auto no_extensions_locale = locale_id->to_string();
+ auto no_extensions_locale = locale_id->to_deprecated_string();
// b. Let availableLocale be ! BestAvailableLocale(availableLocales, noExtensionsLocale).
auto available_locale = best_available_locale(no_extensions_locale);
@@ -578,7 +578,7 @@ ThrowCompletionOr<Array*> supported_locales(VM& vm, Vector<DeprecatedString> con
Vector<DeprecatedString> supported_locales;
// 3. If matcher is "best fit", then
- if (matcher.as_string().string() == "best fit"sv) {
+ if (matcher.as_string().deprecated_string() == "best fit"sv) {
// a. Let supportedLocales be BestFitSupportedLocales(availableLocales, requestedLocales).
supported_locales = best_fit_supported_locales(requested_locales);
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp
index 93baa46ba1..9240f0e8fa 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp
@@ -27,7 +27,7 @@ static ThrowCompletionOr<Collator*> initialize_collator(VM& vm, Collator& collat
auto usage = TRY(get_option(vm, *options, vm.names.usage, OptionType::String, { "sort"sv, "search"sv }, "sort"sv));
// 4. Set collator.[[Usage]] to usage.
- collator.set_usage(usage.as_string().string());
+ collator.set_usage(usage.as_string().deprecated_string());
// 5. If usage is "sort", then
// a. Let localeData be %Collator%.[[SortLocaleData]].
@@ -49,11 +49,11 @@ static ThrowCompletionOr<Collator*> initialize_collator(VM& vm, Collator& collat
// 11. If collation is not undefined, then
if (!collation.is_undefined()) {
// a. If collation does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
- if (!::Locale::is_type_identifier(collation.as_string().string()))
+ if (!::Locale::is_type_identifier(collation.as_string().deprecated_string()))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, collation, "collation"sv);
// 12. Set opt.[[co]] to collation.
- opt.co = collation.as_string().string();
+ opt.co = collation.as_string().deprecated_string();
}
// 13. Let numeric be ? GetOption(options, "numeric", "boolean", undefined, undefined).
@@ -69,7 +69,7 @@ static ThrowCompletionOr<Collator*> initialize_collator(VM& vm, Collator& collat
// 17. Set opt.[[kf]] to caseFirst.
auto case_first = TRY(get_option(vm, *options, vm.names.caseFirst, OptionType::String, { "upper"sv, "lower"sv, "false"sv }, Empty {}));
if (!case_first.is_undefined())
- opt.kf = case_first.as_string().string();
+ opt.kf = case_first.as_string().deprecated_string();
// 18. Let relevantExtensionKeys be %Collator%.[[RelevantExtensionKeys]].
auto relevant_extension_keys = Collator::relevant_extension_keys();
@@ -117,7 +117,7 @@ static ThrowCompletionOr<Collator*> initialize_collator(VM& vm, Collator& collat
}
// 28. Set collator.[[Sensitivity]] to sensitivity.
- collator.set_sensitivity(sensitivity.as_string().string());
+ collator.set_sensitivity(sensitivity.as_string().deprecated_string());
// 29. Let ignorePunctuation be ? GetOption(options, "ignorePunctuation", "boolean", undefined, false).
auto ignore_punctuation = TRY(get_option(vm, *options, vm.names.ignorePunctuation, OptionType::Boolean, {}, false));
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp
index 63e6ed52de..5e85043ac8 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp
@@ -106,11 +106,11 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF
// 7. If calendar is not undefined, then
if (!calendar.is_undefined()) {
// a. If calendar does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
- if (!::Locale::is_type_identifier(calendar.as_string().string()))
+ if (!::Locale::is_type_identifier(calendar.as_string().deprecated_string()))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, calendar, "calendar"sv);
// 8. Set opt.[[ca]] to calendar.
- opt.ca = calendar.as_string().string();
+ opt.ca = calendar.as_string().deprecated_string();
}
// 9. Let numberingSystem be ? GetOption(options, "numberingSystem", "string", undefined, undefined).
@@ -119,11 +119,11 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF
// 10. If numberingSystem is not undefined, then
if (!numbering_system.is_undefined()) {
// a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
- if (!::Locale::is_type_identifier(numbering_system.as_string().string()))
+ if (!::Locale::is_type_identifier(numbering_system.as_string().deprecated_string()))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, numbering_system, "numberingSystem"sv);
// 11. Set opt.[[nu]] to numberingSystem.
- opt.nu = numbering_system.as_string().string();
+ opt.nu = numbering_system.as_string().deprecated_string();
}
// 12. Let hour12 be ? GetOption(options, "hour12", "boolean", undefined, undefined).
@@ -140,7 +140,7 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF
// 15. Set opt.[[hc]] to hourCycle.
if (!hour_cycle.is_nullish())
- opt.hc = hour_cycle.as_string().string();
+ opt.hc = hour_cycle.as_string().deprecated_string();
// 16. Let localeData be %DateTimeFormat%.[[LocaleData]].
// 17. Let r be ResolveLocale(%DateTimeFormat%.[[AvailableLocales]], requestedLocales, opt, %DateTimeFormat%.[[RelevantExtensionKeys]], localeData).
@@ -275,7 +275,7 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF
// d. Set formatOptions.[[<prop>]] to value.
if (!value.is_undefined()) {
- option = ::Locale::calendar_pattern_style_from_string(value.as_string().string());
+ option = ::Locale::calendar_pattern_style_from_string(value.as_string().deprecated_string());
// e. If value is not undefined, then
// i. Set hasExplicitFormatComponents to true.
@@ -294,14 +294,14 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF
// 39. Set dateTimeFormat.[[DateStyle]] to dateStyle.
if (!date_style.is_undefined())
- date_time_format.set_date_style(date_style.as_string().string());
+ date_time_format.set_date_style(date_style.as_string().deprecated_string());
// 40. Let timeStyle be ? GetOption(options, "timeStyle", "string", « "full", "long", "medium", "short" », undefined).
auto time_style = TRY(get_option(vm, *options, vm.names.timeStyle, OptionType::String, AK::Array { "full"sv, "long"sv, "medium"sv, "short"sv }, Empty {}));
// 41. Set dateTimeFormat.[[TimeStyle]] to timeStyle.
if (!time_style.is_undefined())
- date_time_format.set_time_style(time_style.as_string().string());
+ date_time_format.set_time_style(time_style.as_string().deprecated_string());
Optional<::Locale::CalendarPattern> best_format {};
@@ -323,7 +323,7 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF
auto formats = ::Locale::get_calendar_available_formats(data_locale, date_time_format.calendar());
// b. If matcher is "basic", then
- if (matcher.as_string().string() == "basic"sv) {
+ if (matcher.as_string().deprecated_string() == "basic"sv) {
// i. Let bestFormat be BasicFormatMatcher(formatOptions, formats).
best_format = basic_format_matcher(format_options, move(formats));
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp
index 167dcdb9fe..89c9b950b2 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp
@@ -82,7 +82,7 @@ ThrowCompletionOr<Object*> DisplayNamesConstructor::construct(FunctionObject& ne
auto style = TRY(get_option(vm, *options, vm.names.style, OptionType::String, { "narrow"sv, "short"sv, "long"sv }, "long"sv));
// 12. Set displayNames.[[Style]] to style.
- display_names->set_style(style.as_string().string());
+ display_names->set_style(style.as_string().deprecated_string());
// 13. Let type be ? GetOption(options, "type", "string", « "language", "region", "script", "currency", "calendar", "dateTimeField" », undefined).
auto type = TRY(get_option(vm, *options, vm.names.type, OptionType::String, { "language"sv, "region"sv, "script"sv, "currency"sv, "calendar"sv, "dateTimeField"sv }, Empty {}));
@@ -92,13 +92,13 @@ ThrowCompletionOr<Object*> DisplayNamesConstructor::construct(FunctionObject& ne
return vm.throw_completion<TypeError>(ErrorType::IsUndefined, "options.type"sv);
// 15. Set displayNames.[[Type]] to type.
- display_names->set_type(type.as_string().string());
+ display_names->set_type(type.as_string().deprecated_string());
// 16. Let fallback be ? GetOption(options, "fallback", "string", « "code", "none" », "code").
auto fallback = TRY(get_option(vm, *options, vm.names.fallback, OptionType::String, { "code"sv, "none"sv }, "code"sv));
// 17. Set displayNames.[[Fallback]] to fallback.
- display_names->set_fallback(fallback.as_string().string());
+ display_names->set_fallback(fallback.as_string().deprecated_string());
// 18. Set displayNames.[[Locale]] to r.[[locale]].
display_names->set_locale(move(result.locale));
@@ -119,7 +119,7 @@ ThrowCompletionOr<Object*> DisplayNamesConstructor::construct(FunctionObject& ne
// 26. If type is "language", then
if (display_names->type() == DisplayNames::Type::Language) {
// a. Set displayNames.[[LanguageDisplay]] to languageDisplay.
- display_names->set_language_display(language_display.as_string().string());
+ display_names->set_language_display(language_display.as_string().deprecated_string());
// b. Let typeFields be typeFields.[[<languageDisplay>]].
// c. Assert: typeFields is a Record (see 12.4.3).
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp
index d88c6d3336..a0fd0bf7af 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp
@@ -47,7 +47,7 @@ JS_DEFINE_NATIVE_FUNCTION(DisplayNamesPrototype::of)
code = js_string(vm, move(code_string));
// 4. Let code be ? CanonicalCodeForDisplayNames(displayNames.[[Type]], code).
- code = TRY(canonical_code_for_display_names(vm, display_names->type(), code.as_string().string()));
+ code = TRY(canonical_code_for_display_names(vm, display_names->type(), code.as_string().deprecated_string()));
// 5. Let fields be displayNames.[[Fields]].
// 6. If fields has a field [[<code>]], return fields.[[<code>]].
@@ -57,48 +57,48 @@ JS_DEFINE_NATIVE_FUNCTION(DisplayNamesPrototype::of)
switch (display_names->type()) {
case DisplayNames::Type::Language:
if (display_names->language_display() == DisplayNames::LanguageDisplay::Dialect) {
- result = ::Locale::get_locale_language_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_language_mapping(display_names->locale(), code.as_string().deprecated_string());
if (result.has_value())
break;
}
- if (auto locale = is_structurally_valid_language_tag(code.as_string().string()); locale.has_value())
+ if (auto locale = is_structurally_valid_language_tag(code.as_string().deprecated_string()); locale.has_value())
formatted_result = ::Locale::format_locale_for_display(display_names->locale(), locale.release_value());
break;
case DisplayNames::Type::Region:
- result = ::Locale::get_locale_territory_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_territory_mapping(display_names->locale(), code.as_string().deprecated_string());
break;
case DisplayNames::Type::Script:
- result = ::Locale::get_locale_script_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_script_mapping(display_names->locale(), code.as_string().deprecated_string());
break;
case DisplayNames::Type::Currency:
switch (display_names->style()) {
case ::Locale::Style::Long:
- result = ::Locale::get_locale_long_currency_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_long_currency_mapping(display_names->locale(), code.as_string().deprecated_string());
break;
case ::Locale::Style::Short:
- result = ::Locale::get_locale_short_currency_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_short_currency_mapping(display_names->locale(), code.as_string().deprecated_string());
break;
case ::Locale::Style::Narrow:
- result = ::Locale::get_locale_narrow_currency_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_narrow_currency_mapping(display_names->locale(), code.as_string().deprecated_string());
break;
default:
VERIFY_NOT_REACHED();
}
break;
case DisplayNames::Type::Calendar:
- result = ::Locale::get_locale_calendar_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_calendar_mapping(display_names->locale(), code.as_string().deprecated_string());
break;
case DisplayNames::Type::DateTimeField:
switch (display_names->style()) {
case ::Locale::Style::Long:
- result = ::Locale::get_locale_long_date_field_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_long_date_field_mapping(display_names->locale(), code.as_string().deprecated_string());
break;
case ::Locale::Style::Short:
- result = ::Locale::get_locale_short_date_field_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_short_date_field_mapping(display_names->locale(), code.as_string().deprecated_string());
break;
case ::Locale::Style::Narrow:
- result = ::Locale::get_locale_narrow_date_field_mapping(display_names->locale(), code.as_string().string());
+ result = ::Locale::get_locale_narrow_date_field_mapping(display_names->locale(), code.as_string().deprecated_string());
break;
default:
VERIFY_NOT_REACHED();
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp
index 7c6f32337e..ce8b24b665 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp
@@ -272,7 +272,7 @@ ThrowCompletionOr<DurationUnitOptions> get_duration_unit_options(VM& vm, Depreca
}
}
} else {
- style = style_value.as_string().string();
+ style = style_value.as_string().deprecated_string();
}
// 4. Let displayField be the string-concatenation of unit and "Display".
@@ -296,7 +296,7 @@ ThrowCompletionOr<DurationUnitOptions> get_duration_unit_options(VM& vm, Depreca
}
// 7. Return the Record { [[Style]]: style, [[Display]]: display }.
- return DurationUnitOptions { .style = move(style), .display = display.as_string().string() };
+ return DurationUnitOptions { .style = move(style), .display = display.as_string().deprecated_string() };
}
// 1.1.7 PartitionDurationFormatPattern ( durationFormat, duration ), https://tc39.es/proposal-intl-duration-format/#sec-partitiondurationformatpattern
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DurationFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DurationFormatConstructor.cpp
index 02459a4c6f..d86535bf5a 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DurationFormatConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DurationFormatConstructor.cpp
@@ -67,14 +67,14 @@ ThrowCompletionOr<Object*> DurationFormatConstructor::construct(FunctionObject&
// 7. If numberingSystem is not undefined, then
if (!numbering_system.is_undefined()) {
// a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
- if (!::Locale::is_type_identifier(numbering_system.as_string().string()))
+ if (!::Locale::is_type_identifier(numbering_system.as_string().deprecated_string()))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, numbering_system, "numberingSystem"sv);
}
// 8. Let opt be the Record { [[localeMatcher]]: matcher, [[nu]]: numberingSystem }.
LocaleOptions opt {};
opt.locale_matcher = matcher;
- opt.nu = numbering_system.is_undefined() ? Optional<DeprecatedString>() : numbering_system.as_string().string();
+ opt.nu = numbering_system.is_undefined() ? Optional<DeprecatedString>() : numbering_system.as_string().deprecated_string();
// 9. Let r be ResolveLocale(%DurationFormat%.[[AvailableLocales]], requestedLocales, opt, %DurationFormat%.[[RelevantExtensionKeys]], %DurationFormat%.[[LocaleData]]).
auto result = resolve_locale(requested_locales, opt, DurationFormat::relevant_extension_keys());
@@ -93,7 +93,7 @@ ThrowCompletionOr<Object*> DurationFormatConstructor::construct(FunctionObject&
auto style = TRY(get_option(vm, *options, vm.names.style, OptionType::String, { "long"sv, "short"sv, "narrow"sv, "digital"sv }, "short"sv));
// 14. Set durationFormat.[[Style]] to style.
- duration_format->set_style(style.as_string().string());
+ duration_format->set_style(style.as_string().deprecated_string());
// 15. Set durationFormat.[[DataLocale]] to r.[[dataLocale]].
duration_format->set_data_locale(move(result.data_locale));
@@ -119,7 +119,7 @@ ThrowCompletionOr<Object*> DurationFormatConstructor::construct(FunctionObject&
auto digital_base = duration_instances_component.digital_default;
// f. Let unitOptions be ? GetDurationUnitOptions(unit, options, style, valueList, digitalBase, prevStyle).
- auto unit_options = TRY(get_duration_unit_options(vm, unit, *options, style.as_string().string(), value_list, digital_base, previous_style));
+ auto unit_options = TRY(get_duration_unit_options(vm, unit, *options, style.as_string().deprecated_string(), value_list, digital_base, previous_style));
// g. Set the value of the styleSlot slot of durationFormat to unitOptions.[[Style]].
(duration_format->*style_slot)(unit_options.style);
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.cpp
index bad9f2e087..fed856a494 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.cpp
@@ -274,7 +274,7 @@ ThrowCompletionOr<Vector<DeprecatedString>> string_list_from_iterable(VM& vm, Va
}
// iii. Append nextValue to the end of the List list.
- list.append(next_value.as_string().string());
+ list.append(next_value.as_string().deprecated_string());
}
} while (next != nullptr);
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp
index 0e6246d054..9214693169 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp
@@ -80,13 +80,13 @@ ThrowCompletionOr<Object*> ListFormatConstructor::construct(FunctionObject& new_
auto type = TRY(get_option(vm, *options, vm.names.type, OptionType::String, { "conjunction"sv, "disjunction"sv, "unit"sv }, "conjunction"sv));
// 12. Set listFormat.[[Type]] to type.
- list_format->set_type(type.as_string().string());
+ list_format->set_type(type.as_string().deprecated_string());
// 13. Let style be ? GetOption(options, "style", "string", « "long", "short", "narrow" », "long").
auto style = TRY(get_option(vm, *options, vm.names.style, OptionType::String, { "long"sv, "short"sv, "narrow"sv }, "long"sv));
// 14. Set listFormat.[[Style]] to style.
- list_format->set_style(style.as_string().string());
+ list_format->set_style(style.as_string().deprecated_string());
// Note: The remaining steps are skipped in favor of deferring to LibUnicode.
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp
index a685623fcb..a63486c79b 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp
@@ -28,7 +28,7 @@ Locale::Locale(Object& prototype)
Locale::Locale(::Locale::LocaleID const& locale_id, Object& prototype)
: Object(prototype)
{
- set_locale(locale_id.to_string());
+ set_locale(locale_id.to_deprecated_string());
for (auto const& extension : locale_id.extensions) {
if (!extension.has<::Locale::LocaleExtension>())
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp
index 9b07636973..d86b9e4d23 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp
@@ -33,10 +33,10 @@ static ThrowCompletionOr<Optional<DeprecatedString>> get_string_option(VM& vm, O
if (option.is_undefined())
return Optional<DeprecatedString> {};
- if (validator && !validator(option.as_string().string()))
+ if (validator && !validator(option.as_string().deprecated_string()))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, option, property);
- return option.as_string().string();
+ return option.as_string().deprecated_string();
}
// 14.1.2 ApplyOptionsToTag ( tag, options ), https://tc39.es/ecma402/#sec-apply-options-to-tag
@@ -198,7 +198,7 @@ static LocaleAndKeys apply_unicode_extension_to_tag(StringView tag, LocaleAndKey
// 7. Let locale be the String value that is tag with any Unicode locale extension sequences removed.
locale_id->remove_extension_type<::Locale::LocaleExtension>();
- auto locale = locale_id->to_string();
+ auto locale = locale_id->to_deprecated_string();
// 8. Let newExtension be a Unicode BCP 47 U Extension based on attributes and keywords.
::Locale::LocaleExtension new_extension { move(attributes), move(keywords) };
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp
index 9e57070227..b9d217e6b9 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp
@@ -115,7 +115,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::base_name)
VERIFY(locale.has_value());
// 4. Return the substring of locale corresponding to the unicode_language_id production.
- return js_string(vm, locale->language_id.to_string());
+ return js_string(vm, locale->language_id.to_deprecated_string());
}
#define JS_ENUMERATE_LOCALE_KEYWORD_PROPERTIES \
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.cpp b/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.cpp
index ab254b1c0e..8cfc51906c 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.cpp
@@ -293,7 +293,7 @@ bool MathematicalValue::is_zero() const
[](auto) { return false; });
}
-DeprecatedString MathematicalValue::to_string() const
+DeprecatedString MathematicalValue::to_deprecated_string() const
{
return m_value.visit(
[](double value) { return number_to_string(value, NumberToStringMode::WithoutExponent); },
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.h b/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.h
index 25436c290f..bbef224db4 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.h
@@ -87,7 +87,7 @@ public:
bool is_positive() const;
bool is_zero() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Value to_value(VM&) const;
private:
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp
index e66e20525a..786cfe8508 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp
@@ -960,7 +960,7 @@ static DeprecatedString cut_trailing_zeroes(StringView string, int cut)
string = string.substring_view(0, string.length() - 1);
}
- return string.to_string();
+ return string.to_deprecated_string();
}
enum class PreferredResult {
@@ -996,7 +996,7 @@ static auto to_raw_precision_function(MathematicalValue const& number, int preci
result.number = number.divided_by_power(result.exponent - precision);
// FIXME: Can we do this without string conversion?
- auto digits = result.number.to_string();
+ auto digits = result.number.to_deprecated_string();
auto digit = digits.substring_view(digits.length() - 1);
result.number = result.number.divided_by(10);
@@ -1067,7 +1067,7 @@ RawFormatResult to_raw_precision(MathematicalValue const& number, int min_precis
}
// f. Let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes).
- result.formatted_string = n.to_string();
+ result.formatted_string = n.to_deprecated_string();
}
// 4. If e ≥ p–1, then
@@ -1144,7 +1144,7 @@ static auto to_raw_fixed_function(MathematicalValue const& number, int fraction,
result.number = number.multiplied_by_power(fraction - 1);
// FIXME: Can we do this without string conversion?
- auto digits = result.number.to_string();
+ auto digits = result.number.to_deprecated_string();
auto digit = digits.substring_view(digits.length() - 1);
result.number = result.number.multiplied_by(10);
@@ -1206,7 +1206,7 @@ RawFormatResult to_raw_fixed(MathematicalValue const& number, int min_fraction,
}
// 7. If n = 0, let m be "0". Otherwise, let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes).
- result.formatted_string = n.is_zero() ? DeprecatedString("0"sv) : n.to_string();
+ result.formatted_string = n.is_zero() ? DeprecatedString("0"sv) : n.to_deprecated_string();
// 8. If f ≠ 0, then
if (fraction != 0) {
@@ -1592,7 +1592,7 @@ ThrowCompletionOr<MathematicalValue> to_intl_mathematical_value(VM& vm, Value va
// 3. If Type(primValue) is String,
// a. Let str be primValue.
- auto const& string = primitive_value.as_string().string();
+ auto const& string = primitive_value.as_string().deprecated_string();
// Step 4 handled separately by the FIXME above.
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp
index d791c4d140..269c6763ba 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp
@@ -103,11 +103,11 @@ ThrowCompletionOr<NumberFormat*> initialize_number_format(VM& vm, NumberFormat&
// 7. If numberingSystem is not undefined, then
if (!numbering_system.is_undefined()) {
// a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
- if (!::Locale::is_type_identifier(numbering_system.as_string().string()))
+ if (!::Locale::is_type_identifier(numbering_system.as_string().deprecated_string()))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, numbering_system, "numberingSystem"sv);
// 8. Set opt.[[nu]] to numberingSystem.
- opt.nu = numbering_system.as_string().string();
+ opt.nu = numbering_system.as_string().deprecated_string();
}
// 9. Let localeData be %NumberFormat%.[[LocaleData]].
@@ -176,7 +176,7 @@ ThrowCompletionOr<NumberFormat*> initialize_number_format(VM& vm, NumberFormat&
auto notation = TRY(get_option(vm, *options, vm.names.notation, OptionType::String, { "standard"sv, "scientific"sv, "engineering"sv, "compact"sv }, "standard"sv));
// 22. Set numberFormat.[[Notation]] to notation.
- number_format.set_notation(notation.as_string().string());
+ number_format.set_notation(notation.as_string().deprecated_string());
// 23. Perform ? SetNumberFormatDigitOptions(numberFormat, options, mnfdDefault, mxfdDefault, notation).
TRY(set_number_format_digit_options(vm, number_format, *options, default_min_fraction_digits, default_max_fraction_digits, number_format.notation()));
@@ -199,7 +199,7 @@ ThrowCompletionOr<NumberFormat*> initialize_number_format(VM& vm, NumberFormat&
auto trailing_zero_display = TRY(get_option(vm, *options, vm.names.trailingZeroDisplay, OptionType::String, { "auto"sv, "stripIfInteger"sv }, "auto"sv));
// 27. Set numberFormat.[[TrailingZeroDisplay]] to trailingZeroDisplay.
- number_format.set_trailing_zero_display(trailing_zero_display.as_string().string());
+ number_format.set_trailing_zero_display(trailing_zero_display.as_string().deprecated_string());
// 28. Let compactDisplay be ? GetOption(options, "compactDisplay", "string", « "short", "long" », "short").
auto compact_display = TRY(get_option(vm, *options, vm.names.compactDisplay, OptionType::String, { "short"sv, "long"sv }, "short"sv));
@@ -210,7 +210,7 @@ ThrowCompletionOr<NumberFormat*> initialize_number_format(VM& vm, NumberFormat&
// 30. If notation is "compact", then
if (number_format.notation() == NumberFormat::Notation::Compact) {
// a. Set numberFormat.[[CompactDisplay]] to compactDisplay.
- number_format.set_compact_display(compact_display.as_string().string());
+ number_format.set_compact_display(compact_display.as_string().deprecated_string());
// b. Set defaultUseGrouping to "min2".
default_use_grouping = "min2"sv;
@@ -226,13 +226,13 @@ ThrowCompletionOr<NumberFormat*> initialize_number_format(VM& vm, NumberFormat&
auto sign_display = TRY(get_option(vm, *options, vm.names.signDisplay, OptionType::String, { "auto"sv, "never"sv, "always"sv, "exceptZero"sv, "negative"sv }, "auto"sv));
// 34. Set numberFormat.[[SignDisplay]] to signDisplay.
- number_format.set_sign_display(sign_display.as_string().string());
+ number_format.set_sign_display(sign_display.as_string().deprecated_string());
// 35. Let roundingMode be ? GetOption(options, "roundingMode", "string", « "ceil", "floor", "expand", "trunc", "halfCeil", "halfFloor", "halfExpand", "halfTrunc", "halfEven" », "halfExpand").
auto rounding_mode = TRY(get_option(vm, *options, vm.names.roundingMode, OptionType::String, { "ceil"sv, "floor"sv, "expand"sv, "trunc"sv, "halfCeil"sv, "halfFloor"sv, "halfExpand"sv, "halfTrunc"sv, "halfEven"sv }, "halfExpand"sv));
// 36. Set numberFormat.[[RoundingMode]] to roundingMode.
- number_format.set_rounding_mode(rounding_mode.as_string().string());
+ number_format.set_rounding_mode(rounding_mode.as_string().deprecated_string());
// 37. Return numberFormat.
return &number_format;
@@ -282,7 +282,7 @@ ThrowCompletionOr<void> set_number_format_digit_options(VM& vm, NumberFormatBase
bool need_fraction_digits = true;
// 14. If roundingPriority is "auto", then
- if (rounding_priority.as_string().string() == "auto"sv) {
+ if (rounding_priority.as_string().deprecated_string() == "auto"sv) {
// a. Set needSd to hasSd.
need_significant_digits = has_significant_digits;
@@ -358,12 +358,12 @@ ThrowCompletionOr<void> set_number_format_digit_options(VM& vm, NumberFormatBase
// 17. If needSd is true or needFd is true, then
if (need_significant_digits || need_fraction_digits) {
// a. If roundingPriority is "morePrecision", then
- if (rounding_priority.as_string().string() == "morePrecision"sv) {
+ if (rounding_priority.as_string().deprecated_string() == "morePrecision"sv) {
// i. Set intlObj.[[RoundingType]] to morePrecision.
intl_object.set_rounding_type(NumberFormatBase::RoundingType::MorePrecision);
}
// b. Else if roundingPriority is "lessPrecision", then
- else if (rounding_priority.as_string().string() == "lessPrecision"sv) {
+ else if (rounding_priority.as_string().deprecated_string() == "lessPrecision"sv) {
// i. Set intlObj.[[RoundingType]] to lessPrecision.
intl_object.set_rounding_type(NumberFormatBase::RoundingType::LessPrecision);
}
@@ -410,7 +410,7 @@ ThrowCompletionOr<void> set_number_format_unit_options(VM& vm, NumberFormat& int
auto style = TRY(get_option(vm, options, vm.names.style, OptionType::String, { "decimal"sv, "percent"sv, "currency"sv, "unit"sv }, "decimal"sv));
// 4. Set intlObj.[[Style]] to style.
- intl_object.set_style(style.as_string().string());
+ intl_object.set_style(style.as_string().deprecated_string());
// 5. Let currency be ? GetOption(options, "currency", "string", undefined, undefined).
auto currency = TRY(get_option(vm, options, vm.names.currency, OptionType::String, {}, Empty {}));
@@ -423,7 +423,7 @@ ThrowCompletionOr<void> set_number_format_unit_options(VM& vm, NumberFormat& int
}
// 7. Else,
// a. If ! IsWellFormedCurrencyCode(currency) is false, throw a RangeError exception.
- else if (!is_well_formed_currency_code(currency.as_string().string()))
+ else if (!is_well_formed_currency_code(currency.as_string().deprecated_string()))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, currency, "currency"sv);
// 8. Let currencyDisplay be ? GetOption(options, "currencyDisplay", "string", « "code", "symbol", "narrowSymbol", "name" », "symbol").
@@ -443,7 +443,7 @@ ThrowCompletionOr<void> set_number_format_unit_options(VM& vm, NumberFormat& int
}
// 12. Else,
// a. If ! IsWellFormedUnitIdentifier(unit) is false, throw a RangeError exception.
- else if (!is_well_formed_unit_identifier(unit.as_string().string()))
+ else if (!is_well_formed_unit_identifier(unit.as_string().deprecated_string()))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, unit, "unit"sv);
// 13. Let unitDisplay be ? GetOption(options, "unitDisplay", "string", « "short", "narrow", "long" », "short").
@@ -452,22 +452,22 @@ ThrowCompletionOr<void> set_number_format_unit_options(VM& vm, NumberFormat& int
// 14. If style is "currency", then
if (intl_object.style() == NumberFormat::Style::Currency) {
// a. Set intlObj.[[Currency]] to the ASCII-uppercase of currency.
- intl_object.set_currency(currency.as_string().string().to_uppercase());
+ intl_object.set_currency(currency.as_string().deprecated_string().to_uppercase());
// c. Set intlObj.[[CurrencyDisplay]] to currencyDisplay.
- intl_object.set_currency_display(currency_display.as_string().string());
+ intl_object.set_currency_display(currency_display.as_string().deprecated_string());
// d. Set intlObj.[[CurrencySign]] to currencySign.
- intl_object.set_currency_sign(currency_sign.as_string().string());
+ intl_object.set_currency_sign(currency_sign.as_string().deprecated_string());
}
// 15. If style is "unit", then
if (intl_object.style() == NumberFormat::Style::Unit) {
// a. Set intlObj.[[Unit]] to unit.
- intl_object.set_unit(unit.as_string().string());
+ intl_object.set_unit(unit.as_string().deprecated_string());
// b. Set intlObj.[[UnitDisplay]] to unitDisplay.
- intl_object.set_unit_display(unit_display.as_string().string());
+ intl_object.set_unit_display(unit_display.as_string().deprecated_string());
}
return {};
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/PluralRulesConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/PluralRulesConstructor.cpp
index 3b598ff3f2..8585aca319 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/PluralRulesConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/PluralRulesConstructor.cpp
@@ -94,7 +94,7 @@ ThrowCompletionOr<PluralRules*> initialize_plural_rules(VM& vm, PluralRules& plu
auto type = TRY(get_option(vm, *options, vm.names.type, OptionType::String, AK::Array { "cardinal"sv, "ordinal"sv }, "cardinal"sv));
// 7. Set pluralRules.[[Type]] to t.
- plural_rules.set_type(type.as_string().string());
+ plural_rules.set_type(type.as_string().deprecated_string());
// 8. Perform ? SetNumberFormatDigitOptions(pluralRules, options, +0𝔽, 3𝔽, "standard").
TRY(set_number_format_digit_options(vm, plural_rules, *options, 0, 3, NumberFormat::Notation::Standard));
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp
index f8184567c1..248782ebde 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp
@@ -148,7 +148,7 @@ ThrowCompletionOr<Vector<PatternPartitionWithUnit>> partition_relative_time_patt
VERIFY(patterns.size() == 1);
// i. Let result be patterns.[[<valueString>]].
- auto result = patterns[0].pattern.to_string();
+ auto result = patterns[0].pattern.to_deprecated_string();
// ii. Return a List containing the Record { [[Type]]: "literal", [[Value]]: result }.
return Vector<PatternPartitionWithUnit> { { "literal"sv, move(result) } };
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp
index c3626ad4ae..8a2731b688 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp
@@ -101,11 +101,11 @@ ThrowCompletionOr<RelativeTimeFormat*> initialize_relative_time_format(VM& vm, R
// 7. If numberingSystem is not undefined, then
if (!numbering_system.is_undefined()) {
// a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal, throw a RangeError exception.
- if (!::Locale::is_type_identifier(numbering_system.as_string().string()))
+ if (!::Locale::is_type_identifier(numbering_system.as_string().deprecated_string()))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, numbering_system, "numberingSystem"sv);
// 8. Set opt.[[nu]] to numberingSystem.
- opt.nu = numbering_system.as_string().string();
+ opt.nu = numbering_system.as_string().deprecated_string();
}
// 9. Let localeData be %RelativeTimeFormat%.[[LocaleData]].
@@ -129,13 +129,13 @@ ThrowCompletionOr<RelativeTimeFormat*> initialize_relative_time_format(VM& vm, R
auto style = TRY(get_option(vm, *options, vm.names.style, OptionType::String, { "long"sv, "short"sv, "narrow"sv }, "long"sv));
// 16. Set relativeTimeFormat.[[Style]] to style.
- relative_time_format.set_style(style.as_string().string());
+ relative_time_format.set_style(style.as_string().deprecated_string());
// 17. Let numeric be ? GetOption(options, "numeric", "string", « "always", "auto" », "always").
auto numeric = TRY(get_option(vm, *options, vm.names.numeric, OptionType::String, { "always"sv, "auto"sv }, "always"sv));
// 18. Set relativeTimeFormat.[[Numeric]] to numeric.
- relative_time_format.set_numeric(numeric.as_string().string());
+ relative_time_format.set_numeric(numeric.as_string().deprecated_string());
// 19. Let relativeTimeFormat.[[NumberFormat]] be ! Construct(%NumberFormat%, « locale »).
auto* number_format = MUST(construct(vm, *realm.intrinsics().intl_number_format_constructor(), js_string(vm, locale)));
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/SegmenterConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/SegmenterConstructor.cpp
index e38c0ba472..8c9583987d 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/SegmenterConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/SegmenterConstructor.cpp
@@ -80,7 +80,7 @@ ThrowCompletionOr<Object*> SegmenterConstructor::construct(FunctionObject& new_t
auto granularity = TRY(get_option(vm, *options, vm.names.granularity, OptionType::String, { "grapheme"sv, "word"sv, "sentence"sv }, "grapheme"sv));
// 13. Set segmenter.[[SegmenterGranularity]] to granularity.
- segmenter->set_segmenter_granularity(granularity.as_string().string());
+ segmenter->set_segmenter_granularity(granularity.as_string().deprecated_string());
// 14. Return segmenter.
return segmenter;
diff --git a/Userland/Libraries/LibJS/Runtime/JSONObject.cpp b/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
index 138a4ed506..3f59ebf942 100644
--- a/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
@@ -63,7 +63,7 @@ ThrowCompletionOr<DeprecatedString> JSONObject::stringify_impl(VM& vm, Value val
auto replacer_value = TRY(replacer_object.get(i));
DeprecatedString item;
if (replacer_value.is_string()) {
- item = replacer_value.as_string().string();
+ item = replacer_value.as_string().deprecated_string();
} else if (replacer_value.is_number()) {
item = MUST(replacer_value.to_string(vm));
} else if (replacer_value.is_object()) {
@@ -93,7 +93,7 @@ ThrowCompletionOr<DeprecatedString> JSONObject::stringify_impl(VM& vm, Value val
space_mv = min(10, space_mv);
state.gap = space_mv < 1 ? DeprecatedString::empty() : DeprecatedString::repeated(' ', space_mv);
} else if (space.is_string()) {
- auto string = space.as_string().string();
+ auto string = space.as_string().deprecated_string();
if (string.length() <= 10)
state.gap = string;
else
@@ -185,7 +185,7 @@ ThrowCompletionOr<DeprecatedString> JSONObject::serialize_json_property(VM& vm,
// 8. If Type(value) is String, return QuoteJSONString(value).
if (value.is_string())
- return quote_json_string(value.as_string().string());
+ return quote_json_string(value.as_string().deprecated_string());
// 9. If Type(value) is Number, then
if (value.is_number()) {
@@ -250,7 +250,7 @@ ThrowCompletionOr<DeprecatedString> JSONObject::serialize_json_object(VM& vm, St
} else {
auto property_list = TRY(object.enumerable_own_property_names(PropertyKind::Key));
for (auto& property : property_list)
- TRY(process_property(property.as_string().string()));
+ TRY(process_property(property.as_string().deprecated_string()));
}
StringBuilder builder;
if (property_strings.is_empty()) {
@@ -283,7 +283,7 @@ ThrowCompletionOr<DeprecatedString> JSONObject::serialize_json_object(VM& vm, St
state.seen_objects.remove(&object);
state.indent = previous_indent;
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 25.5.2.5 SerializeJSONArray ( state, value ), https://tc39.es/ecma262/#sec-serializejsonarray
@@ -344,7 +344,7 @@ ThrowCompletionOr<DeprecatedString> JSONObject::serialize_json_array(VM& vm, Str
state.seen_objects.remove(&object);
state.indent = previous_indent;
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 25.5.2.2 QuoteJSONString ( value ), https://tc39.es/ecma262/#sec-quotejsonstring
@@ -385,7 +385,7 @@ DeprecatedString JSONObject::quote_json_string(DeprecatedString string)
}
}
builder.append('"');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 25.5.1 JSON.parse ( text [ , reviver ] ), https://tc39.es/ecma262/#sec-json.parse
@@ -422,7 +422,7 @@ Value JSONObject::parse_json_value(VM& vm, JsonValue const& value)
if (value.is_number())
return Value(value.to_double(0));
if (value.is_string())
- return js_string(vm, value.to_string());
+ return js_string(vm, value.to_deprecated_string());
if (value.is_bool())
return Value(static_cast<bool>(value.as_bool()));
VERIFY_NOT_REACHED();
@@ -473,7 +473,7 @@ ThrowCompletionOr<Value> JSONObject::internalize_json_property(VM& vm, Object* h
} else {
auto property_list = TRY(value_object.enumerable_own_property_names(Object::PropertyKind::Key));
for (auto& property_key : property_list)
- TRY(process_property(property_key.as_string().string()));
+ TRY(process_property(property_key.as_string().deprecated_string()));
}
}
diff --git a/Userland/Libraries/LibJS/Runtime/Object.cpp b/Userland/Libraries/LibJS/Runtime/Object.cpp
index 714c539ea3..a193aa3a2d 100644
--- a/Userland/Libraries/LibJS/Runtime/Object.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Object.cpp
@@ -1246,7 +1246,7 @@ Optional<Completion> Object::enumerate_object_properties(Function<Optional<Compl
for (auto& key : own_keys) {
if (!key.is_string())
continue;
- FlyString property_key = key.as_string().string();
+ FlyString property_key = key.as_string().deprecated_string();
if (visited.contains(property_key))
continue;
auto descriptor = TRY(target->internal_get_own_property(property_key));
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp
index cb7b30fa3d..ba4a0eb7c6 100644
--- a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp
@@ -125,7 +125,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::to_string)
if (!to_string_tag.is_string())
tag = move(builtin_tag);
else
- tag = to_string_tag.as_string().string();
+ tag = to_string_tag.as_string().deprecated_string();
// 17. Return the string-concatenation of "[object ", tag, and "]".
return js_string(vm, DeprecatedString::formatted("[object {}]", tag));
diff --git a/Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp b/Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp
index b2be26ac9d..51f4a1f756 100644
--- a/Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp
+++ b/Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp
@@ -63,7 +63,7 @@ bool PrimitiveString::is_empty() const
VERIFY_NOT_REACHED();
}
-DeprecatedString const& PrimitiveString::string() const
+DeprecatedString const& PrimitiveString::deprecated_string() const
{
resolve_rope_if_needed();
if (!m_has_utf8_string) {
@@ -234,21 +234,21 @@ void PrimitiveString::resolve_rope_if_needed() const
for (auto const* current : pieces) {
if (!previous) {
// This is the very first piece, just append it and continue.
- builder.append(current->string());
+ builder.append(current->deprecated_string());
previous = current;
continue;
}
// Get the UTF-8 representations for both strings.
- auto const& previous_string_as_utf8 = previous->string();
- auto const& current_string_as_utf8 = current->string();
+ auto const& previous_string_as_utf8 = previous->deprecated_string();
+ auto const& current_string_as_utf8 = current->deprecated_string();
// NOTE: Now we need to look at the end of the previous string and the start
// of the current string, to see if they should be combined into a surrogate.
// Surrogates encoded as UTF-8 are 3 bytes.
if ((previous_string_as_utf8.length() < 3) || (current_string_as_utf8.length() < 3)) {
- builder.append(current->string());
+ builder.append(current->deprecated_string());
previous = current;
continue;
}
@@ -256,7 +256,7 @@ void PrimitiveString::resolve_rope_if_needed() const
// Might the previous string end with a UTF-8 encoded surrogate?
if ((static_cast<u8>(previous_string_as_utf8[previous_string_as_utf8.length() - 3]) & 0xf0) != 0xe0) {
// If not, just append the current string and continue.
- builder.append(current->string());
+ builder.append(current->deprecated_string());
previous = current;
continue;
}
@@ -264,7 +264,7 @@ void PrimitiveString::resolve_rope_if_needed() const
// Might the current string begin with a UTF-8 encoded surrogate?
if ((static_cast<u8>(current_string_as_utf8[0]) & 0xf0) != 0xe0) {
// If not, just append the current string and continue.
- builder.append(current->string());
+ builder.append(current->deprecated_string());
previous = current;
continue;
}
@@ -273,7 +273,7 @@ void PrimitiveString::resolve_rope_if_needed() const
auto low_surrogate = *Utf8View(current_string_as_utf8).begin();
if (!Utf16View::is_high_surrogate(high_surrogate) || !Utf16View::is_low_surrogate(low_surrogate)) {
- builder.append(current->string());
+ builder.append(current->deprecated_string());
previous = current;
continue;
}
@@ -287,7 +287,7 @@ void PrimitiveString::resolve_rope_if_needed() const
previous = current;
}
- m_utf8_string = builder.to_string();
+ m_utf8_string = builder.to_deprecated_string();
m_has_utf8_string = true;
m_is_rope = false;
m_lhs = nullptr;
diff --git a/Userland/Libraries/LibJS/Runtime/PrimitiveString.h b/Userland/Libraries/LibJS/Runtime/PrimitiveString.h
index 469b79edac..0cd9ad8a62 100644
--- a/Userland/Libraries/LibJS/Runtime/PrimitiveString.h
+++ b/Userland/Libraries/LibJS/Runtime/PrimitiveString.h
@@ -26,7 +26,7 @@ public:
bool is_empty() const;
- DeprecatedString const& string() const;
+ DeprecatedString const& deprecated_string() const;
bool has_utf8_string() const { return m_has_utf8_string; }
Utf16String const& utf16_string() const;
diff --git a/Userland/Libraries/LibJS/Runtime/Reference.cpp b/Userland/Libraries/LibJS/Runtime/Reference.cpp
index 77a6446eac..908150a019 100644
--- a/Userland/Libraries/LibJS/Runtime/Reference.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Reference.cpp
@@ -194,7 +194,7 @@ ThrowCompletionOr<bool> Reference::delete_(VM& vm)
return m_base_environment->delete_binding(vm, m_name.as_string());
}
-DeprecatedString Reference::to_string() const
+DeprecatedString Reference::to_deprecated_string() const
{
StringBuilder builder;
builder.append("Reference { Base="sv);
@@ -216,7 +216,7 @@ DeprecatedString Reference::to_string() const
if (!m_name.is_valid())
builder.append("<invalid>"sv);
else if (m_name.is_symbol())
- builder.appendff("{}", m_name.as_symbol()->to_string());
+ builder.appendff("{}", m_name.as_symbol()->to_deprecated_string());
else
builder.appendff("{}", m_name.to_string());
builder.appendff(", Strict={}", m_strict);
@@ -227,7 +227,7 @@ DeprecatedString Reference::to_string() const
builder.appendff("{}", m_this_value.to_string_without_side_effects());
builder.append(" }"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 6.2.4.8 InitializeReferencedBinding ( V, W ), https://tc39.es/ecma262/#sec-object.prototype.hasownproperty
diff --git a/Userland/Libraries/LibJS/Runtime/Reference.h b/Userland/Libraries/LibJS/Runtime/Reference.h
index f7e6aa0bf2..10c19fc04b 100644
--- a/Userland/Libraries/LibJS/Runtime/Reference.h
+++ b/Userland/Libraries/LibJS/Runtime/Reference.h
@@ -127,7 +127,7 @@ public:
ThrowCompletionOr<Value> get_value(VM&) const;
ThrowCompletionOr<bool> delete_(VM&);
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool is_valid_reference() const { return m_name.is_valid() || m_is_private; }
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
index c7ec95085e..677fb0a7e5 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
@@ -510,7 +510,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::flags)
#undef __JS_ENUMERATE
// 18. Return result.
- return js_string(vm, builder.to_string());
+ return js_string(vm, builder.to_deprecated_string());
}
// 22.2.5.8 RegExp.prototype [ @@match ] ( string ), https://tc39.es/ecma262/#sec-regexp.prototype-@@match
diff --git a/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp b/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp
index 9db09517f6..b7cafea214 100644
--- a/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp
@@ -86,7 +86,7 @@ ThrowCompletionOr<void> copy_name_and_length(VM& vm, FunctionObject& function, F
target_name = js_string(vm, DeprecatedString::empty());
// 8. Perform SetFunctionName(F, targetName, prefix).
- function.set_function_name({ target_name.as_string().string() }, move(prefix));
+ function.set_function_name({ target_name.as_string().deprecated_string() }, move(prefix));
return {};
}
@@ -107,7 +107,7 @@ ThrowCompletionOr<Value> perform_shadow_realm_eval(VM& vm, StringView source_tex
// b. If script is a List of errors, throw a SyntaxError exception.
if (parser.has_errors()) {
auto& error = parser.errors()[0];
- return vm.throw_completion<SyntaxError>(error.to_string());
+ return vm.throw_completion<SyntaxError>(error.to_deprecated_string());
}
// c. If script Contains ScriptBody is false, return undefined.
@@ -272,7 +272,7 @@ ThrowCompletionOr<Value> shadow_realm_import_value(VM& vm, DeprecatedString spec
// NOTE: Even though the spec tells us to use %ThrowTypeError%, it's not observable if we actually do.
// Throw a nicer TypeError forwarding the import error message instead (we know the argument is an Error object).
auto* throw_type_error = NativeFunction::create(realm, {}, [](auto& vm) -> ThrowCompletionOr<Value> {
- return vm.template throw_completion<TypeError>(vm.argument(0).as_object().get_without_side_effects(vm.names.message).as_string().string());
+ return vm.template throw_completion<TypeError>(vm.argument(0).as_object().get_without_side_effects(vm.names.message).as_string().deprecated_string());
});
// 13. Return PerformPromiseThen(innerCapability.[[Promise]], onFulfilled, callerRealm.[[Intrinsics]].[[%ThrowTypeError%]], promiseCapability).
diff --git a/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp
index 7a510e9a71..9025b7197f 100644
--- a/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp
@@ -49,7 +49,7 @@ JS_DEFINE_NATIVE_FUNCTION(ShadowRealmPrototype::evaluate)
auto& eval_realm = object->shadow_realm();
// 6. Return ? PerformShadowRealmEval(sourceText, callerRealm, evalRealm).
- return perform_shadow_realm_eval(vm, source_text.as_string().string(), *caller_realm, eval_realm);
+ return perform_shadow_realm_eval(vm, source_text.as_string().deprecated_string(), *caller_realm, eval_realm);
}
// 3.4.2 ShadowRealm.prototype.importValue ( specifier, exportName ), https://tc39.es/proposal-shadowrealm/#sec-shadowrealm.prototype.importvalue
@@ -79,7 +79,7 @@ JS_DEFINE_NATIVE_FUNCTION(ShadowRealmPrototype::import_value)
auto& eval_context = object->execution_context();
// 8. Return ? ShadowRealmImportValue(specifierString, exportNameString, callerRealm, evalRealm, evalContext).
- return shadow_realm_import_value(vm, move(specifier_string), export_name.as_string().string(), *caller_realm, eval_realm, eval_context);
+ return shadow_realm_import_value(vm, move(specifier_string), export_name.as_string().deprecated_string(), *caller_realm, eval_realm, eval_context);
}
}
diff --git a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
index 13299a6197..9526a764bc 100644
--- a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
@@ -45,7 +45,7 @@ ThrowCompletionOr<Value> StringConstructor::call()
if (!vm.argument_count())
return js_string(heap(), "");
if (vm.argument(0).is_symbol())
- return js_string(vm, vm.argument(0).as_symbol().to_string());
+ return js_string(vm, vm.argument(0).as_symbol().to_deprecated_string());
return TRY(vm.argument(0).to_primitive_string(vm));
}
diff --git a/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp
index 72386b1015..3f250daed4 100644
--- a/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp
@@ -46,7 +46,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringIteratorPrototype::next)
builder.append_code_point(*utf8_iterator);
++utf8_iterator;
- return create_iterator_result_object(vm, js_string(vm, builder.to_string()), false);
+ return create_iterator_result_object(vm, js_string(vm, builder.to_deprecated_string()), false);
}
}
diff --git a/Userland/Libraries/LibJS/Runtime/StringOrSymbol.h b/Userland/Libraries/LibJS/Runtime/StringOrSymbol.h
index f6d41cacfa..7e96e84fb4 100644
--- a/Userland/Libraries/LibJS/Runtime/StringOrSymbol.h
+++ b/Userland/Libraries/LibJS/Runtime/StringOrSymbol.h
@@ -79,7 +79,7 @@ public:
if (is_string())
return as_string();
if (is_symbol())
- return as_symbol()->to_string();
+ return as_symbol()->to_deprecated_string();
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
index fbbc8bc3fe..423b3b711d 100644
--- a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
@@ -578,7 +578,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::repeat)
StringBuilder builder;
for (size_t i = 0; i < n; ++i)
builder.append(string);
- return js_string(vm, builder.to_string());
+ return js_string(vm, builder.to_deprecated_string());
}
// 22.1.3.18 String.prototype.replace ( searchValue, replaceValue ), https://tc39.es/ecma262/#sec-string.prototype.replace
@@ -897,7 +897,7 @@ static ThrowCompletionOr<DeprecatedString> transform_case(VM& vm, StringView str
// 4. Let noExtensionsLocale be the String value that is requestedLocale with any Unicode locale extension sequences (6.2.1) removed.
requested_locale->remove_extension_type<Locale::LocaleExtension>();
- auto no_extensions_locale = requested_locale->to_string();
+ auto no_extensions_locale = requested_locale->to_deprecated_string();
// 5. Let availableLocales be a List with language tags that includes the languages for which the Unicode Character Database contains language sensitive case mappings. Implementations may add additional language tags if they support case mapping for additional locales.
// 6. Let locale be ! BestAvailableLocale(availableLocales, noExtensionsLocale).
diff --git a/Userland/Libraries/LibJS/Runtime/Symbol.h b/Userland/Libraries/LibJS/Runtime/Symbol.h
index 3ff1c91f96..f8fbb99247 100644
--- a/Userland/Libraries/LibJS/Runtime/Symbol.h
+++ b/Userland/Libraries/LibJS/Runtime/Symbol.h
@@ -23,7 +23,7 @@ public:
DeprecatedString description() const { return m_description.value_or(""); }
Optional<DeprecatedString> const& raw_description() const { return m_description; }
bool is_global() const { return m_is_global; }
- DeprecatedString to_string() const { return DeprecatedString::formatted("Symbol({})", description()); }
+ DeprecatedString to_deprecated_string() const { return DeprecatedString::formatted("Symbol({})", description()); }
private:
Symbol(Optional<DeprecatedString>, bool);
diff --git a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp
index 7e9b574813..ae33feff44 100644
--- a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp
@@ -61,7 +61,7 @@ JS_DEFINE_NATIVE_FUNCTION(SymbolPrototype::description_getter)
JS_DEFINE_NATIVE_FUNCTION(SymbolPrototype::to_string)
{
auto* symbol = TRY(this_symbol_value(vm, vm.this_value()));
- return js_string(vm, symbol->to_string());
+ return js_string(vm, symbol->to_deprecated_string());
}
// 20.4.3.4 Symbol.prototype.valueOf ( ), https://tc39.es/ecma262/#sec-symbol.prototype.valueof
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
index af5f8fde25..430a98e44e 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
@@ -147,8 +147,8 @@ ThrowCompletionOr<Value> get_option(VM& vm, Object const& options, PropertyKey c
if (!values.is_empty()) {
// NOTE: Every location in the spec that invokes GetOption with type=boolean also has values=undefined.
VERIFY(value.is_string());
- if (!values.contains_slow(value.as_string().string()))
- return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, value.as_string().string(), property.as_string());
+ if (!values.contains_slow(value.as_string().deprecated_string()))
+ return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, value.as_string().deprecated_string(), property.as_string());
}
// 9. Return value.
@@ -166,7 +166,7 @@ ThrowCompletionOr<DeprecatedString> to_temporal_overflow(VM& vm, Object const* o
auto option = TRY(get_option(vm, *options, vm.names.overflow, OptionType::String, { "constrain"sv, "reject"sv }, "constrain"sv));
VERIFY(option.is_string());
- return option.as_string().string();
+ return option.as_string().deprecated_string();
}
// 13.5 ToTemporalDisambiguation ( options ), https://tc39.es/proposal-temporal/#sec-temporal-totemporaldisambiguation
@@ -180,7 +180,7 @@ ThrowCompletionOr<DeprecatedString> to_temporal_disambiguation(VM& vm, Object co
auto option = TRY(get_option(vm, *options, vm.names.disambiguation, OptionType::String, { "compatible"sv, "earlier"sv, "later"sv, "reject"sv }, "compatible"sv));
VERIFY(option.is_string());
- return option.as_string().string();
+ return option.as_string().deprecated_string();
}
// 13.6 ToTemporalRoundingMode ( normalizedOptions, fallback ), https://tc39.es/proposal-temporal/#sec-temporal-totemporalroundingmode
@@ -203,7 +203,7 @@ ThrowCompletionOr<DeprecatedString> to_temporal_rounding_mode(VM& vm, Object con
fallback.view()));
VERIFY(option.is_string());
- return option.as_string().string();
+ return option.as_string().deprecated_string();
}
// 13.7 NegateTemporalRoundingMode ( roundingMode ), https://tc39.es/proposal-temporal/#sec-temporal-negatetemporalroundingmode
@@ -240,7 +240,7 @@ ThrowCompletionOr<DeprecatedString> to_temporal_offset(VM& vm, Object const* opt
auto option = TRY(get_option(vm, *options, vm.names.offset, OptionType::String, { "prefer"sv, "use"sv, "ignore"sv, "reject"sv }, fallback.view()));
VERIFY(option.is_string());
- return option.as_string().string();
+ return option.as_string().deprecated_string();
}
// 13.9 ToCalendarNameOption ( normalizedOptions ), https://tc39.es/proposal-temporal/#sec-temporal-tocalendarnameoption
@@ -250,7 +250,7 @@ ThrowCompletionOr<DeprecatedString> to_calendar_name_option(VM& vm, Object const
auto option = TRY(get_option(vm, normalized_options, vm.names.calendarName, OptionType::String, { "auto"sv, "always"sv, "never"sv, "critical"sv }, "auto"sv));
VERIFY(option.is_string());
- return option.as_string().string();
+ return option.as_string().deprecated_string();
}
// 13.10 ToTimeZoneNameOption ( normalizedOptions ), https://tc39.es/proposal-temporal/#sec-temporal-totimezonenameoption
@@ -260,7 +260,7 @@ ThrowCompletionOr<DeprecatedString> to_time_zone_name_option(VM& vm, Object cons
auto option = TRY(get_option(vm, normalized_options, vm.names.timeZoneName, OptionType::String, { "auto"sv, "never"sv, "critical"sv }, "auto"sv));
VERIFY(option.is_string());
- return option.as_string().string();
+ return option.as_string().deprecated_string();
}
// 13.11 ToShowOffsetOption ( normalizedOptions ), https://tc39.es/proposal-temporal/#sec-temporal-toshowoffsetoption
@@ -270,7 +270,7 @@ ThrowCompletionOr<DeprecatedString> to_show_offset_option(VM& vm, Object const&
auto option = TRY(get_option(vm, normalized_options, vm.names.offset, OptionType::String, { "auto"sv, "never"sv }, "auto"sv));
VERIFY(option.is_string());
- return option.as_string().string();
+ return option.as_string().deprecated_string();
}
// 13.12 ToTemporalRoundingIncrement ( normalizedOptions, dividend, inclusive ), https://tc39.es/proposal-temporal/#sec-temporal-totemporalroundingincrement
@@ -531,7 +531,7 @@ ThrowCompletionOr<Optional<DeprecatedString>> get_temporal_unit(VM& vm, Object c
Optional<DeprecatedString> value = option_value.is_undefined()
? Optional<DeprecatedString> {}
- : option_value.as_string().string();
+ : option_value.as_string().deprecated_string();
// 11. If value is listed in the Plural column of Table 13, then
for (auto const& row : temporal_units) {
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp
index 3d82029cdc..25b4dcaf57 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp
@@ -126,7 +126,7 @@ ThrowCompletionOr<Vector<DeprecatedString>> calendar_fields(VM& vm, Object& cale
Vector<DeprecatedString> result;
for (auto& value : list)
- result.append(value.as_string().string());
+ result.append(value.as_string().deprecated_string());
return result;
}
@@ -791,7 +791,7 @@ ThrowCompletionOr<double> resolve_iso_month(VM& vm, Object const& fields)
// 6. Assert: Type(monthCode) is String.
VERIFY(month_code.is_string());
- auto& month_code_string = month_code.as_string().string();
+ auto& month_code_string = month_code.as_string().deprecated_string();
// 7. If the length of monthCode is not 3, throw a RangeError exception.
auto month_length = month_code_string.length();
@@ -953,7 +953,7 @@ ThrowCompletionOr<Object*> default_merge_calendar_fields(VM& vm, Object const& f
// 3. For each element key of fieldsKeys, do
for (auto& key : fields_keys) {
// a. If key is not "month" or "monthCode", then
- if (key.as_string().string() != vm.names.month.as_string() && key.as_string().string() != vm.names.monthCode.as_string()) {
+ if (key.as_string().deprecated_string() != vm.names.month.as_string() && key.as_string().deprecated_string() != vm.names.monthCode.as_string()) {
auto property_key = MUST(PropertyKey::from_value(vm, key));
// i. Let propValue be ? Get(fields, key).
@@ -987,7 +987,7 @@ ThrowCompletionOr<Object*> default_merge_calendar_fields(VM& vm, Object const& f
}
// See comment above.
- additional_fields_keys_contains_month_or_month_code_property |= key.as_string().string() == vm.names.month.as_string() || key.as_string().string() == vm.names.monthCode.as_string();
+ additional_fields_keys_contains_month_or_month_code_property |= key.as_string().deprecated_string() == vm.names.month.as_string() || key.as_string().deprecated_string() == vm.names.monthCode.as_string();
}
// 6. If additionalFieldsKeys does not contain either "month" or "monthCode", then
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
index 2ed6a5208d..091fd03991 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
@@ -537,16 +537,16 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::fields)
// iii. If fieldNames contains nextValue, then
if (field_names.contains_slow(next_value)) {
// 1. Let completion be ThrowCompletion(a newly created RangeError object).
- auto completion = vm.throw_completion<RangeError>(ErrorType::TemporalDuplicateCalendarField, next_value.as_string().string());
+ auto completion = vm.throw_completion<RangeError>(ErrorType::TemporalDuplicateCalendarField, next_value.as_string().deprecated_string());
// 2. Return ? IteratorClose(iteratorRecord, completion).
return TRY(iterator_close(vm, iterator_record, move(completion)));
}
// iv. If nextValue is not one of "year", "month", "monthCode", "day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond", then
- if (!next_value.as_string().string().is_one_of("year"sv, "month"sv, "monthCode"sv, "day"sv, "hour"sv, "minute"sv, "second"sv, "millisecond"sv, "microsecond"sv, "nanosecond"sv)) {
+ if (!next_value.as_string().deprecated_string().is_one_of("year"sv, "month"sv, "monthCode"sv, "day"sv, "hour"sv, "minute"sv, "second"sv, "millisecond"sv, "microsecond"sv, "nanosecond"sv)) {
// 1. Let completion be ThrowCompletion(a newly created RangeError object).
- auto completion = vm.throw_completion<RangeError>(ErrorType::TemporalInvalidCalendarFieldName, next_value.as_string().string());
+ auto completion = vm.throw_completion<RangeError>(ErrorType::TemporalInvalidCalendarFieldName, next_value.as_string().deprecated_string());
// 2. Return ? IteratorClose(iteratorRecord, completion).
return TRY(iterator_close(vm, iterator_record, move(completion)));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
index 829938cfb6..a67171b5a9 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
@@ -1789,7 +1789,7 @@ DeprecatedString temporal_duration_to_string(double years, double months, double
}
// 20. Return result.
- return result.to_string();
+ return result.to_deprecated_string();
}
// 7.5.28 AddDurationToOrSubtractDurationFromDuration ( operation, duration, other, options ), https://tc39.es/proposal-temporal/#sec-temporal-adddurationtoorsubtractdurationfromduration
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp
index dd662d4512..4b57afa5c0 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp
@@ -259,7 +259,7 @@ DeprecatedString format_time_zone_offset_string(double offset_nanoseconds)
// a. Let post be the empty String.
// 14. Return the string-concatenation of sign, h, the code unit 0x003A (COLON), m, and post.
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 11.6.6 FormatISOTimeZoneOffsetString ( offsetNanoseconds ), https://tc39.es/proposal-temporal/#sec-temporal-formatisotimezoneoffsetstring
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp
index 452d40ac90..5b4fa31ec4 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp
@@ -777,7 +777,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::with)
// 18. Assert: Type(offsetString) is String.
VERIFY(offset_string_value.is_string());
- auto const& offset_string = offset_string_value.as_string().string();
+ auto const& offset_string = offset_string_value.as_string().deprecated_string();
// 19. Let dateTimeResult be ? InterpretTemporalDateTimeFields(calendar, fields, options).
auto date_time_result = TRY(interpret_temporal_date_time_fields(vm, calendar, *fields, *options));
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
index acb6d96cd3..185d3e2283 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
@@ -780,7 +780,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::join)
}
// 9. Return R.
- return js_string(vm, builder.to_string());
+ return js_string(vm, builder.to_deprecated_string());
}
// 23.2.3.19 %TypedArray%.prototype.keys ( ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
@@ -1565,7 +1565,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::to_locale_string)
}
// 7. Return R.
- return js_string(vm, builder.to_string());
+ return js_string(vm, builder.to_deprecated_string());
}
// 1.2.2.1.3 %TypedArray%.prototype.toReversed ( ), https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed
diff --git a/Userland/Libraries/LibJS/Runtime/VM.cpp b/Userland/Libraries/LibJS/Runtime/VM.cpp
index c6aebf655f..b69d05469e 100644
--- a/Userland/Libraries/LibJS/Runtime/VM.cpp
+++ b/Userland/Libraries/LibJS/Runtime/VM.cpp
@@ -963,7 +963,7 @@ ThrowCompletionOr<NonnullGCPtr<Module>> VM::resolve_imported_module(ScriptOrModu
if (module_or_errors.is_error()) {
VERIFY(module_or_errors.error().size() > 0);
- return throw_completion<SyntaxError>(module_or_errors.error().first().to_string());
+ return throw_completion<SyntaxError>(module_or_errors.error().first().to_deprecated_string());
}
return module_or_errors.release_value();
}());
diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp
index 2f4ffcdaf0..cd00c14e06 100644
--- a/Userland/Libraries/LibJS/Runtime/Value.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Value.cpp
@@ -153,7 +153,7 @@ DeprecatedString number_to_string(double d, NumberToStringMode mode)
builder.append(mantissa_digits.data(), k);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 7. NOTE: In this case, the input will be represented using scientific E notation, such as 1.2e+3.
@@ -180,7 +180,7 @@ DeprecatedString number_to_string(double d, NumberToStringMode mode)
// the code units of the decimal representation of abs(n - 1)
builder.append(exponent_digits.data(), exponent_length);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 12. Return the string-concatenation of:
@@ -197,7 +197,7 @@ DeprecatedString number_to_string(double d, NumberToStringMode mode)
// the code units of the decimal representation of abs(n - 1)
builder.append(exponent_digits.data(), exponent_length);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 7.2.2 IsArray ( argument ), https://tc39.es/ecma262/#sec-isarray
@@ -315,11 +315,11 @@ DeprecatedString Value::to_string_without_side_effects() const
case INT32_TAG:
return DeprecatedString::number(as_i32());
case STRING_TAG:
- return as_string().string();
+ return as_string().deprecated_string();
case SYMBOL_TAG:
- return as_symbol().to_string();
+ return as_symbol().to_deprecated_string();
case BIGINT_TAG:
- return as_bigint().to_string();
+ return as_bigint().to_deprecated_string();
case OBJECT_TAG:
return DeprecatedString::formatted("[object {}]", as_object().class_name());
case ACCESSOR_TAG:
@@ -353,7 +353,7 @@ ThrowCompletionOr<DeprecatedString> Value::to_string(VM& vm) const
case INT32_TAG:
return DeprecatedString::number(as_i32());
case STRING_TAG:
- return as_string().string();
+ return as_string().deprecated_string();
case SYMBOL_TAG:
return vm.throw_completion<TypeError>(ErrorType::Convert, "symbol", "string");
case BIGINT_TAG:
@@ -576,7 +576,7 @@ ThrowCompletionOr<Value> Value::to_number(VM& vm) const
case BOOLEAN_TAG:
return Value(as_bool() ? 1 : 0);
case STRING_TAG:
- return string_to_number(as_string().string().view());
+ return string_to_number(as_string().deprecated_string().view());
case SYMBOL_TAG:
return vm.throw_completion<TypeError>(ErrorType::Convert, "symbol", "number");
case BIGINT_TAG:
@@ -614,7 +614,7 @@ ThrowCompletionOr<BigInt*> Value::to_bigint(VM& vm) const
return &primitive.as_bigint();
case STRING_TAG: {
// 1. Let n be ! StringToBigInt(prim).
- auto bigint = string_to_bigint(vm, primitive.as_string().string());
+ auto bigint = string_to_bigint(vm, primitive.as_string().deprecated_string());
// 2. If n is undefined, throw a SyntaxError exception.
if (!bigint.has_value())
@@ -1428,7 +1428,7 @@ bool same_value_non_numeric(Value lhs, Value rhs)
VERIFY(same_type_for_equality(lhs, rhs));
if (lhs.is_string())
- return lhs.as_string().string() == rhs.as_string().string();
+ return lhs.as_string().deprecated_string() == rhs.as_string().deprecated_string();
return lhs.m_value.encoded == rhs.m_value.encoded;
}
@@ -1491,7 +1491,7 @@ ThrowCompletionOr<bool> is_loosely_equal(VM& vm, Value lhs, Value rhs)
// 7. If Type(x) is BigInt and Type(y) is String, then
if (lhs.is_bigint() && rhs.is_string()) {
// a. Let n be StringToBigInt(y).
- auto bigint = string_to_bigint(vm, rhs.as_string().string());
+ auto bigint = string_to_bigint(vm, rhs.as_string().deprecated_string());
// b. If n is undefined, return false.
if (!bigint.has_value())
@@ -1562,8 +1562,8 @@ ThrowCompletionOr<TriState> is_less_than(VM& vm, Value lhs, Value rhs, bool left
}
if (x_primitive.is_string() && y_primitive.is_string()) {
- auto x_string = x_primitive.as_string().string();
- auto y_string = y_primitive.as_string().string();
+ auto x_string = x_primitive.as_string().deprecated_string();
+ auto y_string = y_primitive.as_string().deprecated_string();
Utf8View x_code_points { x_string };
Utf8View y_code_points { y_string };
@@ -1588,7 +1588,7 @@ ThrowCompletionOr<TriState> is_less_than(VM& vm, Value lhs, Value rhs, bool left
}
if (x_primitive.is_bigint() && y_primitive.is_string()) {
- auto y_bigint = string_to_bigint(vm, y_primitive.as_string().string());
+ auto y_bigint = string_to_bigint(vm, y_primitive.as_string().deprecated_string());
if (!y_bigint.has_value())
return TriState::Unknown;
@@ -1598,7 +1598,7 @@ ThrowCompletionOr<TriState> is_less_than(VM& vm, Value lhs, Value rhs, bool left
}
if (x_primitive.is_string() && y_primitive.is_bigint()) {
- auto x_bigint = string_to_bigint(vm, x_primitive.as_string().string());
+ auto x_bigint = string_to_bigint(vm, x_primitive.as_string().deprecated_string());
if (!x_bigint.has_value())
return TriState::Unknown;
diff --git a/Userland/Libraries/LibJS/Runtime/ValueTraits.h b/Userland/Libraries/LibJS/Runtime/ValueTraits.h
index 3922d3b779..2bae2c9cde 100644
--- a/Userland/Libraries/LibJS/Runtime/ValueTraits.h
+++ b/Userland/Libraries/LibJS/Runtime/ValueTraits.h
@@ -17,7 +17,7 @@ struct ValueTraits : public Traits<Value> {
{
VERIFY(!value.is_empty());
if (value.is_string())
- return value.as_string().string().hash();
+ return value.as_string().deprecated_string().hash();
if (value.is_bigint())
return value.as_bigint().big_integer().hash();
diff --git a/Userland/Libraries/LibJS/Token.cpp b/Userland/Libraries/LibJS/Token.cpp
index d5adeaa6bb..74b22461da 100644
--- a/Userland/Libraries/LibJS/Token.cpp
+++ b/Userland/Libraries/LibJS/Token.cpp
@@ -63,7 +63,7 @@ double Token::double_value() const
builder.append(ch);
}
- DeprecatedString value_string = builder.to_string();
+ DeprecatedString value_string = builder.to_deprecated_string();
if (value_string[0] == '0' && value_string.length() >= 2) {
if (value_string[1] == 'x' || value_string[1] == 'X') {
// hexadecimal
@@ -209,7 +209,7 @@ DeprecatedString Token::string_value(StringValueStatus& status) const
lexer.retreat();
builder.append(lexer.consume_escaped_character('\\', "b\bf\fn\nr\rt\tv\v"sv));
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 12.8.6.2 Static Semantics: TRV, https://tc39.es/ecma262/#sec-static-semantics-trv
diff --git a/Userland/Libraries/LibKeyboard/CharacterMapFile.cpp b/Userland/Libraries/LibKeyboard/CharacterMapFile.cpp
index b736ec614a..af1029754f 100644
--- a/Userland/Libraries/LibKeyboard/CharacterMapFile.cpp
+++ b/Userland/Libraries/LibKeyboard/CharacterMapFile.cpp
@@ -19,7 +19,7 @@ ErrorOr<CharacterMapData> CharacterMapFile::load_from_file(DeprecatedString cons
full_path.append("/res/keymaps/"sv);
full_path.append(filename);
full_path.append(".json"sv);
- path = full_path.to_string();
+ path = full_path.to_deprecated_string();
}
auto file = TRY(Core::File::open(path, Core::OpenMode::ReadOnly));
diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp
index e457ab2999..064a4e031b 100644
--- a/Userland/Libraries/LibLine/Editor.cpp
+++ b/Userland/Libraries/LibLine/Editor.cpp
@@ -1498,14 +1498,14 @@ void Editor::refresh_display()
dbgln("Drawn Spans:");
for (auto& sentry : m_drawn_spans.m_spans_starting) {
for (auto& entry : sentry.value) {
- dbgln("{}-{}: {}", sentry.key, entry.key, entry.value.to_string());
+ dbgln("{}-{}: {}", sentry.key, entry.key, entry.value.to_deprecated_string());
}
}
dbgln("==========================================================================");
dbgln("Current Spans:");
for (auto& sentry : m_current_spans.m_spans_starting) {
for (auto& entry : sentry.value) {
- dbgln("{}-{}: {}", sentry.key, entry.key, entry.value.to_string());
+ dbgln("{}-{}: {}", sentry.key, entry.key, entry.value.to_deprecated_string());
}
}
}
@@ -1680,7 +1680,7 @@ void Style::unify_with(Style const& other, bool prefer_other)
m_hyperlink = other.hyperlink();
}
-DeprecatedString Style::to_string() const
+DeprecatedString Style::to_deprecated_string() const
{
StringBuilder builder;
builder.append("Style { "sv);
@@ -2277,11 +2277,11 @@ bool Editor::Spans::contains_up_to_offset(Spans const& other, size_t offset) con
if constexpr (LINE_EDITOR_DEBUG) {
dbgln("Compare for {}-{} failed, no entry", entry.key, left_entry.key);
for (auto& x : entry.value)
- dbgln("Have: {}-{} = {}", entry.key, x.key, x.value.to_string());
+ dbgln("Have: {}-{} = {}", entry.key, x.key, x.value.to_deprecated_string());
}
return false;
} else if (value_it->value != left_entry.value) {
- dbgln_if(LINE_EDITOR_DEBUG, "Compare for {}-{} failed, different values: {} != {}", entry.key, left_entry.key, value_it->value.to_string(), left_entry.value.to_string());
+ dbgln_if(LINE_EDITOR_DEBUG, "Compare for {}-{} failed, different values: {} != {}", entry.key, left_entry.key, value_it->value.to_deprecated_string(), left_entry.value.to_deprecated_string());
return false;
}
}
diff --git a/Userland/Libraries/LibLine/InternalFunctions.cpp b/Userland/Libraries/LibLine/InternalFunctions.cpp
index 2fcc3faa6b..8dcfbe87cd 100644
--- a/Userland/Libraries/LibLine/InternalFunctions.cpp
+++ b/Userland/Libraries/LibLine/InternalFunctions.cpp
@@ -38,7 +38,7 @@ void Editor::search_forwards()
ScopedValueRollback inline_search_cursor_rollback { m_inline_search_cursor };
StringBuilder builder;
builder.append(Utf32View { m_buffer.data(), m_inline_search_cursor });
- DeprecatedString search_phrase = builder.to_string();
+ DeprecatedString search_phrase = builder.to_deprecated_string();
if (m_search_offset_state == SearchOffsetState::Backwards)
--m_search_offset;
if (m_search_offset > 0) {
@@ -65,7 +65,7 @@ void Editor::search_backwards()
ScopedValueRollback inline_search_cursor_rollback { m_inline_search_cursor };
StringBuilder builder;
builder.append(Utf32View { m_buffer.data(), m_inline_search_cursor });
- DeprecatedString search_phrase = builder.to_string();
+ DeprecatedString search_phrase = builder.to_deprecated_string();
if (m_search_offset_state == SearchOffsetState::Forwards)
++m_search_offset;
if (search(search_phrase, true)) {
diff --git a/Userland/Libraries/LibLine/Style.h b/Userland/Libraries/LibLine/Style.h
index 6c530223f3..d054a17c14 100644
--- a/Userland/Libraries/LibLine/Style.h
+++ b/Userland/Libraries/LibLine/Style.h
@@ -180,7 +180,7 @@ public:
bool is_anchored() const { return m_is_anchored; }
bool is_empty() const { return m_is_empty; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
bool m_underline { false };
diff --git a/Userland/Libraries/LibLocale/Locale.cpp b/Userland/Libraries/LibLocale/Locale.cpp
index 7c73558692..a45e4e9ec1 100644
--- a/Userland/Libraries/LibLocale/Locale.cpp
+++ b/Userland/Libraries/LibLocale/Locale.cpp
@@ -560,7 +560,7 @@ void canonicalize_unicode_extension_values(StringView key, DeprecatedString& val
// FIXME: Subdivision subtags do not appear in the CLDR likelySubtags.json file.
// Implement the spec's recommendation of using just the first alias for now,
// but we should determine if there's anything else needed here.
- value = aliases[0].to_string();
+ value = aliases[0].to_deprecated_string();
}
}
}
@@ -903,10 +903,10 @@ DeprecatedString resolve_most_likely_territory_alias(LanguageID const& language_
return territory.release_value();
}
- return aliases[0].to_string();
+ return aliases[0].to_deprecated_string();
}
-DeprecatedString LanguageID::to_string() const
+DeprecatedString LanguageID::to_deprecated_string() const
{
StringBuilder builder;
@@ -927,7 +927,7 @@ DeprecatedString LanguageID::to_string() const
return builder.build();
}
-DeprecatedString LocaleID::to_string() const
+DeprecatedString LocaleID::to_deprecated_string() const
{
StringBuilder builder;
@@ -939,7 +939,7 @@ DeprecatedString LocaleID::to_string() const
builder.append(*segment);
};
- append_segment(language_id.to_string());
+ append_segment(language_id.to_deprecated_string());
for (auto const& extension : extensions) {
extension.visit(
@@ -955,7 +955,7 @@ DeprecatedString LocaleID::to_string() const
[&](TransformedExtension const& ext) {
builder.append("-t"sv);
if (ext.language.has_value())
- append_segment(ext.language->to_string());
+ append_segment(ext.language->to_deprecated_string());
for (auto const& field : ext.fields) {
append_segment(field.key);
append_segment(field.value);
diff --git a/Userland/Libraries/LibLocale/Locale.h b/Userland/Libraries/LibLocale/Locale.h
index 54ad05a953..db3fa2a1d9 100644
--- a/Userland/Libraries/LibLocale/Locale.h
+++ b/Userland/Libraries/LibLocale/Locale.h
@@ -17,7 +17,7 @@
namespace Locale {
struct LanguageID {
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool operator==(LanguageID const&) const = default;
bool is_root { false };
@@ -55,7 +55,7 @@ struct OtherExtension {
using Extension = AK::Variant<LocaleExtension, TransformedExtension, OtherExtension>;
struct LocaleID {
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
template<typename ExtensionType>
Vector<Extension> remove_extension_type()
diff --git a/Userland/Libraries/LibMarkdown/HorizontalRule.cpp b/Userland/Libraries/LibMarkdown/HorizontalRule.cpp
index 6f80249f87..47ffb9ae73 100644
--- a/Userland/Libraries/LibMarkdown/HorizontalRule.cpp
+++ b/Userland/Libraries/LibMarkdown/HorizontalRule.cpp
@@ -23,7 +23,7 @@ DeprecatedString HorizontalRule::render_for_terminal(size_t view_width) const
for (size_t i = 0; i < view_width; ++i)
builder.append('-');
builder.append("\n\n"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
RecursionDecision HorizontalRule::walk(Visitor& visitor) const
diff --git a/Userland/Libraries/LibMarkdown/Table.cpp b/Userland/Libraries/LibMarkdown/Table.cpp
index 3c63a11f39..dfebf833e9 100644
--- a/Userland/Libraries/LibMarkdown/Table.cpp
+++ b/Userland/Libraries/LibMarkdown/Table.cpp
@@ -65,7 +65,7 @@ DeprecatedString Table::render_for_terminal(size_t view_width) const
builder.append('\n');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
DeprecatedString Table::render_to_html(bool) const
@@ -108,7 +108,7 @@ DeprecatedString Table::render_to_html(bool) const
builder.append("</tbody>"sv);
builder.append("</table>"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
RecursionDecision Table::walk(Visitor& visitor) const
diff --git a/Userland/Libraries/LibPDF/Document.cpp b/Userland/Libraries/LibPDF/Document.cpp
index f6260d5020..e25dc0e6a0 100644
--- a/Userland/Libraries/LibPDF/Document.cpp
+++ b/Userland/Libraries/LibPDF/Document.cpp
@@ -10,14 +10,14 @@
namespace PDF {
-DeprecatedString OutlineItem::to_string(int indent) const
+DeprecatedString OutlineItem::to_deprecated_string(int indent) const
{
auto indent_str = DeprecatedString::repeated(" "sv, indent + 1);
StringBuilder child_builder;
child_builder.append('[');
for (auto& child : children)
- child_builder.appendff("{}\n", child.to_string(indent + 1));
+ child_builder.appendff("{}\n", child.to_deprecated_string(indent + 1));
child_builder.appendff("{}]", indent_str);
StringBuilder builder;
@@ -28,10 +28,10 @@ DeprecatedString OutlineItem::to_string(int indent) const
builder.appendff("{}color={}\n", indent_str, color);
builder.appendff("{}italic={}\n", indent_str, italic);
builder.appendff("{}bold={}\n", indent_str, bold);
- builder.appendff("{}children={}\n", indent_str, child_builder.to_string());
+ builder.appendff("{}children={}\n", indent_str, child_builder.to_deprecated_string());
builder.appendff("{}}}", DeprecatedString::repeated(" "sv, indent));
- return builder.to_string();
+ return builder.to_deprecated_string();
}
PDFErrorOr<NonnullRefPtr<Document>> Document::create(ReadonlyBytes bytes)
diff --git a/Userland/Libraries/LibPDF/Document.h b/Userland/Libraries/LibPDF/Document.h
index 8dca3cc3e9..99a41aa641 100644
--- a/Userland/Libraries/LibPDF/Document.h
+++ b/Userland/Libraries/LibPDF/Document.h
@@ -66,7 +66,7 @@ struct OutlineItem final : public RefCounted<OutlineItem> {
OutlineItem() = default;
- DeprecatedString to_string(int indent) const;
+ DeprecatedString to_deprecated_string(int indent) const;
};
struct OutlineDict final : public RefCounted<OutlineDict> {
@@ -185,8 +185,8 @@ struct Formatter<PDF::Page> : Formatter<FormatString> {
{
return Formatter<FormatString>::format(builder,
"Page {{\n resources={}\n contents={}\n media_box={}\n crop_box={}\n user_unit={}\n rotate={}\n}}"sv,
- page.resources->to_string(1),
- page.contents->to_string(1),
+ page.resources->to_deprecated_string(1),
+ page.contents->to_deprecated_string(1),
page.media_box,
page.crop_box,
page.user_unit,
@@ -230,7 +230,7 @@ struct Formatter<PDF::Destination> : Formatter<FormatString> {
for (auto& param : destination.parameters)
param_builder.appendff("{} ", param);
- return Formatter<FormatString>::format(builder, "{{ type={} page={} params={} }}"sv, type_str, destination.page, param_builder.to_string());
+ return Formatter<FormatString>::format(builder, "{{ type={} page={} params={} }}"sv, type_str, destination.page, param_builder.to_deprecated_string());
}
};
@@ -238,7 +238,7 @@ template<>
struct Formatter<PDF::OutlineItem> : Formatter<FormatString> {
ErrorOr<void> format(FormatBuilder& builder, PDF::OutlineItem const& item)
{
- return builder.put_string(item.to_string(0));
+ return builder.put_string(item.to_deprecated_string(0));
}
};
@@ -249,11 +249,11 @@ struct Formatter<PDF::OutlineDict> : Formatter<FormatString> {
StringBuilder child_builder;
child_builder.append('[');
for (auto& child : dict.children)
- child_builder.appendff("{}\n", child.to_string(2));
+ child_builder.appendff("{}\n", child.to_deprecated_string(2));
child_builder.append(" ]"sv);
return Formatter<FormatString>::format(builder,
- "OutlineDict {{\n count={}\n children={}\n}}"sv, dict.count, child_builder.to_string());
+ "OutlineDict {{\n count={}\n children={}\n}}"sv, dict.count, child_builder.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibPDF/DocumentParser.cpp b/Userland/Libraries/LibPDF/DocumentParser.cpp
index 7212645665..2da3eae5a2 100644
--- a/Userland/Libraries/LibPDF/DocumentParser.cpp
+++ b/Userland/Libraries/LibPDF/DocumentParser.cpp
@@ -741,7 +741,7 @@ struct Formatter<PDF::DocumentParser::LinearizationDictionary> : Formatter<Strin
builder.appendff(" offset_of_main_xref_table={}\n", dict.offset_of_main_xref_table);
builder.appendff(" first_page={}\n", dict.first_page);
builder.append('}');
- return Formatter<StringView>::format(format_builder, builder.to_string());
+ return Formatter<StringView>::format(format_builder, builder.to_deprecated_string());
}
};
@@ -765,7 +765,7 @@ struct Formatter<PDF::DocumentParser::PageOffsetHintTable> : Formatter<StringVie
builder.appendff(" bits_required_for_fraction_numerator={}\n", table.bits_required_for_fraction_numerator);
builder.appendff(" shared_object_reference_fraction_denominator={}\n", table.shared_object_reference_fraction_denominator);
builder.append('}');
- return Formatter<StringView>::format(format_builder, builder.to_string());
+ return Formatter<StringView>::format(format_builder, builder.to_deprecated_string());
}
};
@@ -789,7 +789,7 @@ struct Formatter<PDF::DocumentParser::PageOffsetHintTableEntry> : Formatter<Stri
builder.appendff(" page_content_stream_offset_number={}\n", entry.page_content_stream_offset_number);
builder.appendff(" page_content_stream_length_number={}\n", entry.page_content_stream_length_number);
builder.append('}');
- return Formatter<StringView>::format(format_builder, builder.to_string());
+ return Formatter<StringView>::format(format_builder, builder.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibPDF/Object.h b/Userland/Libraries/LibPDF/Object.h
index ae70cefebd..0b3237e4a7 100644
--- a/Userland/Libraries/LibPDF/Object.h
+++ b/Userland/Libraries/LibPDF/Object.h
@@ -75,7 +75,7 @@ public:
}
virtual char const* type_name() const = 0;
- virtual DeprecatedString to_string(int indent) const = 0;
+ virtual DeprecatedString to_deprecated_string(int indent) const = 0;
protected:
#define ENUMERATE_TYPE(_, name) \
@@ -98,7 +98,7 @@ template<PDF::IsObject T>
struct Formatter<T> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, T const& object)
{
- return Formatter<StringView>::format(builder, object.to_string(0));
+ return Formatter<StringView>::format(builder, object.to_deprecated_string(0));
}
};
diff --git a/Userland/Libraries/LibPDF/ObjectDerivatives.cpp b/Userland/Libraries/LibPDF/ObjectDerivatives.cpp
index e6c2a26f6e..9b1e0b834d 100644
--- a/Userland/Libraries/LibPDF/ObjectDerivatives.cpp
+++ b/Userland/Libraries/LibPDF/ObjectDerivatives.cpp
@@ -36,21 +36,21 @@ static void append_indent(StringBuilder& builder, int indent)
builder.append(" "sv);
}
-DeprecatedString StringObject::to_string(int) const
+DeprecatedString StringObject::to_deprecated_string(int) const
{
if (is_binary())
return DeprecatedString::formatted("<{}>", encode_hex(string().bytes()).to_uppercase());
return DeprecatedString::formatted("({})", string());
}
-DeprecatedString NameObject::to_string(int) const
+DeprecatedString NameObject::to_deprecated_string(int) const
{
StringBuilder builder;
builder.appendff("/{}", this->name());
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString ArrayObject::to_string(int indent) const
+DeprecatedString ArrayObject::to_deprecated_string(int indent) const
{
StringBuilder builder;
builder.append("[\n"sv);
@@ -61,16 +61,16 @@ DeprecatedString ArrayObject::to_string(int indent) const
builder.append(",\n"sv);
first = false;
append_indent(builder, indent + 1);
- builder.appendff("{}", element.to_string(indent));
+ builder.appendff("{}", element.to_deprecated_string(indent));
}
builder.append('\n');
append_indent(builder, indent);
builder.append(']');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString DictObject::to_string(int indent) const
+DeprecatedString DictObject::to_deprecated_string(int indent) const
{
StringBuilder builder;
builder.append("<<\n"sv);
@@ -82,21 +82,21 @@ DeprecatedString DictObject::to_string(int indent) const
first = false;
append_indent(builder, indent + 1);
builder.appendff("/{} ", key);
- builder.appendff("{}", value.to_string(indent + 1));
+ builder.appendff("{}", value.to_deprecated_string(indent + 1));
}
builder.append('\n');
append_indent(builder, indent);
builder.append(">>"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString StreamObject::to_string(int indent) const
+DeprecatedString StreamObject::to_deprecated_string(int indent) const
{
StringBuilder builder;
builder.append("stream\n"sv);
append_indent(builder, indent);
- builder.appendff("{}\n", dict()->to_string(indent + 1));
+ builder.appendff("{}\n", dict()->to_deprecated_string(indent + 1));
append_indent(builder, indent + 1);
auto string = encode_hex(bytes());
@@ -114,19 +114,19 @@ DeprecatedString StreamObject::to_string(int indent) const
append_indent(builder, indent);
builder.append("endstream"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString IndirectValue::to_string(int indent) const
+DeprecatedString IndirectValue::to_deprecated_string(int indent) const
{
StringBuilder builder;
builder.appendff("{} {} obj\n", index(), generation_index());
append_indent(builder, indent + 1);
- builder.append(value().to_string(indent + 1));
+ builder.append(value().to_deprecated_string(indent + 1));
builder.append('\n');
append_indent(builder, indent);
builder.append("endobj"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibPDF/ObjectDerivatives.h b/Userland/Libraries/LibPDF/ObjectDerivatives.h
index d98fed63c3..7375d5f1d5 100644
--- a/Userland/Libraries/LibPDF/ObjectDerivatives.h
+++ b/Userland/Libraries/LibPDF/ObjectDerivatives.h
@@ -32,7 +32,7 @@ public:
void set_string(DeprecatedString string) { m_string = move(string); }
char const* type_name() const override { return "string"; }
- DeprecatedString to_string(int indent) const override;
+ DeprecatedString to_deprecated_string(int indent) const override;
protected:
bool is_string() const override { return true; }
@@ -54,7 +54,7 @@ public:
[[nodiscard]] ALWAYS_INLINE FlyString const& name() const { return m_name; }
char const* type_name() const override { return "name"; }
- DeprecatedString to_string(int indent) const override;
+ DeprecatedString to_deprecated_string(int indent) const override;
protected:
bool is_name() const override { return true; }
@@ -90,7 +90,7 @@ public:
{
return "array";
}
- DeprecatedString to_string(int indent) const override;
+ DeprecatedString to_deprecated_string(int indent) const override;
protected:
bool is_array() const override { return true; }
@@ -136,7 +136,7 @@ public:
{
return "dict";
}
- DeprecatedString to_string(int indent) const override;
+ DeprecatedString to_deprecated_string(int indent) const override;
protected:
bool is_dict() const override { return true; }
@@ -160,7 +160,7 @@ public:
[[nodiscard]] ByteBuffer& buffer() { return m_buffer; };
char const* type_name() const override { return "stream"; }
- DeprecatedString to_string(int indent) const override;
+ DeprecatedString to_deprecated_string(int indent) const override;
private:
bool is_stream() const override { return true; }
@@ -184,7 +184,7 @@ public:
[[nodiscard]] ALWAYS_INLINE Value const& value() const { return m_value; }
char const* type_name() const override { return "indirect_object"; }
- DeprecatedString to_string(int indent) const override;
+ DeprecatedString to_deprecated_string(int indent) const override;
protected:
bool is_indirect_value() const override { return true; }
diff --git a/Userland/Libraries/LibPDF/Operator.h b/Userland/Libraries/LibPDF/Operator.h
index 4ab1062398..4ec3fc3cd7 100644
--- a/Userland/Libraries/LibPDF/Operator.h
+++ b/Userland/Libraries/LibPDF/Operator.h
@@ -180,7 +180,7 @@ struct Formatter<PDF::Operator> : Formatter<StringView> {
builder.append(" ]"sv);
}
- return Formatter<StringView>::format(format_builder, builder.to_string());
+ return Formatter<StringView>::format(format_builder, builder.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibPDF/Parser.cpp b/Userland/Libraries/LibPDF/Parser.cpp
index 245162b695..9599ba899c 100644
--- a/Userland/Libraries/LibPDF/Parser.cpp
+++ b/Userland/Libraries/LibPDF/Parser.cpp
@@ -233,7 +233,7 @@ PDFErrorOr<NonnullRefPtr<NameObject>> Parser::parse_name()
m_reader.consume_whitespace();
- return make_object<NameObject>(builder.to_string());
+ return make_object<NameObject>(builder.to_deprecated_string());
}
NonnullRefPtr<StringObject> Parser::parse_string()
@@ -347,7 +347,7 @@ DeprecatedString Parser::parse_literal_string()
}
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
DeprecatedString Parser::parse_hex_string()
@@ -359,7 +359,7 @@ DeprecatedString Parser::parse_hex_string()
while (true) {
if (m_reader.matches('>')) {
m_reader.consume();
- return builder.to_string();
+ return builder.to_deprecated_string();
} else {
int hex_value = 0;
@@ -372,7 +372,7 @@ DeprecatedString Parser::parse_hex_string()
m_reader.consume();
hex_value *= 16;
builder.append(static_cast<char>(hex_value));
- return builder.to_string();
+ return builder.to_deprecated_string();
}
VERIFY(isxdigit(ch));
diff --git a/Userland/Libraries/LibPDF/Renderer.h b/Userland/Libraries/LibPDF/Renderer.h
index be4341bc00..9ca5cab815 100644
--- a/Userland/Libraries/LibPDF/Renderer.h
+++ b/Userland/Libraries/LibPDF/Renderer.h
@@ -193,7 +193,7 @@ struct Formatter<PDF::LineDashPattern> : Formatter<StringView> {
}
builder.appendff("] {}", pattern.phase);
- return format_builder.put_string(builder.to_string());
+ return format_builder.put_string(builder.to_deprecated_string());
}
};
@@ -237,7 +237,7 @@ struct Formatter<PDF::TextState> : Formatter<StringView> {
builder.appendff(" rise={}\n", state.rise);
builder.appendff(" knockout={}\n", state.knockout);
builder.append(" }"sv);
- return format_builder.put_string(builder.to_string());
+ return format_builder.put_string(builder.to_deprecated_string());
}
};
@@ -257,7 +257,7 @@ struct Formatter<PDF::GraphicsState> : Formatter<StringView> {
builder.appendff(" line_dash_pattern={}\n", state.line_dash_pattern);
builder.appendff(" text_state={}\n", state.text_state);
builder.append('}');
- return format_builder.put_string(builder.to_string());
+ return format_builder.put_string(builder.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibPDF/Value.cpp b/Userland/Libraries/LibPDF/Value.cpp
index a95da9774b..b95d619f0c 100644
--- a/Userland/Libraries/LibPDF/Value.cpp
+++ b/Userland/Libraries/LibPDF/Value.cpp
@@ -9,7 +9,7 @@
namespace PDF {
-DeprecatedString Value::to_string(int indent) const
+DeprecatedString Value::to_deprecated_string(int indent) const
{
return visit(
[&](Empty const&) -> DeprecatedString {
@@ -32,7 +32,7 @@ DeprecatedString Value::to_string(int indent) const
return DeprecatedString::formatted("{} {} R", ref.as_ref_index(), ref.as_ref_generation_index());
},
[&](NonnullRefPtr<Object> const& object) {
- return object->to_string(indent);
+ return object->to_deprecated_string(indent);
});
}
diff --git a/Userland/Libraries/LibPDF/Value.h b/Userland/Libraries/LibPDF/Value.h
index 4c7ebe21fd..4144b09a15 100644
--- a/Userland/Libraries/LibPDF/Value.h
+++ b/Userland/Libraries/LibPDF/Value.h
@@ -36,7 +36,7 @@ public:
set<NonnullRefPtr<Object>>(*refptr);
}
- [[nodiscard]] DeprecatedString to_string(int indent = 0) const;
+ [[nodiscard]] DeprecatedString to_deprecated_string(int indent = 0) const;
[[nodiscard]] ALWAYS_INLINE bool has_number() const { return has<int>() || has<float>(); }
@@ -95,7 +95,7 @@ template<>
struct Formatter<PDF::Value> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, PDF::Value const& value)
{
- return Formatter<StringView>::format(builder, value.to_string());
+ return Formatter<StringView>::format(builder, value.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibPDF/XRefTable.h b/Userland/Libraries/LibPDF/XRefTable.h
index 9a2ffd4c7b..ab289f0d2b 100644
--- a/Userland/Libraries/LibPDF/XRefTable.h
+++ b/Userland/Libraries/LibPDF/XRefTable.h
@@ -140,7 +140,7 @@ struct Formatter<PDF::XRefTable> : Formatter<StringView> {
for (auto& entry : table.m_entries)
builder.appendff("\n {}", entry);
builder.append("\n}"sv);
- return Formatter<StringView>::format(format_builder, builder.to_string());
+ return Formatter<StringView>::format(format_builder, builder.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibRegex/RegexByteCode.cpp b/Userland/Libraries/LibRegex/RegexByteCode.cpp
index c406a04007..f3e669c00f 100644
--- a/Userland/Libraries/LibRegex/RegexByteCode.cpp
+++ b/Userland/Libraries/LibRegex/RegexByteCode.cpp
@@ -398,7 +398,7 @@ ALWAYS_INLINE ExecutionResult OpCode_SaveRightCaptureGroup::execute(MatchInput c
auto view = input.view.substring_view(start_position, length);
if (input.regex_options & AllFlags::StringCopyMatches) {
- match = { view.to_string(), input.line, start_position, input.global_offset + start_position }; // create a copy of the original string
+ match = { view.to_deprecated_string(), input.line, start_position, input.global_offset + start_position }; // create a copy of the original string
} else {
match = { view, input.line, start_position, input.global_offset + start_position }; // take view to original string
}
@@ -423,7 +423,7 @@ ALWAYS_INLINE ExecutionResult OpCode_SaveRightNamedCaptureGroup::execute(MatchIn
auto view = input.view.substring_view(start_position, length);
if (input.regex_options & AllFlags::StringCopyMatches) {
- match = { view.to_string(), name(), input.line, start_position, input.global_offset + start_position }; // create a copy of the original string
+ match = { view.to_deprecated_string(), name(), input.line, start_position, input.global_offset + start_position }; // create a copy of the original string
} else {
match = { view, name(), input.line, start_position, input.global_offset + start_position }; // take view to original string
}
@@ -927,7 +927,7 @@ Vector<CompareTypeAndValuePair> OpCode_Compare::flat_compares() const
return result;
}
-Vector<DeprecatedString> OpCode_Compare::variable_arguments_to_string(Optional<MatchInput const&> input) const
+Vector<DeprecatedString> OpCode_Compare::variable_arguments_to_deprecated_string(Optional<MatchInput const&> input) const
{
Vector<DeprecatedString> result;
@@ -952,9 +952,9 @@ Vector<DeprecatedString> OpCode_Compare::variable_arguments_to_string(Optional<M
if (is_ascii) {
result.empend(DeprecatedString::formatted(
" compare against: '{}'",
- view.substring_view(string_start_offset, string_start_offset > view.length() ? 0 : 1).to_string()));
+ view.substring_view(string_start_offset, string_start_offset > view.length() ? 0 : 1).to_deprecated_string()));
} else {
- auto str = view.substring_view(string_start_offset, string_start_offset > view.length() ? 0 : 1).to_string();
+ auto str = view.substring_view(string_start_offset, string_start_offset > view.length() ? 0 : 1).to_deprecated_string();
u8 buf[8] { 0 };
__builtin_memcpy(buf, str.characters(), min(str.length(), sizeof(buf)));
result.empend(DeprecatedString::formatted(" compare against: {:x},{:x},{:x},{:x},{:x},{:x},{:x},{:x}",
@@ -988,21 +988,21 @@ Vector<DeprecatedString> OpCode_Compare::variable_arguments_to_string(Optional<M
if (!view.is_null() && view.length() > state().string_position)
result.empend(DeprecatedString::formatted(
" compare against: \"{}\"",
- input.value().view.substring_view(string_start_offset, string_start_offset + length > view.length() ? 0 : length).to_string()));
+ input.value().view.substring_view(string_start_offset, string_start_offset + length > view.length() ? 0 : length).to_deprecated_string()));
} else if (compare_type == CharacterCompareType::CharClass) {
auto character_class = (CharClass)m_bytecode->at(offset++);
result.empend(DeprecatedString::formatted(" ch_class={} [{}]", (size_t)character_class, character_class_name(character_class)));
if (!view.is_null() && view.length() > state().string_position)
result.empend(DeprecatedString::formatted(
" compare against: '{}'",
- input.value().view.substring_view(string_start_offset, state().string_position > view.length() ? 0 : 1).to_string()));
+ input.value().view.substring_view(string_start_offset, state().string_position > view.length() ? 0 : 1).to_deprecated_string()));
} else if (compare_type == CharacterCompareType::CharRange) {
auto value = (CharRange)m_bytecode->at(offset++);
result.empend(DeprecatedString::formatted(" ch_range={:x}-{:x}", value.from, value.to));
if (!view.is_null() && view.length() > state().string_position)
result.empend(DeprecatedString::formatted(
" compare against: '{}'",
- input.value().view.substring_view(string_start_offset, state().string_position > view.length() ? 0 : 1).to_string()));
+ input.value().view.substring_view(string_start_offset, state().string_position > view.length() ? 0 : 1).to_deprecated_string()));
} else if (compare_type == CharacterCompareType::LookupTable) {
auto count = m_bytecode->at(offset++);
for (size_t j = 0; j < count; ++j) {
@@ -1012,7 +1012,7 @@ Vector<DeprecatedString> OpCode_Compare::variable_arguments_to_string(Optional<M
if (!view.is_null() && view.length() > state().string_position)
result.empend(DeprecatedString::formatted(
" compare against: '{}'",
- input.value().view.substring_view(string_start_offset, state().string_position > view.length() ? 0 : 1).to_string()));
+ input.value().view.substring_view(string_start_offset, state().string_position > view.length() ? 0 : 1).to_deprecated_string()));
} else if (compare_type == CharacterCompareType::GeneralCategory
|| compare_type == CharacterCompareType::Property
|| compare_type == CharacterCompareType::Script
diff --git a/Userland/Libraries/LibRegex/RegexByteCode.h b/Userland/Libraries/LibRegex/RegexByteCode.h
index 9ebc8970a2..8473dec468 100644
--- a/Userland/Libraries/LibRegex/RegexByteCode.h
+++ b/Userland/Libraries/LibRegex/RegexByteCode.h
@@ -570,7 +570,7 @@ public:
return *m_state;
}
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
return DeprecatedString::formatted("[{:#02X}] {}", (int)opcode_id(), name(opcode_id()));
}
@@ -748,7 +748,7 @@ public:
ALWAYS_INLINE size_t arguments_count() const { return argument(0); }
ALWAYS_INLINE size_t arguments_size() const { return argument(1); }
DeprecatedString arguments_string() const override;
- Vector<DeprecatedString> variable_arguments_to_string(Optional<MatchInput const&> input = {}) const;
+ Vector<DeprecatedString> variable_arguments_to_deprecated_string(Optional<MatchInput const&> input = {}) const;
Vector<CompareTypeAndValuePair> flat_compares() const;
static bool matches_character_class(CharClass, u32, bool insensitive);
diff --git a/Userland/Libraries/LibRegex/RegexDebug.h b/Userland/Libraries/LibRegex/RegexDebug.h
index a25cfb6534..d7705f53ca 100644
--- a/Userland/Libraries/LibRegex/RegexDebug.h
+++ b/Userland/Libraries/LibRegex/RegexDebug.h
@@ -61,13 +61,13 @@ public:
system.characters(),
state.instruction_position,
recursion,
- opcode.to_string().characters(),
+ opcode.to_deprecated_string().characters(),
opcode.arguments_string().characters(),
DeprecatedString::formatted("ip: {:3}, sp: {:3}", state.instruction_position, state.string_position));
if (newline)
outln();
if (newline && is<OpCode_Compare>(opcode)) {
- for (auto& line : to<OpCode_Compare>(opcode).variable_arguments_to_string())
+ for (auto& line : to<OpCode_Compare>(opcode).variable_arguments_to_deprecated_string())
outln(m_file, "{:15} | {:5} | {:9} | {:35} | {:30} | {:20}", "", "", "", "", line, "");
}
}
@@ -85,10 +85,10 @@ public:
builder.appendff(", next ip: {}", state.instruction_position + opcode.size());
}
- outln(m_file, " | {:20}", builder.to_string());
+ outln(m_file, " | {:20}", builder.to_deprecated_string());
if (is<OpCode_Compare>(opcode)) {
- for (auto& line : to<OpCode_Compare>(opcode).variable_arguments_to_string(input)) {
+ for (auto& line : to<OpCode_Compare>(opcode).variable_arguments_to_deprecated_string(input)) {
outln(m_file, "{:15} | {:5} | {:9} | {:35} | {:30} | {:20}", "", "", "", "", line, "");
}
}
@@ -104,7 +104,7 @@ public:
for (size_t i = 0; i < length; ++i) {
builder.append('=');
}
- auto str = builder.to_string();
+ auto str = builder.to_deprecated_string();
VERIFY(!str.is_empty());
outln(m_file, "{}", str);
@@ -115,7 +115,7 @@ public:
builder.append('-');
}
builder.append('\n');
- m_debug_stripline = builder.to_string();
+ m_debug_stripline = builder.to_deprecated_string();
}
private:
diff --git a/Userland/Libraries/LibRegex/RegexMatch.h b/Userland/Libraries/LibRegex/RegexMatch.h
index 5988454e7a..619fdd3c84 100644
--- a/Userland/Libraries/LibRegex/RegexMatch.h
+++ b/Userland/Libraries/LibRegex/RegexMatch.h
@@ -381,16 +381,16 @@ public:
return view;
}
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
return m_view.visit(
- [](StringView view) { return view.to_string(); },
+ [](StringView view) { return view.to_deprecated_string(); },
[](Utf16View view) { return view.to_utf8(Utf16View::AllowInvalidCodeUnits::Yes); },
[](auto& view) {
StringBuilder builder;
for (auto it = view.begin(); it != view.end(); ++it)
builder.append_code_point(*it);
- return builder.to_string();
+ return builder.to_deprecated_string();
});
}
@@ -434,8 +434,8 @@ public:
bool operator==(char const* cstring) const
{
return m_view.visit(
- [&](Utf32View) { return to_string() == cstring; },
- [&](Utf16View) { return to_string() == cstring; },
+ [&](Utf32View) { return to_deprecated_string() == cstring; },
+ [&](Utf16View) { return to_deprecated_string() == cstring; },
[&](Utf8View const& view) { return view.as_string() == cstring; },
[&](StringView view) { return view == cstring; });
}
@@ -443,8 +443,8 @@ public:
bool operator==(DeprecatedString const& string) const
{
return m_view.visit(
- [&](Utf32View) { return to_string() == string; },
- [&](Utf16View) { return to_string() == string; },
+ [&](Utf32View) { return to_deprecated_string() == string; },
+ [&](Utf16View) { return to_deprecated_string() == string; },
[&](Utf8View const& view) { return view.as_string() == string; },
[&](StringView view) { return view == string; });
}
@@ -452,8 +452,8 @@ public:
bool operator==(StringView string) const
{
return m_view.visit(
- [&](Utf32View) { return to_string() == string; },
- [&](Utf16View) { return to_string() == string; },
+ [&](Utf32View) { return to_deprecated_string() == string; },
+ [&](Utf16View) { return to_deprecated_string() == string; },
[&](Utf8View const& view) { return view.as_string() == string; },
[&](StringView view) { return view == string; });
}
@@ -464,25 +464,25 @@ public:
[&](Utf32View view) {
return view.length() == other.length() && __builtin_memcmp(view.code_points(), other.code_points(), view.length() * sizeof(u32)) == 0;
},
- [&](Utf16View) { return to_string() == RegexStringView { other }.to_string(); },
- [&](Utf8View const& view) { return view.as_string() == RegexStringView { other }.to_string(); },
- [&](StringView view) { return view == RegexStringView { other }.to_string(); });
+ [&](Utf16View) { return to_deprecated_string() == RegexStringView { other }.to_deprecated_string(); },
+ [&](Utf8View const& view) { return view.as_string() == RegexStringView { other }.to_deprecated_string(); },
+ [&](StringView view) { return view == RegexStringView { other }.to_deprecated_string(); });
}
bool operator==(Utf16View const& other) const
{
return m_view.visit(
- [&](Utf32View) { return to_string() == RegexStringView { other }.to_string(); },
+ [&](Utf32View) { return to_deprecated_string() == RegexStringView { other }.to_deprecated_string(); },
[&](Utf16View const& view) { return view == other; },
- [&](Utf8View const& view) { return view.as_string() == RegexStringView { other }.to_string(); },
- [&](StringView view) { return view == RegexStringView { other }.to_string(); });
+ [&](Utf8View const& view) { return view.as_string() == RegexStringView { other }.to_deprecated_string(); },
+ [&](StringView view) { return view == RegexStringView { other }.to_deprecated_string(); });
}
bool operator==(Utf8View const& other) const
{
return m_view.visit(
- [&](Utf32View) { return to_string() == other.as_string(); },
- [&](Utf16View) { return to_string() == other.as_string(); },
+ [&](Utf32View) { return to_deprecated_string() == other.as_string(); },
+ [&](Utf16View) { return to_deprecated_string() == other.as_string(); },
[&](Utf8View const& view) { return view.as_string() == other.as_string(); },
[&](StringView view) { return other.as_string() == view; });
}
@@ -653,7 +653,7 @@ template<>
struct AK::Formatter<regex::RegexStringView> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, regex::RegexStringView value)
{
- auto string = value.to_string();
+ auto string = value.to_deprecated_string();
return Formatter<StringView>::format(builder, string);
}
};
diff --git a/Userland/Libraries/LibRegex/RegexMatcher.cpp b/Userland/Libraries/LibRegex/RegexMatcher.cpp
index 1b2451377a..71caf5cecd 100644
--- a/Userland/Libraries/LibRegex/RegexMatcher.cpp
+++ b/Userland/Libraries/LibRegex/RegexMatcher.cpp
@@ -169,7 +169,7 @@ RegexResult Matcher<Parser>::match(Vector<RegexStringView> const& views, Optiona
VERIFY(start_position + state.string_position - start_position <= input.view.length());
if (input.regex_options.has_flag_set(AllFlags::StringCopyMatches)) {
- state.matches.at(input.match_index) = { input.view.substring_view(start_position, state.string_position - start_position).to_string(), input.line, start_position, input.global_offset + start_position };
+ state.matches.at(input.match_index) = { input.view.substring_view(start_position, state.string_position - start_position).to_deprecated_string(), input.line, start_position, input.global_offset + start_position };
} else { // let the view point to the original string ...
state.matches.at(input.match_index) = { input.view.substring_view(start_position, state.string_position - start_position), input.line, start_position, input.global_offset + start_position };
}
diff --git a/Userland/Libraries/LibRegex/RegexMatcher.h b/Userland/Libraries/LibRegex/RegexMatcher.h
index 4dd739a896..484d207b2d 100644
--- a/Userland/Libraries/LibRegex/RegexMatcher.h
+++ b/Userland/Libraries/LibRegex/RegexMatcher.h
@@ -123,11 +123,11 @@ public:
size_t start_offset = 0;
RegexResult result = matcher->match(view, regex_options);
if (!result.success)
- return view.to_string();
+ return view.to_deprecated_string();
for (size_t i = 0; i < result.matches.size(); ++i) {
auto& match = result.matches[i];
- builder.append(view.substring_view(start_offset, match.global_offset - start_offset).to_string());
+ builder.append(view.substring_view(start_offset, match.global_offset - start_offset).to_deprecated_string());
start_offset = match.global_offset + match.view.length();
GenericLexer lexer(replacement_pattern);
while (!lexer.is_eof()) {
@@ -138,7 +138,7 @@ public:
}
auto number = lexer.consume_while(isdigit);
if (auto index = number.to_uint(); index.has_value() && result.n_capture_groups >= index.value()) {
- builder.append(result.capture_group_matches[i][index.value() - 1].view.to_string());
+ builder.append(result.capture_group_matches[i][index.value() - 1].view.to_deprecated_string());
} else {
builder.appendff("\\{}", number);
}
@@ -148,9 +148,9 @@ public:
}
}
- builder.append(view.substring_view(start_offset, view.length() - start_offset).to_string());
+ builder.append(view.substring_view(start_offset, view.length() - start_offset).to_deprecated_string());
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// FIXME: replace(Vector<RegexStringView> const , ...)
diff --git a/Userland/Libraries/LibSQL/AST/Expression.cpp b/Userland/Libraries/LibSQL/AST/Expression.cpp
index 63a39c3b21..043670b5b4 100644
--- a/Userland/Libraries/LibSQL/AST/Expression.cpp
+++ b/Userland/Libraries/LibSQL/AST/Expression.cpp
@@ -56,9 +56,9 @@ ResultOr<Value> BinaryOperatorExpression::evaluate(ExecutionContext& context) co
return Result { SQLCommand::Unknown, SQLErrorCode::BooleanOperatorTypeMismatch, BinaryOperator_name(type()) };
AK::StringBuilder builder;
- builder.append(lhs_value.to_string());
- builder.append(rhs_value.to_string());
- return Value(builder.to_string());
+ builder.append(lhs_value.to_deprecated_string());
+ builder.append(rhs_value.to_deprecated_string());
+ return Value(builder.to_deprecated_string());
}
case BinaryOperator::Multiplication:
return lhs_value.multiply(rhs_value);
@@ -181,7 +181,7 @@ ResultOr<Value> MatchExpression::evaluate(ExecutionContext& context) const
char escape_char = '\0';
if (escape()) {
- auto escape_str = TRY(escape()->evaluate(context)).to_string();
+ auto escape_str = TRY(escape()->evaluate(context)).to_deprecated_string();
if (escape_str.length() != 1)
return Result { SQLCommand::Unknown, SQLErrorCode::SyntaxError, "ESCAPE should be a single character" };
escape_char = escape_str[0];
@@ -192,7 +192,7 @@ ResultOr<Value> MatchExpression::evaluate(ExecutionContext& context) const
bool escaped = false;
AK::StringBuilder builder;
builder.append('^');
- for (auto c : rhs_value.to_string()) {
+ for (auto c : rhs_value.to_deprecated_string()) {
if (escape() && c == escape_char && !escaped) {
escaped = true;
} else if (s_posix_basic_metacharacters.contains(c)) {
@@ -212,14 +212,14 @@ ResultOr<Value> MatchExpression::evaluate(ExecutionContext& context) const
// FIXME: We should probably cache this regex.
auto regex = Regex<PosixBasic>(builder.build());
- auto result = regex.match(lhs_value.to_string(), PosixFlags::Insensitive | PosixFlags::Unicode);
+ auto result = regex.match(lhs_value.to_deprecated_string(), PosixFlags::Insensitive | PosixFlags::Unicode);
return Value(invert_expression() ? !result.success : result.success);
}
case MatchOperator::Regexp: {
Value lhs_value = TRY(lhs()->evaluate(context));
Value rhs_value = TRY(rhs()->evaluate(context));
- auto regex = Regex<PosixExtended>(rhs_value.to_string());
+ auto regex = Regex<PosixExtended>(rhs_value.to_deprecated_string());
auto err = regex.parser_result.error;
if (err != regex::Error::NoError) {
StringBuilder builder;
@@ -229,7 +229,7 @@ ResultOr<Value> MatchExpression::evaluate(ExecutionContext& context) const
return Result { SQLCommand::Unknown, SQLErrorCode::SyntaxError, builder.build() };
}
- auto result = regex.match(lhs_value.to_string(), PosixFlags::Insensitive | PosixFlags::Unicode);
+ auto result = regex.match(lhs_value.to_deprecated_string(), PosixFlags::Insensitive | PosixFlags::Unicode);
return Value(invert_expression() ? !result.success : result.success);
}
case MatchOperator::Glob:
diff --git a/Userland/Libraries/LibSQL/AST/Parser.h b/Userland/Libraries/LibSQL/AST/Parser.h
index 1a3d66c583..64e0d9f6ad 100644
--- a/Userland/Libraries/LibSQL/AST/Parser.h
+++ b/Userland/Libraries/LibSQL/AST/Parser.h
@@ -26,7 +26,7 @@ class Parser {
DeprecatedString message;
SourcePosition position;
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
return DeprecatedString::formatted("{} (line: {}, column: {})", message, position.line, position.column);
}
diff --git a/Userland/Libraries/LibSQL/HashIndex.cpp b/Userland/Libraries/LibSQL/HashIndex.cpp
index bde86fbb7d..f913cec43b 100644
--- a/Userland/Libraries/LibSQL/HashIndex.cpp
+++ b/Userland/Libraries/LibSQL/HashIndex.cpp
@@ -102,7 +102,7 @@ void HashBucket::deserialize(Serializer& serializer)
dbgln_if(SQL_DEBUG, "Bucket has {} keys", size);
for (auto ix = 0u; ix < size; ix++) {
auto key = serializer.deserialize<Key>(m_hash_index.descriptor());
- dbgln_if(SQL_DEBUG, "Key {}: {}", ix, key.to_string());
+ dbgln_if(SQL_DEBUG, "Key {}: {}", ix, key.to_deprecated_string());
m_entries.append(key);
}
m_inflated = true;
@@ -136,7 +136,7 @@ bool HashBucket::insert(Key const& key)
return false;
}
if ((length() + key.length()) > BLOCKSIZE) {
- dbgln_if(SQL_DEBUG, "Adding key {} would make length exceed block size", key.to_string());
+ dbgln_if(SQL_DEBUG, "Adding key {} would make length exceed block size", key.to_deprecated_string());
return false;
}
m_entries.append(key);
@@ -202,7 +202,7 @@ void HashBucket::list_bucket()
warnln("Bucket #{} size {} local depth {} pointer {}{}",
index(), size(), local_depth(), pointer(), (pointer() ? "" : " (VIRTUAL)"));
for (auto& key : entries()) {
- warnln(" {} hash {}", key.to_string(), key.hash());
+ warnln(" {} hash {}", key.to_deprecated_string(), key.hash());
}
}
@@ -253,7 +253,7 @@ HashBucket* HashIndex::get_bucket_for_insert(Key const& key)
auto key_hash = key.hash();
do {
- dbgln_if(SQL_DEBUG, "HashIndex::get_bucket_for_insert({}) bucket {} of {}", key.to_string(), key_hash % size(), size());
+ dbgln_if(SQL_DEBUG, "HashIndex::get_bucket_for_insert({}) bucket {} of {}", key.to_deprecated_string(), key_hash % size(), size());
auto bucket = get_bucket(key_hash % size());
if (bucket->length() + key.length() < BLOCKSIZE) {
return bucket;
@@ -349,7 +349,7 @@ Optional<u32> HashIndex::get(Key& key)
{
auto hash = key.hash();
auto bucket_index = hash % size();
- dbgln_if(SQL_DEBUG, "HashIndex::get({}) bucket_index {}", key.to_string(), bucket_index);
+ dbgln_if(SQL_DEBUG, "HashIndex::get({}) bucket_index {}", key.to_deprecated_string(), bucket_index);
auto bucket = get_bucket(bucket_index);
if constexpr (SQL_DEBUG)
bucket->list_bucket();
@@ -358,7 +358,7 @@ Optional<u32> HashIndex::get(Key& key)
bool HashIndex::insert(Key const& key)
{
- dbgln_if(SQL_DEBUG, "HashIndex::insert({})", key.to_string());
+ dbgln_if(SQL_DEBUG, "HashIndex::insert({})", key.to_deprecated_string());
auto bucket = get_bucket_for_insert(key);
bucket->insert(key);
if constexpr (SQL_DEBUG)
diff --git a/Userland/Libraries/LibSQL/Meta.cpp b/Userland/Libraries/LibSQL/Meta.cpp
index eab715d72f..3924a601f5 100644
--- a/Userland/Libraries/LibSQL/Meta.cpp
+++ b/Userland/Libraries/LibSQL/Meta.cpp
@@ -21,7 +21,7 @@ SchemaDef::SchemaDef(DeprecatedString name)
}
SchemaDef::SchemaDef(Key const& key)
- : Relation(key["schema_name"].to_string())
+ : Relation(key["schema_name"].to_deprecated_string())
{
}
@@ -186,7 +186,7 @@ void TableDef::append_column(Key const& column)
auto column_type = column["column_type"].to_int();
VERIFY(column_type.has_value());
- append_column(column["column_name"].to_string(), static_cast<SQLType>(*column_type));
+ append_column(column["column_name"].to_deprecated_string(), static_cast<SQLType>(*column_type));
}
Key TableDef::make_key(SchemaDef const& schema_def)
diff --git a/Userland/Libraries/LibSQL/Serializer.h b/Userland/Libraries/LibSQL/Serializer.h
index 848b4bc72e..71903ca973 100644
--- a/Userland/Libraries/LibSQL/Serializer.h
+++ b/Userland/Libraries/LibSQL/Serializer.h
@@ -164,8 +164,8 @@ private:
}
StringBuilder bytes_builder;
bytes_builder.join(' ', bytes);
- builder.append(bytes_builder.to_string());
- dbgln(builder.to_string());
+ builder.append(bytes_builder.to_deprecated_string());
+ dbgln(builder.to_deprecated_string());
}
ByteBuffer m_buffer {};
diff --git a/Userland/Libraries/LibSQL/TreeNode.cpp b/Userland/Libraries/LibSQL/TreeNode.cpp
index a16016ed3e..9f2f74d5b9 100644
--- a/Userland/Libraries/LibSQL/TreeNode.cpp
+++ b/Userland/Libraries/LibSQL/TreeNode.cpp
@@ -153,7 +153,7 @@ size_t TreeNode::length() const
bool TreeNode::insert(Key const& key)
{
- dbgln_if(SQL_DEBUG, "[#{}] INSERT({})", pointer(), key.to_string());
+ dbgln_if(SQL_DEBUG, "[#{}] INSERT({})", pointer(), key.to_deprecated_string());
if (!is_leaf())
return node_for(key)->insert_in_leaf(key);
return insert_in_leaf(key);
@@ -161,14 +161,14 @@ bool TreeNode::insert(Key const& key)
bool TreeNode::update_key_pointer(Key const& key)
{
- dbgln_if(SQL_DEBUG, "[#{}] UPDATE({}, {})", pointer(), key.to_string(), key.pointer());
+ dbgln_if(SQL_DEBUG, "[#{}] UPDATE({}, {})", pointer(), key.to_deprecated_string(), key.pointer());
if (!is_leaf())
return node_for(key)->update_key_pointer(key);
for (auto ix = 0u; ix < size(); ix++) {
if (key == m_entries[ix]) {
dbgln_if(SQL_DEBUG, "[#{}] {} == {}",
- pointer(), key.to_string(), m_entries[ix].to_string());
+ pointer(), key.to_deprecated_string(), m_entries[ix].to_deprecated_string());
if (m_entries[ix].pointer() != key.pointer()) {
m_entries[ix].set_pointer(key.pointer());
dump_if(SQL_DEBUG, "To WAL");
@@ -186,13 +186,13 @@ bool TreeNode::insert_in_leaf(Key const& key)
if (!m_tree.duplicates_allowed()) {
for (auto& entry : m_entries) {
if (key == entry) {
- dbgln_if(SQL_DEBUG, "[#{}] duplicate key {}", pointer(), key.to_string());
+ dbgln_if(SQL_DEBUG, "[#{}] duplicate key {}", pointer(), key.to_deprecated_string());
return false;
}
}
}
- dbgln_if(SQL_DEBUG, "[#{}] insert_in_leaf({})", pointer(), key.to_string());
+ dbgln_if(SQL_DEBUG, "[#{}] insert_in_leaf({})", pointer(), key.to_deprecated_string());
just_insert(key, nullptr);
return true;
}
@@ -209,7 +209,7 @@ TreeNode* TreeNode::down_node(size_t ix)
TreeNode* TreeNode::node_for(Key const& key)
{
- dump_if(SQL_DEBUG, DeprecatedString::formatted("node_for(Key {})", key.to_string()));
+ dump_if(SQL_DEBUG, DeprecatedString::formatted("node_for(Key {})", key.to_deprecated_string()));
if (is_leaf())
return this;
for (size_t ix = 0; ix < size(); ix++) {
@@ -220,45 +220,45 @@ TreeNode* TreeNode::node_for(Key const& key)
}
}
dbgln_if(SQL_DEBUG, "[#{}] {} >= {} v{}",
- pointer(), key.to_string(), (DeprecatedString)m_entries[size() - 1], m_down[size()].pointer());
+ pointer(), key.to_deprecated_string(), (DeprecatedString)m_entries[size() - 1], m_down[size()].pointer());
return down_node(size())->node_for(key);
}
Optional<u32> TreeNode::get(Key& key)
{
- dump_if(SQL_DEBUG, DeprecatedString::formatted("get({})", key.to_string()));
+ dump_if(SQL_DEBUG, DeprecatedString::formatted("get({})", key.to_deprecated_string()));
for (auto ix = 0u; ix < size(); ix++) {
if (key < m_entries[ix]) {
if (is_leaf()) {
dbgln_if(SQL_DEBUG, "[#{}] {} < {} -> 0",
- pointer(), key.to_string(), (DeprecatedString)m_entries[ix]);
+ pointer(), key.to_deprecated_string(), (DeprecatedString)m_entries[ix]);
return {};
} else {
dbgln_if(SQL_DEBUG, "[{}] {} < {} ({} -> {})",
- pointer(), key.to_string(), (DeprecatedString)m_entries[ix],
+ pointer(), key.to_deprecated_string(), (DeprecatedString)m_entries[ix],
ix, m_down[ix].pointer());
return down_node(ix)->get(key);
}
}
if (key == m_entries[ix]) {
dbgln_if(SQL_DEBUG, "[#{}] {} == {} -> {}",
- pointer(), key.to_string(), (DeprecatedString)m_entries[ix],
+ pointer(), key.to_deprecated_string(), (DeprecatedString)m_entries[ix],
m_entries[ix].pointer());
key.set_pointer(m_entries[ix].pointer());
return m_entries[ix].pointer();
}
}
if (m_entries.is_empty()) {
- dbgln_if(SQL_DEBUG, "[#{}] {} Empty node??", pointer(), key.to_string());
+ dbgln_if(SQL_DEBUG, "[#{}] {} Empty node??", pointer(), key.to_deprecated_string());
VERIFY_NOT_REACHED();
}
if (is_leaf()) {
dbgln_if(SQL_DEBUG, "[#{}] {} > {} -> 0",
- pointer(), key.to_string(), (DeprecatedString)m_entries[size() - 1]);
+ pointer(), key.to_deprecated_string(), (DeprecatedString)m_entries[size() - 1]);
return {};
}
dbgln_if(SQL_DEBUG, "[#{}] {} > {} ({} -> {})",
- pointer(), key.to_string(), (DeprecatedString)m_entries[size() - 1],
+ pointer(), key.to_deprecated_string(), (DeprecatedString)m_entries[size() - 1],
size(), m_down[size()].pointer());
return down_node(size())->get(key);
}
@@ -381,7 +381,7 @@ void TreeNode::list_node(int indent)
down_node(ix)->list_node(indent + 2);
}
do_indent();
- warnln("{}", m_entries[ix].to_string());
+ warnln("{}", m_entries[ix].to_deprecated_string());
}
if (!is_leaf()) {
down_node(size())->list_node(indent + 2);
diff --git a/Userland/Libraries/LibSQL/Tuple.cpp b/Userland/Libraries/LibSQL/Tuple.cpp
index cbfb077082..093bca530d 100644
--- a/Userland/Libraries/LibSQL/Tuple.cpp
+++ b/Userland/Libraries/LibSQL/Tuple.cpp
@@ -161,14 +161,14 @@ size_t Tuple::length() const
return len;
}
-DeprecatedString Tuple::to_string() const
+DeprecatedString Tuple::to_deprecated_string() const
{
StringBuilder builder;
for (auto& part : m_data) {
if (!builder.is_empty()) {
builder.append('|');
}
- builder.append(part.to_string());
+ builder.append(part.to_deprecated_string());
}
if (pointer() != 0) {
builder.appendff(":{}", pointer());
@@ -176,11 +176,11 @@ DeprecatedString Tuple::to_string() const
return builder.build();
}
-Vector<DeprecatedString> Tuple::to_string_vector() const
+Vector<DeprecatedString> Tuple::to_deprecated_string_vector() const
{
Vector<DeprecatedString> ret;
for (auto& value : m_data) {
- ret.append(value.to_string());
+ ret.append(value.to_deprecated_string());
}
return ret;
}
diff --git a/Userland/Libraries/LibSQL/Tuple.h b/Userland/Libraries/LibSQL/Tuple.h
index bf2d1c0db4..d4a1e6a5f5 100644
--- a/Userland/Libraries/LibSQL/Tuple.h
+++ b/Userland/Libraries/LibSQL/Tuple.h
@@ -35,9 +35,9 @@ public:
Tuple& operator=(Tuple const&);
- [[nodiscard]] DeprecatedString to_string() const;
- explicit operator DeprecatedString() const { return to_string(); }
- [[nodiscard]] Vector<DeprecatedString> to_string_vector() const;
+ [[nodiscard]] DeprecatedString to_deprecated_string() const;
+ explicit operator DeprecatedString() const { return to_deprecated_string(); }
+ [[nodiscard]] Vector<DeprecatedString> to_deprecated_string_vector() const;
bool operator<(Tuple const& other) const { return compare(other) < 0; }
bool operator<=(Tuple const& other) const { return compare(other) <= 0; }
diff --git a/Userland/Libraries/LibSQL/TupleDescriptor.h b/Userland/Libraries/LibSQL/TupleDescriptor.h
index e9f30850b0..26f3410228 100644
--- a/Userland/Libraries/LibSQL/TupleDescriptor.h
+++ b/Userland/Libraries/LibSQL/TupleDescriptor.h
@@ -39,7 +39,7 @@ struct TupleElementDescriptor {
return (sizeof(u32) + name.length()) + 2 * sizeof(u8);
}
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
return DeprecatedString::formatted(" name: {} type: {} order: {}", name, SQLType_name(type), Order_name(order));
}
@@ -91,11 +91,11 @@ public:
return len;
}
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
Vector<DeprecatedString> elements;
for (auto& element : *this) {
- elements.append(element.to_string());
+ elements.append(element.to_deprecated_string());
}
return DeprecatedString::formatted("[\n{}\n]", DeprecatedString::join('\n', elements));
}
diff --git a/Userland/Libraries/LibSQL/Value.cpp b/Userland/Libraries/LibSQL/Value.cpp
index e65030fb64..7f7f5c841b 100644
--- a/Userland/Libraries/LibSQL/Value.cpp
+++ b/Userland/Libraries/LibSQL/Value.cpp
@@ -105,7 +105,7 @@ bool Value::is_null() const
return !m_value.has_value();
}
-DeprecatedString Value::to_string() const
+DeprecatedString Value::to_deprecated_string() const
{
if (is_null())
return "(null)"sv;
@@ -346,7 +346,7 @@ int Value::compare(Value const& other) const
return 1;
return m_value->visit(
- [&](DeprecatedString const& value) -> int { return value.view().compare(other.to_string()); },
+ [&](DeprecatedString const& value) -> int { return value.view().compare(other.to_deprecated_string()); },
[&](int value) -> int {
auto casted = other.to_int();
if (!casted.has_value())
@@ -407,7 +407,7 @@ bool Value::operator==(Value const& value) const
bool Value::operator==(StringView value) const
{
- return to_string() == value;
+ return to_deprecated_string() == value;
}
bool Value::operator==(int value) const
diff --git a/Userland/Libraries/LibSQL/Value.h b/Userland/Libraries/LibSQL/Value.h
index ff5054bea0..8ae98a4102 100644
--- a/Userland/Libraries/LibSQL/Value.h
+++ b/Userland/Libraries/LibSQL/Value.h
@@ -49,7 +49,7 @@ public:
[[nodiscard]] StringView type_name() const;
[[nodiscard]] bool is_null() const;
- [[nodiscard]] DeprecatedString to_string() const;
+ [[nodiscard]] DeprecatedString to_deprecated_string() const;
[[nodiscard]] Optional<int> to_int() const;
[[nodiscard]] Optional<u32> to_u32() const;
[[nodiscard]] Optional<double> to_double() const;
@@ -125,6 +125,6 @@ template<>
struct AK::Formatter<SQL::Value> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, SQL::Value const& value)
{
- return Formatter<StringView>::format(builder, value.to_string());
+ return Formatter<StringView>::format(builder, value.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibSoftGPU/Device.cpp b/Userland/Libraries/LibSoftGPU/Device.cpp
index 9f6d2e7082..284daabb72 100644
--- a/Userland/Libraries/LibSoftGPU/Device.cpp
+++ b/Userland/Libraries/LibSoftGPU/Device.cpp
@@ -1579,7 +1579,7 @@ void Device::draw_statistics_overlay(Gfx::Bitmap& target)
num_rendertarget_pixels > 0 ? g_num_pixels_shaded * 100 / num_rendertarget_pixels - 100 : 0));
builder.append(DeprecatedString::formatted("Sampler calls: {}\n", g_num_sampler_calls));
- debug_string = builder.to_string();
+ debug_string = builder.to_deprecated_string();
frame_counter = 0;
timer.start();
diff --git a/Userland/Libraries/LibSymbolication/Symbolication.cpp b/Userland/Libraries/LibSymbolication/Symbolication.cpp
index 2d5733fd32..231407116d 100644
--- a/Userland/Libraries/LibSymbolication/Symbolication.cpp
+++ b/Userland/Libraries/LibSymbolication/Symbolication.cpp
@@ -187,7 +187,7 @@ Vector<Symbol> symbolicate_thread(pid_t pid, pid_t tid, IncludeSourcePosition in
for (auto& region_value : json.value().as_array().values()) {
auto& region = region_value.as_object();
- auto name = region.get("name"sv).to_string();
+ auto name = region.get("name"sv).to_deprecated_string();
auto address = region.get("address"sv).to_addr();
auto size = region.get("size"sv).to_addr();
diff --git a/Userland/Libraries/LibTLS/Certificate.cpp b/Userland/Libraries/LibTLS/Certificate.cpp
index b5cce14b86..52e0db28a3 100644
--- a/Userland/Libraries/LibTLS/Certificate.cpp
+++ b/Userland/Libraries/LibTLS/Certificate.cpp
@@ -446,7 +446,7 @@ Optional<Certificate> Certificate::parse_asn1(ReadonlyBytes buffer, bool)
// IP Address
READ_OBJECT_OR_FAIL(OctetString, StringView, ip_addr_sv, "Certificate::TBSCertificate::Extensions::$::Extension::extension_value::SubjectAlternativeName::$::IPAddress");
IPv4Address ip_addr { ip_addr_sv.bytes().data() };
- certificate.SAN.append(ip_addr.to_string());
+ certificate.SAN.append(ip_addr.to_deprecated_string());
break;
}
case 8:
diff --git a/Userland/Libraries/LibTLS/TLSv12.cpp b/Userland/Libraries/LibTLS/TLSv12.cpp
index 757cca8270..fefd7272be 100644
--- a/Userland/Libraries/LibTLS/TLSv12.cpp
+++ b/Userland/Libraries/LibTLS/TLSv12.cpp
@@ -102,12 +102,12 @@ bool Certificate::is_valid() const
auto now = Core::DateTime::now();
if (now < not_before) {
- dbgln("certificate expired (not yet valid, signed for {})", not_before.to_string());
+ dbgln("certificate expired (not yet valid, signed for {})", not_before.to_deprecated_string());
return false;
}
if (not_after < now) {
- dbgln("certificate expired (expiry date {})", not_after.to_string());
+ dbgln("certificate expired (expiry date {})", not_after.to_deprecated_string());
return false;
}
diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunner.h b/Userland/Libraries/LibTest/JavaScriptTestRunner.h
index 99cadf7884..fa7389678e 100644
--- a/Userland/Libraries/LibTest/JavaScriptTestRunner.h
+++ b/Userland/Libraries/LibTest/JavaScriptTestRunner.h
@@ -353,7 +353,7 @@ inline JSFileResult TestRunner::run_file_test(DeprecatedString const& test_path)
auto result = parse_script(m_common_path, interpreter->realm());
if (result.is_error()) {
warnln("Unable to parse test-common.js");
- warnln("{}", result.error().error.to_string());
+ warnln("{}", result.error().error.to_deprecated_string());
warnln("{}", result.error().hint);
cleanup_and_exit();
}
@@ -487,7 +487,7 @@ inline JSFileResult TestRunner::run_file_test(DeprecatedString const& test_path)
detail_builder.append(error_as_error.stack_string());
}
- test_case.details = detail_builder.to_string();
+ test_case.details = detail_builder.to_deprecated_string();
} else {
test_case.details = error.to_string_without_side_effects();
}
@@ -567,7 +567,7 @@ inline void TestRunner::print_file_result(JSFileResult const& file_result) const
outln(" {}", message);
}
print_modifiers({ FG_RED });
- outln(" {}", test_error.error.to_string());
+ outln(" {}", test_error.error.to_deprecated_string());
outln();
return;
}
diff --git a/Userland/Libraries/LibTest/TestRunner.h b/Userland/Libraries/LibTest/TestRunner.h
index 8760ab7008..73211d0340 100644
--- a/Userland/Libraries/LibTest/TestRunner.h
+++ b/Userland/Libraries/LibTest/TestRunner.h
@@ -264,7 +264,7 @@ inline void TestRunner::print_test_results_as_json() const
root.set("files_total", m_counts.files_total);
root.set("duration", m_total_elapsed_time_in_ms / 1000.0);
}
- outln("{}", root.to_string());
+ outln("{}", root.to_deprecated_string());
}
}
diff --git a/Userland/Libraries/LibTextCodec/Decoder.cpp b/Userland/Libraries/LibTextCodec/Decoder.cpp
index 71db2563b5..47f4805bd8 100644
--- a/Userland/Libraries/LibTextCodec/Decoder.cpp
+++ b/Userland/Libraries/LibTextCodec/Decoder.cpp
@@ -211,7 +211,7 @@ DeprecatedString Decoder::to_utf8(StringView input)
{
StringBuilder builder(input.length());
process(input, [&builder](u32 c) { builder.append_code_point(c); });
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void UTF8Decoder::process(StringView input, Function<void(u32)> on_code_point)
@@ -250,7 +250,7 @@ DeprecatedString UTF16BEDecoder::to_utf8(StringView input)
StringBuilder builder(bomless_input.length() / 2);
process(bomless_input, [&builder](u32 c) { builder.append_code_point(c); });
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void UTF16LEDecoder::process(StringView input, Function<void(u32)> on_code_point)
@@ -271,7 +271,7 @@ DeprecatedString UTF16LEDecoder::to_utf8(StringView input)
StringBuilder builder(bomless_input.length() / 2);
process(bomless_input, [&builder](u32 c) { builder.append_code_point(c); });
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void Latin1Decoder::process(StringView input, Function<void(u32)> on_code_point)
diff --git a/Userland/Libraries/LibUnicode/Normalize.cpp b/Userland/Libraries/LibUnicode/Normalize.cpp
index b765c0258f..55ad0877e9 100644
--- a/Userland/Libraries/LibUnicode/Normalize.cpp
+++ b/Userland/Libraries/LibUnicode/Normalize.cpp
@@ -307,7 +307,7 @@ DeprecatedString normalize(StringView string, NormalizationForm form)
builder.append_code_point(code_point);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibVT/Terminal.cpp b/Userland/Libraries/LibVT/Terminal.cpp
index 27c5e9cf4d..39cf984b7c 100644
--- a/Userland/Libraries/LibVT/Terminal.cpp
+++ b/Userland/Libraries/LibVT/Terminal.cpp
@@ -1264,7 +1264,7 @@ void Terminal::execute_osc_sequence(OscParameters parameters, u8 last_byte)
// FIXME: the split breaks titles containing semicolons.
// Should we expose the raw OSC string from the parser? Or join by semicolon?
#ifndef KERNEL
- m_current_window_title = stringview_ify(1).to_string();
+ m_current_window_title = stringview_ify(1).to_deprecated_string();
m_client.set_window_title(m_current_window_title);
#endif
}
diff --git a/Userland/Libraries/LibVT/TerminalWidget.cpp b/Userland/Libraries/LibVT/TerminalWidget.cpp
index 039a97b25a..a53d5a6b9a 100644
--- a/Userland/Libraries/LibVT/TerminalWidget.cpp
+++ b/Userland/Libraries/LibVT/TerminalWidget.cpp
@@ -980,7 +980,7 @@ DeprecatedString TerminalWidget::selected_text() const
}
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
int TerminalWidget::first_selection_column_on_row(int row) const
@@ -1153,7 +1153,7 @@ void TerminalWidget::drop_event(GUI::DropEvent& event)
if (url.scheme() == "file")
send_non_user_input(url.path().bytes());
else
- send_non_user_input(url.to_string().bytes());
+ send_non_user_input(url.to_deprecated_string().bytes());
first = false;
}
diff --git a/Userland/Libraries/LibVideo/PlaybackManager.cpp b/Userland/Libraries/LibVideo/PlaybackManager.cpp
index 2332f69494..725516dee4 100644
--- a/Userland/Libraries/LibVideo/PlaybackManager.cpp
+++ b/Userland/Libraries/LibVideo/PlaybackManager.cpp
@@ -176,7 +176,7 @@ void PlaybackManager::update_presented_frame()
debug_string_builder.append("a future frame"sv);
}
debug_string_builder.append(", checking for error and buffering"sv);
- dbgln_if(PLAYBACK_MANAGER_DEBUG, debug_string_builder.to_string());
+ dbgln_if(PLAYBACK_MANAGER_DEBUG, debug_string_builder.to_deprecated_string());
#endif
if (future_frame_item.has_value()) {
if (future_frame_item->is_error()) {
diff --git a/Userland/Libraries/LibWasm/AbstractMachine/Validator.h b/Userland/Libraries/LibWasm/AbstractMachine/Validator.h
index 29e08fae64..f8b4ef2d0c 100644
--- a/Userland/Libraries/LibWasm/AbstractMachine/Validator.h
+++ b/Userland/Libraries/LibWasm/AbstractMachine/Validator.h
@@ -306,7 +306,7 @@ private:
}
}
builder.append(']');
- return { builder.to_string() };
+ return { builder.to_deprecated_string() };
}
private:
diff --git a/Userland/Libraries/LibWasm/Parser/Parser.cpp b/Userland/Libraries/LibWasm/Parser/Parser.cpp
index f135de0334..362acf2891 100644
--- a/Userland/Libraries/LibWasm/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWasm/Parser/Parser.cpp
@@ -1364,7 +1364,7 @@ bool Module::populate_sections()
return is_ok;
}
-DeprecatedString parse_error_to_string(ParseError error)
+DeprecatedString parse_error_to_deprecated_string(ParseError error)
{
switch (error) {
case ParseError::UnexpectedEof:
diff --git a/Userland/Libraries/LibWasm/Types.h b/Userland/Libraries/LibWasm/Types.h
index 72b1cdbd1f..e9034de338 100644
--- a/Userland/Libraries/LibWasm/Types.h
+++ b/Userland/Libraries/LibWasm/Types.h
@@ -43,7 +43,7 @@ enum class ParseError {
NotImplemented,
};
-DeprecatedString parse_error_to_string(ParseError);
+DeprecatedString parse_error_to_deprecated_string(ParseError);
template<typename T>
using ParseResult = Result<T, ParseError>;
diff --git a/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp b/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
index 67f5223a37..1f7bfaa2bd 100644
--- a/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
@@ -97,7 +97,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocationObject::href_getter)
// FIXME: 1. If this's relevant Document is non-null and its origin is not same origin-domain with the entry settings object's origin, then throw a "SecurityError" DOMException.
// 2. Return this's url, serialized.
- return JS::js_string(vm, location_object->url().to_string());
+ return JS::js_string(vm, location_object->url().to_deprecated_string());
}
// https://html.spec.whatwg.org/multipage/history.html#the-location-interface:dom-location-href-2
diff --git a/Userland/Libraries/LibWeb/CSS/Angle.cpp b/Userland/Libraries/LibWeb/CSS/Angle.cpp
index fb1119fa80..91652479af 100644
--- a/Userland/Libraries/LibWeb/CSS/Angle.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Angle.cpp
@@ -41,10 +41,10 @@ Angle Angle::percentage_of(Percentage const& percentage) const
return Angle { percentage.as_fraction() * m_value, m_type };
}
-DeprecatedString Angle::to_string() const
+DeprecatedString Angle::to_deprecated_string() const
{
if (is_calculated())
- return m_calculated_style->to_string();
+ return m_calculated_style->to_deprecated_string();
return DeprecatedString::formatted("{}{}", m_value, unit_name());
}
diff --git a/Userland/Libraries/LibWeb/CSS/Angle.h b/Userland/Libraries/LibWeb/CSS/Angle.h
index 1200fb8719..10351cc28c 100644
--- a/Userland/Libraries/LibWeb/CSS/Angle.h
+++ b/Userland/Libraries/LibWeb/CSS/Angle.h
@@ -33,7 +33,7 @@ public:
bool is_calculated() const { return m_type == Type::Calculated; }
NonnullRefPtr<CalculatedStyleValue> calculated_style_value() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
float to_degrees() const;
bool operator==(Angle const& other) const
@@ -57,6 +57,6 @@ template<>
struct AK::Formatter<Web::CSS::Angle> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Angle const& angle)
{
- return Formatter<StringView>::format(builder, angle.to_string());
+ return Formatter<StringView>::format(builder, angle.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/CSSFontFaceRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSFontFaceRule.cpp
index c5e1b001a0..b4a784d66b 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSFontFaceRule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSFontFaceRule.cpp
@@ -56,9 +56,9 @@ DeprecatedString CSSFontFaceRule::serialized() const
// 2. The result of invoking serialize a comma-separated list on performing serialize a URL or serialize a LOCAL for each source on the source list.
serialize_a_comma_separated_list(builder, m_font_face.sources(), [&](FontFace::Source source) {
if (source.url.cannot_be_a_base_url()) {
- serialize_a_url(builder, source.url.to_string());
+ serialize_a_url(builder, source.url.to_deprecated_string());
} else {
- serialize_a_local(builder, source.url.to_string());
+ serialize_a_local(builder, source.url.to_deprecated_string());
}
// NOTE: No spec currently exists for format()
@@ -106,7 +106,7 @@ DeprecatedString CSSFontFaceRule::serialized() const
// 12. A single SPACE (U+0020), followed by the string "}", i.e., RIGHT CURLY BRACKET (U+007D).
builder.append(" }"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/CSSImportRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSImportRule.cpp
index 3f3c9e7d2a..e4ec8b5883 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSImportRule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSImportRule.cpp
@@ -60,7 +60,7 @@ DeprecatedString CSSImportRule::serialized() const
// 2. The result of performing serialize a URL on the rule’s location.
// FIXME: Look into the correctness of this serialization
builder.append("url("sv);
- builder.append(m_url.to_string());
+ builder.append(m_url.to_deprecated_string());
builder.append(')');
// FIXME: 3. If the rule’s associated media list is not empty, a single SPACE (U+0020) followed by the result of performing serialize a media query list on the media list.
@@ -68,7 +68,7 @@ DeprecatedString CSSImportRule::serialized() const
// 4. The string ";", i.e., SEMICOLON (U+003B).
builder.append(';');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void CSSImportRule::resource_did_fail()
diff --git a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h
index 077d8894d6..9d013690c7 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h
+++ b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h
@@ -27,7 +27,7 @@ public:
AK::URL const& url() const { return m_url; }
// FIXME: This should return only the specified part of the url. eg, "stuff/foo.css", not "https://example.com/stuff/foo.css".
- DeprecatedString href() const { return m_url.to_string(); }
+ DeprecatedString href() const { return m_url.to_deprecated_string(); }
bool has_import_result() const { return !m_style_sheet; }
CSSStyleSheet* loaded_style_sheet() { return m_style_sheet; }
diff --git a/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp
index 0b0a700640..c839371347 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp
@@ -63,7 +63,7 @@ DeprecatedString CSSMediaRule::serialized() const
// 5. A newline, followed by the string "}", i.e., RIGHT CURLY BRACKET (U+007D)
builder.append("\n}"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
index 60be8ed766..d5c4d28654 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
@@ -201,7 +201,7 @@ DeprecatedString CSSStyleDeclaration::get_property_value(StringView property_nam
auto maybe_property = property(property_id);
if (!maybe_property.has_value())
return {};
- return maybe_property->value->to_string();
+ return maybe_property->value->to_deprecated_string();
}
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertypriority
@@ -265,7 +265,7 @@ static DeprecatedString serialize_a_css_declaration(CSS::PropertyID property, De
builder.append(';');
// 7. Return s.
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// https://www.w3.org/TR/cssom/#serialize-a-css-declaration-block
@@ -291,7 +291,7 @@ DeprecatedString PropertyOwningCSSStyleDeclaration::serialized() const
// FIXME: 4. Shorthand loop: For each shorthand in shorthands, follow these substeps: ...
// 5. Let value be the result of invoking serialize a CSS value of declaration.
- auto value = declaration.value->to_string();
+ auto value = declaration.value->to_deprecated_string();
// 6. Let serialized declaration be the result of invoking serialize a CSS declaration with property name property, value value,
// and the important flag set if declaration has its important flag set.
@@ -307,7 +307,7 @@ DeprecatedString PropertyOwningCSSStyleDeclaration::serialized() const
// 4. Return list joined with " " (U+0020).
StringBuilder builder;
builder.join(' ', list);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
static CSS::PropertyID property_id_from_name(StringView name)
@@ -340,7 +340,7 @@ JS::ThrowCompletionOr<JS::Value> CSSStyleDeclaration::internal_get(JS::PropertyK
if (property_id == CSS::PropertyID::Invalid)
return Base::internal_get(name, receiver);
if (auto maybe_property = property(property_id); maybe_property.has_value())
- return { js_string(vm(), maybe_property->value->to_string()) };
+ return { js_string(vm(), maybe_property->value->to_deprecated_string()) };
return { js_string(vm(), DeprecatedString::empty()) };
}
diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleRule.cpp
index 1534f8cbf9..bef547ead4 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSStyleRule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSStyleRule.cpp
@@ -55,7 +55,7 @@ DeprecatedString CSSStyleRule::serialized() const
// 4. If decls and rules are both null, append " }" to s (i.e. a single SPACE (U+0020) followed by RIGHT CURLY BRACKET (U+007D)) and return s.
if (decls.is_null() && rules.is_null()) {
builder.append(" }"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 5. If rules is null:
@@ -67,7 +67,7 @@ DeprecatedString CSSStyleRule::serialized() const
// 3. Append " }" to s (i.e. a single SPACE (U+0020) followed by RIGHT CURLY BRACKET (U+007D)).
builder.append(" }"sv);
// 4. Return s.
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// FIXME: 6. Otherwise:
diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.cpp
index c4639d0cd1..92ee1f3fcf 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.cpp
@@ -26,7 +26,7 @@ CSSStyleSheet::CSSStyleSheet(JS::Realm& realm, CSSRuleList& rules, MediaList& me
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSStyleSheetPrototype>(realm, "CSSStyleSheet"));
if (location.has_value())
- set_location(location->to_string());
+ set_location(location->to_deprecated_string());
for (auto& rule : *m_rules)
rule.set_parent_style_sheet(this);
diff --git a/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp
index 8270dc0429..ee5eda4895 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp
@@ -25,7 +25,7 @@ CSSSupportsRule::CSSSupportsRule(JS::Realm& realm, NonnullRefPtr<Supports>&& sup
DeprecatedString CSSSupportsRule::condition_text() const
{
- return m_supports->to_string();
+ return m_supports->to_deprecated_string();
}
void CSSSupportsRule::set_condition_text(DeprecatedString text)
@@ -54,7 +54,7 @@ DeprecatedString CSSSupportsRule::serialized() const
}
builder.append("\n}"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/Display.cpp b/Userland/Libraries/LibWeb/CSS/Display.cpp
index 084f695b48..45844cef7f 100644
--- a/Userland/Libraries/LibWeb/CSS/Display.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Display.cpp
@@ -8,7 +8,7 @@
namespace Web::CSS {
-DeprecatedString Display::to_string() const
+DeprecatedString Display::to_deprecated_string() const
{
StringBuilder builder;
switch (m_type) {
@@ -99,7 +99,7 @@ DeprecatedString Display::to_string() const
}
break;
};
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/Display.h b/Userland/Libraries/LibWeb/CSS/Display.h
index 3787edc1fe..294846d108 100644
--- a/Userland/Libraries/LibWeb/CSS/Display.h
+++ b/Userland/Libraries/LibWeb/CSS/Display.h
@@ -16,7 +16,7 @@ public:
Display() = default;
~Display() = default;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool operator==(Display const& other) const
{
diff --git a/Userland/Libraries/LibWeb/CSS/Frequency.cpp b/Userland/Libraries/LibWeb/CSS/Frequency.cpp
index 6f10359ce0..73dd09f0a6 100644
--- a/Userland/Libraries/LibWeb/CSS/Frequency.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Frequency.cpp
@@ -40,10 +40,10 @@ Frequency Frequency::percentage_of(Percentage const& percentage) const
return Frequency { percentage.as_fraction() * m_value, m_type };
}
-DeprecatedString Frequency::to_string() const
+DeprecatedString Frequency::to_deprecated_string() const
{
if (is_calculated())
- return m_calculated_style->to_string();
+ return m_calculated_style->to_deprecated_string();
return DeprecatedString::formatted("{}{}", m_value, unit_name());
}
diff --git a/Userland/Libraries/LibWeb/CSS/Frequency.h b/Userland/Libraries/LibWeb/CSS/Frequency.h
index eeb3b91d6a..acf4ad1e43 100644
--- a/Userland/Libraries/LibWeb/CSS/Frequency.h
+++ b/Userland/Libraries/LibWeb/CSS/Frequency.h
@@ -30,7 +30,7 @@ public:
bool is_calculated() const { return m_type == Type::Calculated; }
NonnullRefPtr<CalculatedStyleValue> calculated_style_value() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
float to_hertz() const;
bool operator==(Frequency const& other) const
@@ -54,6 +54,6 @@ template<>
struct AK::Formatter<Web::CSS::Frequency> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Frequency const& frequency)
{
- return Formatter<StringView>::format(builder, frequency.to_string());
+ return Formatter<StringView>::format(builder, frequency.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/GridTrackPlacement.cpp b/Userland/Libraries/LibWeb/CSS/GridTrackPlacement.cpp
index 3a62a03385..f771f6c517 100644
--- a/Userland/Libraries/LibWeb/CSS/GridTrackPlacement.cpp
+++ b/Userland/Libraries/LibWeb/CSS/GridTrackPlacement.cpp
@@ -33,12 +33,12 @@ GridTrackPlacement::GridTrackPlacement()
{
}
-DeprecatedString GridTrackPlacement::to_string() const
+DeprecatedString GridTrackPlacement::to_deprecated_string() const
{
StringBuilder builder;
if (is_auto()) {
builder.append("auto"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
if (is_span()) {
builder.append("span"sv);
@@ -51,7 +51,7 @@ DeprecatedString GridTrackPlacement::to_string() const
if (has_line_name()) {
builder.append(m_line_name);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/GridTrackPlacement.h b/Userland/Libraries/LibWeb/CSS/GridTrackPlacement.h
index 048b0193b9..78300e134b 100644
--- a/Userland/Libraries/LibWeb/CSS/GridTrackPlacement.h
+++ b/Userland/Libraries/LibWeb/CSS/GridTrackPlacement.h
@@ -36,7 +36,7 @@ public:
Type type() const { return m_type; }
DeprecatedString line_name() const { return m_line_name; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool operator==(GridTrackPlacement const& other) const
{
return m_type == other.type() && m_span_count_or_position == other.raw_value();
diff --git a/Userland/Libraries/LibWeb/CSS/GridTrackSize.cpp b/Userland/Libraries/LibWeb/CSS/GridTrackSize.cpp
index 04905b638b..801dd37f7a 100644
--- a/Userland/Libraries/LibWeb/CSS/GridTrackSize.cpp
+++ b/Userland/Libraries/LibWeb/CSS/GridTrackSize.cpp
@@ -44,13 +44,13 @@ GridSize GridSize::make_auto()
return GridSize(CSS::Length::make_auto());
}
-DeprecatedString GridSize::to_string() const
+DeprecatedString GridSize::to_deprecated_string() const
{
switch (m_type) {
case Type::Length:
- return m_length.to_string();
+ return m_length.to_deprecated_string();
case Type::Percentage:
- return m_percentage.to_string();
+ return m_percentage.to_deprecated_string();
case Type::FlexibleLength:
return DeprecatedString::formatted("{}fr", m_flexible_length);
}
@@ -68,15 +68,15 @@ GridMinMax::GridMinMax(GridSize min_grid_size, GridSize max_grid_size)
{
}
-DeprecatedString GridMinMax::to_string() const
+DeprecatedString GridMinMax::to_deprecated_string() const
{
StringBuilder builder;
builder.append("minmax("sv);
- builder.appendff("{}", m_min_grid_size.to_string());
+ builder.appendff("{}", m_min_grid_size.to_deprecated_string());
builder.append(", "sv);
- builder.appendff("{}", m_max_grid_size.to_string());
+ builder.appendff("{}", m_max_grid_size.to_deprecated_string());
builder.append(")"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
GridRepeat::GridRepeat(GridTrackSizeList grid_track_size_list, int repeat_count)
@@ -96,7 +96,7 @@ GridRepeat::GridRepeat()
{
}
-DeprecatedString GridRepeat::to_string() const
+DeprecatedString GridRepeat::to_deprecated_string() const
{
StringBuilder builder;
builder.append("repeat("sv);
@@ -114,9 +114,9 @@ DeprecatedString GridRepeat::to_string() const
VERIFY_NOT_REACHED();
}
builder.append(", "sv);
- builder.appendff("{}", m_grid_track_size_list.to_string());
+ builder.appendff("{}", m_grid_track_size_list.to_deprecated_string());
builder.append(")"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
ExplicitGridTrack::ExplicitGridTrack(CSS::GridMinMax grid_minmax)
@@ -137,15 +137,15 @@ ExplicitGridTrack::ExplicitGridTrack(CSS::GridSize grid_size)
{
}
-DeprecatedString ExplicitGridTrack::to_string() const
+DeprecatedString ExplicitGridTrack::to_deprecated_string() const
{
switch (m_type) {
case Type::MinMax:
- return m_grid_minmax.to_string();
+ return m_grid_minmax.to_deprecated_string();
case Type::Repeat:
- return m_grid_repeat.to_string();
+ return m_grid_repeat.to_deprecated_string();
case Type::Default:
- return m_grid_size.to_string();
+ return m_grid_size.to_deprecated_string();
default:
VERIFY_NOT_REACHED();
}
@@ -168,7 +168,7 @@ GridTrackSizeList GridTrackSizeList::make_auto()
return GridTrackSizeList();
}
-DeprecatedString GridTrackSizeList::to_string() const
+DeprecatedString GridTrackSizeList::to_deprecated_string() const
{
StringBuilder builder;
auto print_line_names = [&](size_t index) -> void {
@@ -186,7 +186,7 @@ DeprecatedString GridTrackSizeList::to_string() const
print_line_names(i);
builder.append(" "sv);
}
- builder.append(m_track_list[i].to_string());
+ builder.append(m_track_list[i].to_deprecated_string());
if (i < m_track_list.size() - 1)
builder.append(" "sv);
}
@@ -194,7 +194,7 @@ DeprecatedString GridTrackSizeList::to_string() const
builder.append(" "sv);
print_line_names(m_track_list.size());
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/GridTrackSize.h b/Userland/Libraries/LibWeb/CSS/GridTrackSize.h
index f30d96490f..59ea90d020 100644
--- a/Userland/Libraries/LibWeb/CSS/GridTrackSize.h
+++ b/Userland/Libraries/LibWeb/CSS/GridTrackSize.h
@@ -52,7 +52,7 @@ public:
return (m_type == Type::Length && !m_length.is_auto()) || is_percentage();
}
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool operator==(GridSize const& other) const
{
return m_type == other.type()
@@ -78,7 +78,7 @@ public:
GridSize min_grid_size() const& { return m_min_grid_size; }
GridSize max_grid_size() const& { return m_max_grid_size; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool operator==(GridMinMax const& other) const
{
return m_min_grid_size == other.min_grid_size()
@@ -100,7 +100,7 @@ public:
Vector<CSS::ExplicitGridTrack> track_list() const { return m_track_list; }
Vector<Vector<DeprecatedString>> line_names() const { return m_line_names; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool operator==(GridTrackSizeList const& other) const
{
return m_line_names == other.line_names() && m_track_list == other.track_list();
@@ -133,7 +133,7 @@ public:
GridTrackSizeList grid_track_size_list() const& { return m_grid_track_size_list; }
Type type() const& { return m_type; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool operator==(GridRepeat const& other) const
{
if (m_type != other.type())
@@ -183,7 +183,7 @@ public:
Type type() const { return m_type; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool operator==(ExplicitGridTrack const& other) const
{
if (is_repeat() && other.is_repeat())
diff --git a/Userland/Libraries/LibWeb/CSS/Length.cpp b/Userland/Libraries/LibWeb/CSS/Length.cpp
index bb6efa3a2f..071ffbe478 100644
--- a/Userland/Libraries/LibWeb/CSS/Length.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Length.cpp
@@ -112,10 +112,10 @@ float Length::to_px(Layout::Node const& layout_node) const
return to_px(viewport_rect, layout_node.font().pixel_metrics(), layout_node.computed_values().font_size(), root_element->layout_node()->computed_values().font_size());
}
-DeprecatedString Length::to_string() const
+DeprecatedString Length::to_deprecated_string() const
{
if (is_calculated())
- return m_calculated_style->to_string();
+ return m_calculated_style->to_deprecated_string();
if (is_auto())
return "auto";
return DeprecatedString::formatted("{}{}", m_value, unit_name());
diff --git a/Userland/Libraries/LibWeb/CSS/Length.h b/Userland/Libraries/LibWeb/CSS/Length.h
index a8a8d3c639..f168559515 100644
--- a/Userland/Libraries/LibWeb/CSS/Length.h
+++ b/Userland/Libraries/LibWeb/CSS/Length.h
@@ -116,7 +116,7 @@ public:
}
}
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
// We have a RefPtr<CalculatedStyleValue> member, but can't include the header StyleValue.h as it includes
// this file already. To break the cyclic dependency, we must move all method definitions out.
@@ -139,6 +139,6 @@ template<>
struct AK::Formatter<Web::CSS::Length> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Length const& length)
{
- return Formatter<StringView>::format(builder, length.to_string());
+ return Formatter<StringView>::format(builder, length.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/MediaList.cpp b/Userland/Libraries/LibWeb/CSS/MediaList.cpp
index 623bd833dc..1d4ec36ede 100644
--- a/Userland/Libraries/LibWeb/CSS/MediaList.cpp
+++ b/Userland/Libraries/LibWeb/CSS/MediaList.cpp
@@ -49,7 +49,7 @@ DeprecatedString MediaList::item(u32 index) const
if (!is_supported_property_index(index))
return {};
- return m_media[index].to_string();
+ return m_media[index].to_deprecated_string();
}
// https://www.w3.org/TR/cssom-1/#dom-medialist-appendmedium
@@ -70,7 +70,7 @@ void MediaList::delete_medium(DeprecatedString medium)
if (!m)
return;
m_media.remove_all_matching([&](auto& existing) -> bool {
- return m->to_string() == existing->to_string();
+ return m->to_deprecated_string() == existing->to_deprecated_string();
});
// FIXME: If nothing was removed, then throw a NotFoundError exception.
}
@@ -100,7 +100,7 @@ JS::Value MediaList::item_value(size_t index) const
{
if (index >= m_media.size())
return JS::js_undefined();
- return JS::js_string(vm(), m_media[index].to_string());
+ return JS::js_string(vm(), m_media[index].to_deprecated_string());
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp
index e04e5995bb..84e50987bf 100644
--- a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp
+++ b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp
@@ -20,13 +20,13 @@ NonnullRefPtr<MediaQuery> MediaQuery::create_not_all()
return adopt_ref(*media_query);
}
-DeprecatedString MediaFeatureValue::to_string() const
+DeprecatedString MediaFeatureValue::to_deprecated_string() const
{
return m_value.visit(
[](ValueID const& ident) { return DeprecatedString { string_from_value_id(ident) }; },
- [](Length const& length) { return length.to_string(); },
- [](Ratio const& ratio) { return ratio.to_string(); },
- [](Resolution const& resolution) { return resolution.to_string(); },
+ [](Length const& length) { return length.to_deprecated_string(); },
+ [](Ratio const& ratio) { return ratio.to_deprecated_string(); },
+ [](Resolution const& resolution) { return resolution.to_deprecated_string(); },
[](float number) { return DeprecatedString::number(number); });
}
@@ -40,7 +40,7 @@ bool MediaFeatureValue::is_same_type(MediaFeatureValue const& other) const
[&](float) { return other.is_number(); });
}
-DeprecatedString MediaFeature::to_string() const
+DeprecatedString MediaFeature::to_deprecated_string() const
{
auto comparison_string = [](Comparison comparison) -> StringView {
switch (comparison) {
@@ -62,16 +62,16 @@ DeprecatedString MediaFeature::to_string() const
case Type::IsTrue:
return string_from_media_feature_id(m_id);
case Type::ExactValue:
- return DeprecatedString::formatted("{}:{}", string_from_media_feature_id(m_id), m_value->to_string());
+ return DeprecatedString::formatted("{}:{}", string_from_media_feature_id(m_id), m_value->to_deprecated_string());
case Type::MinValue:
- return DeprecatedString::formatted("min-{}:{}", string_from_media_feature_id(m_id), m_value->to_string());
+ return DeprecatedString::formatted("min-{}:{}", string_from_media_feature_id(m_id), m_value->to_deprecated_string());
case Type::MaxValue:
- return DeprecatedString::formatted("max-{}:{}", string_from_media_feature_id(m_id), m_value->to_string());
+ return DeprecatedString::formatted("max-{}:{}", string_from_media_feature_id(m_id), m_value->to_deprecated_string());
case Type::Range:
if (!m_range->right_comparison.has_value())
- return DeprecatedString::formatted("{} {} {}", m_range->left_value.to_string(), comparison_string(m_range->left_comparison), string_from_media_feature_id(m_id));
+ return DeprecatedString::formatted("{} {} {}", m_range->left_value.to_deprecated_string(), comparison_string(m_range->left_comparison), string_from_media_feature_id(m_id));
- return DeprecatedString::formatted("{} {} {} {} {}", m_range->left_value.to_string(), comparison_string(m_range->left_comparison), string_from_media_feature_id(m_id), comparison_string(*m_range->right_comparison), m_range->right_value->to_string());
+ return DeprecatedString::formatted("{} {} {} {} {}", m_range->left_value.to_deprecated_string(), comparison_string(m_range->left_comparison), string_from_media_feature_id(m_id), comparison_string(*m_range->right_comparison), m_range->right_value->to_deprecated_string());
}
VERIFY_NOT_REACHED();
@@ -275,17 +275,17 @@ NonnullOwnPtr<MediaCondition> MediaCondition::from_or_list(NonnullOwnPtrVector<M
return adopt_own(*result);
}
-DeprecatedString MediaCondition::to_string() const
+DeprecatedString MediaCondition::to_deprecated_string() const
{
StringBuilder builder;
builder.append('(');
switch (type) {
case Type::Single:
- builder.append(feature->to_string());
+ builder.append(feature->to_deprecated_string());
break;
case Type::Not:
builder.append("not "sv);
- builder.append(conditions.first().to_string());
+ builder.append(conditions.first().to_deprecated_string());
break;
case Type::And:
builder.join(" and "sv, conditions);
@@ -298,7 +298,7 @@ DeprecatedString MediaCondition::to_string() const
break;
}
builder.append(')');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
MatchResult MediaCondition::evaluate(HTML::Window const& window) const
@@ -318,7 +318,7 @@ MatchResult MediaCondition::evaluate(HTML::Window const& window) const
VERIFY_NOT_REACHED();
}
-DeprecatedString MediaQuery::to_string() const
+DeprecatedString MediaQuery::to_deprecated_string() const
{
StringBuilder builder;
@@ -332,10 +332,10 @@ DeprecatedString MediaQuery::to_string() const
}
if (m_media_condition) {
- builder.append(m_media_condition->to_string());
+ builder.append(m_media_condition->to_deprecated_string());
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
bool MediaQuery::evaluate(HTML::Window const& window)
@@ -389,7 +389,7 @@ DeprecatedString serialize_a_media_query_list(NonnullRefPtrVector<MediaQuery> co
// appear in the media query list, and then serialize the list.
StringBuilder builder;
builder.join(", "sv, media_queries);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
bool is_media_feature_name(StringView name)
diff --git a/Userland/Libraries/LibWeb/CSS/MediaQuery.h b/Userland/Libraries/LibWeb/CSS/MediaQuery.h
index 32388fb62a..45aab1b8f0 100644
--- a/Userland/Libraries/LibWeb/CSS/MediaQuery.h
+++ b/Userland/Libraries/LibWeb/CSS/MediaQuery.h
@@ -47,7 +47,7 @@ public:
{
}
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
bool is_ident() const { return m_value.has<ValueID>(); }
bool is_length() const { return m_value.has<Length>(); }
@@ -146,7 +146,7 @@ public:
}
bool evaluate(HTML::Window const&) const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
enum class Type {
@@ -202,7 +202,7 @@ struct MediaCondition {
static NonnullOwnPtr<MediaCondition> from_or_list(NonnullOwnPtrVector<MediaCondition>&&);
MatchResult evaluate(HTML::Window const&) const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
MediaCondition() = default;
@@ -241,7 +241,7 @@ public:
bool matches() const { return m_matches; }
bool evaluate(HTML::Window const&);
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
MediaQuery() = default;
@@ -270,7 +270,7 @@ template<>
struct Formatter<Web::CSS::MediaFeature> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::MediaFeature const& media_feature)
{
- return Formatter<StringView>::format(builder, media_feature.to_string());
+ return Formatter<StringView>::format(builder, media_feature.to_deprecated_string());
}
};
@@ -278,7 +278,7 @@ template<>
struct Formatter<Web::CSS::MediaCondition> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::MediaCondition const& media_condition)
{
- return Formatter<StringView>::format(builder, media_condition.to_string());
+ return Formatter<StringView>::format(builder, media_condition.to_deprecated_string());
}
};
@@ -286,7 +286,7 @@ template<>
struct Formatter<Web::CSS::MediaQuery> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::MediaQuery const& media_query)
{
- return Formatter<StringView>::format(builder, media_query.to_string());
+ return Formatter<StringView>::format(builder, media_query.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/Number.h b/Userland/Libraries/LibWeb/CSS/Number.h
index 15c0f34d0f..90f3f825bb 100644
--- a/Userland/Libraries/LibWeb/CSS/Number.h
+++ b/Userland/Libraries/LibWeb/CSS/Number.h
@@ -69,7 +69,7 @@ public:
return { Type::Number, m_value / other.m_value };
}
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
if (m_type == Type::IntegerWithExplicitSign)
return DeprecatedString::formatted("{:+}", m_value);
@@ -91,6 +91,6 @@ template<>
struct AK::Formatter<Web::CSS::Number> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Number const& number)
{
- return Formatter<StringView>::format(builder, number.to_string());
+ return Formatter<StringView>::format(builder, number.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Block.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Block.cpp
index 8eefb53c1a..be951d037a 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Block.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Block.cpp
@@ -17,7 +17,7 @@ Block::Block(Token token, Vector<ComponentValue>&& values)
Block::~Block() = default;
-DeprecatedString Block::to_string() const
+DeprecatedString Block::to_deprecated_string() const
{
StringBuilder builder;
@@ -25,7 +25,7 @@ DeprecatedString Block::to_string() const
builder.join(' ', m_values);
builder.append(m_token.bracket_mirror_string());
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Block.h b/Userland/Libraries/LibWeb/CSS/Parser/Block.h
index 1e996104e6..8168dc7078 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Block.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Block.h
@@ -32,7 +32,7 @@ public:
Vector<ComponentValue> const& values() const { return m_values; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
Block(Token, Vector<ComponentValue>&&);
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.cpp b/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.cpp
index f74c4305dd..d30bd5e8de 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.cpp
@@ -26,12 +26,12 @@ ComponentValue::ComponentValue(NonnullRefPtr<Block> block)
ComponentValue::~ComponentValue() = default;
-DeprecatedString ComponentValue::to_string() const
+DeprecatedString ComponentValue::to_deprecated_string() const
{
return m_value.visit(
- [](Token const& token) { return token.to_string(); },
- [](NonnullRefPtr<Block> const& block) { return block->to_string(); },
- [](NonnullRefPtr<Function> const& function) { return function->to_string(); });
+ [](Token const& token) { return token.to_deprecated_string(); },
+ [](NonnullRefPtr<Block> const& block) { return block->to_deprecated_string(); },
+ [](NonnullRefPtr<Function> const& function) { return function->to_deprecated_string(); });
}
DeprecatedString ComponentValue::to_debug_string() const
@@ -41,10 +41,10 @@ DeprecatedString ComponentValue::to_debug_string() const
return DeprecatedString::formatted("Token: {}", token.to_debug_string());
},
[](NonnullRefPtr<Block> const& block) {
- return DeprecatedString::formatted("Block: {}", block->to_string());
+ return DeprecatedString::formatted("Block: {}", block->to_deprecated_string());
},
[](NonnullRefPtr<Function> const& function) {
- return DeprecatedString::formatted("Function: {}", function->to_string());
+ return DeprecatedString::formatted("Function: {}", function->to_deprecated_string());
});
}
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h b/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h
index 67604311e8..4ad73f7028 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/ComponentValue.h
@@ -33,7 +33,7 @@ public:
Token const& token() const { return m_value.get<Token>(); }
operator Token() const { return m_value.get<Token>(); }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
DeprecatedString to_debug_string() const;
private:
@@ -45,6 +45,6 @@ template<>
struct AK::Formatter<Web::CSS::Parser::ComponentValue> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Parser::ComponentValue const& component_value)
{
- return Formatter<StringView>::format(builder, component_value.to_string());
+ return Formatter<StringView>::format(builder, component_value.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Declaration.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Declaration.cpp
index c893c9128c..572efe143c 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Declaration.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Declaration.cpp
@@ -19,7 +19,7 @@ Declaration::Declaration(FlyString name, Vector<ComponentValue> values, Importan
Declaration::~Declaration() = default;
-DeprecatedString Declaration::to_string() const
+DeprecatedString Declaration::to_deprecated_string() const
{
StringBuilder builder;
@@ -30,7 +30,7 @@ DeprecatedString Declaration::to_string() const
if (m_important == Important::Yes)
builder.append(" !important"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Declaration.h b/Userland/Libraries/LibWeb/CSS/Parser/Declaration.h
index a3a4412135..fd0e2e1c77 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Declaration.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Declaration.h
@@ -22,7 +22,7 @@ public:
Vector<ComponentValue> const& values() const { return m_values; }
Important importance() const { return m_important; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
FlyString m_name;
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp b/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp
index a861a103f8..e26ee5ec28 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp
@@ -24,20 +24,20 @@ DeclarationOrAtRule::DeclarationOrAtRule(Declaration declaration)
DeclarationOrAtRule::~DeclarationOrAtRule() = default;
-DeprecatedString DeclarationOrAtRule::to_string() const
+DeprecatedString DeclarationOrAtRule::to_deprecated_string() const
{
StringBuilder builder;
switch (m_type) {
default:
case DeclarationType::At:
- builder.append(m_at->to_string());
+ builder.append(m_at->to_deprecated_string());
break;
case DeclarationType::Declaration:
- builder.append(m_declaration->to_string());
+ builder.append(m_declaration->to_deprecated_string());
break;
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.h b/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.h
index 939c4f863d..d0d6ced460 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.h
@@ -37,7 +37,7 @@ public:
return *m_declaration;
}
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
DeclarationType m_type;
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Function.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Function.cpp
index de2e574073..fdd15a7359 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Function.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Function.cpp
@@ -18,7 +18,7 @@ Function::Function(FlyString name, Vector<ComponentValue>&& values)
Function::~Function() = default;
-DeprecatedString Function::to_string() const
+DeprecatedString Function::to_deprecated_string() const
{
StringBuilder builder;
@@ -27,7 +27,7 @@ DeprecatedString Function::to_string() const
builder.join(' ', m_values);
builder.append(')');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Function.h b/Userland/Libraries/LibWeb/CSS/Parser/Function.h
index 481f26bd46..f45be68761 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Function.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Function.h
@@ -28,7 +28,7 @@ public:
StringView name() const { return m_name; }
Vector<ComponentValue> const& values() const { return m_values; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
Function(FlyString name, Vector<ComponentValue>&& values);
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index d7ad6c9218..18d32ebd1f 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -562,7 +562,7 @@ Parser::ParseErrorOr<Selector::SimpleSelector> Parser::parse_pseudo_simple_selec
}
// FIXME: Support multiple, comma-separated, language ranges.
Vector<FlyString> languages;
- languages.append(pseudo_function.values().first().token().to_string());
+ languages.append(pseudo_function.values().first().token().to_deprecated_string());
return Selector::SimpleSelector {
.type = Selector::SimpleSelector::Type::PseudoClass,
.value = Selector::SimpleSelector::PseudoClass {
@@ -1395,7 +1395,7 @@ Optional<Supports::Feature> Parser::parse_supports_feature(TokenStream<Component
if (auto declaration = consume_a_declaration(block_tokens); declaration.has_value()) {
transaction.commit();
return Supports::Feature {
- Supports::Declaration { declaration->to_string() }
+ Supports::Declaration { declaration->to_deprecated_string() }
};
}
}
@@ -1405,10 +1405,10 @@ Optional<Supports::Feature> Parser::parse_supports_feature(TokenStream<Component
// FIXME: Parsing and then converting back to a string is weird.
StringBuilder builder;
for (auto const& item : first_token.function().values())
- builder.append(item.to_string());
+ builder.append(item.to_deprecated_string());
transaction.commit();
return Supports::Feature {
- Supports::Selector { builder.to_string() }
+ Supports::Selector { builder.to_deprecated_string() }
};
}
@@ -1425,13 +1425,13 @@ Optional<GeneralEnclosed> Parser::parse_general_enclosed(TokenStream<ComponentVa
// `[ <function-token> <any-value>? ) ]`
if (first_token.is_function()) {
transaction.commit();
- return GeneralEnclosed { first_token.to_string() };
+ return GeneralEnclosed { first_token.to_deprecated_string() };
}
// `( <any-value>? )`
if (first_token.is_block() && first_token.block().is_paren()) {
transaction.commit();
- return GeneralEnclosed { first_token.to_string() };
+ return GeneralEnclosed { first_token.to_deprecated_string() };
}
return {};
@@ -3385,7 +3385,7 @@ Optional<UnicodeRange> Parser::parse_unicode_range(TokenStream<ComponentValue>&
return DeprecatedString::formatted("{:+}", int_value);
}
- return component_value.to_string();
+ return component_value.to_deprecated_string();
};
auto create_unicode_range = [&](StringView text, auto& local_transaction) -> Optional<UnicodeRange> {
@@ -3920,13 +3920,13 @@ Optional<Color> Parser::parse_color(ComponentValue const& component_value)
serialization_builder.append(cv.token().dimension_unit());
// 5. If serialization consists of fewer than six characters, prepend zeros (U+0030) so that it becomes six characters.
- serialization = serialization_builder.to_string();
+ serialization = serialization_builder.to_deprecated_string();
if (serialization_builder.length() < 6) {
StringBuilder builder;
for (size_t i = 0; i < (6 - serialization_builder.length()); i++)
builder.append('0');
builder.append(serialization_builder.string_view());
- serialization = builder.to_string();
+ serialization = builder.to_deprecated_string();
}
}
// 3. Otherwise, cv is an <ident-token>; let serialization be cv’s value.
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Rule.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Rule.cpp
index b078b1b2a7..7b31376449 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Rule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Rule.cpp
@@ -20,7 +20,7 @@ Rule::Rule(Rule::Type type, FlyString name, Vector<ComponentValue> prelude, RefP
Rule::~Rule() = default;
-DeprecatedString Rule::to_string() const
+DeprecatedString Rule::to_deprecated_string() const
{
StringBuilder builder;
@@ -32,11 +32,11 @@ DeprecatedString Rule::to_string() const
builder.join(' ', m_prelude);
if (m_block)
- builder.append(m_block->to_string());
+ builder.append(m_block->to_deprecated_string());
else
builder.append(';');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Rule.h b/Userland/Libraries/LibWeb/CSS/Parser/Rule.h
index ddd0d41f56..7afd913538 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Rule.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Rule.h
@@ -41,7 +41,7 @@ public:
RefPtr<Block const> block() const { return m_block; }
StringView at_rule_name() const { return m_at_rule_name; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
Rule(Type, FlyString name, Vector<ComponentValue> prelude, RefPtr<Block>);
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Token.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Token.cpp
index 175ff73063..172bc09cfb 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Token.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Token.cpp
@@ -11,7 +11,7 @@
namespace Web::CSS::Parser {
-DeprecatedString Token::to_string() const
+DeprecatedString Token::to_deprecated_string() const
{
StringBuilder builder;
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Token.h b/Userland/Libraries/LibWeb/CSS/Parser/Token.h
index c5b8b505ed..93fa0712f3 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Token.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Token.h
@@ -145,7 +145,7 @@ public:
DeprecatedString bracket_string() const;
DeprecatedString bracket_mirror_string() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
DeprecatedString to_debug_string() const;
Position const& start_position() const { return m_start_position; }
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp
index 69ed1e3b74..ab0eb47350 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp
@@ -237,7 +237,7 @@ Tokenizer::Tokenizer(StringView input, DeprecatedString const& encoding)
last_was_carriage_return = false;
}
});
- return builder.to_string();
+ return builder.to_deprecated_string();
};
m_decoded_input = filter_code_points(input, encoding);
@@ -367,7 +367,7 @@ Token Tokenizer::create_value_token(Token::Type type, u32 value)
// FIXME: Avoid temporary StringBuilder here
StringBuilder builder;
builder.append_code_point(value);
- token.m_value = builder.to_string();
+ token.m_value = builder.to_deprecated_string();
return token;
}
@@ -400,7 +400,7 @@ u32 Tokenizer::consume_escaped_code_point()
}
// Interpret the hex digits as a hexadecimal number.
- auto unhexed = strtoul(builder.to_string().characters(), nullptr, 16);
+ auto unhexed = strtoul(builder.to_deprecated_string().characters(), nullptr, 16);
// If this number is zero, or is for a surrogate, or is greater than the maximum allowed
// code point, return U+FFFD REPLACEMENT CHARACTER (�).
if (unhexed == 0 || is_unicode_surrogate(unhexed) || is_greater_than_maximum_allowed_code_point(unhexed)) {
@@ -617,7 +617,7 @@ DeprecatedString Tokenizer::consume_an_ident_sequence()
break;
}
- return result.to_string();
+ return result.to_deprecated_string();
}
// https://www.w3.org/TR/css-syntax-3/#consume-url-token
@@ -640,7 +640,7 @@ Token Tokenizer::consume_a_url_token()
consume_as_much_whitespace_as_possible();
auto make_token = [&]() {
- token.m_value = builder.to_string();
+ token.m_value = builder.to_deprecated_string();
return token;
};
@@ -931,7 +931,7 @@ Token Tokenizer::consume_string_token(u32 ending_code_point)
StringBuilder builder;
auto make_token = [&]() {
- token.m_value = builder.to_string();
+ token.m_value = builder.to_deprecated_string();
return token;
};
diff --git a/Userland/Libraries/LibWeb/CSS/Percentage.h b/Userland/Libraries/LibWeb/CSS/Percentage.h
index 7ef19ccc90..c43c52060a 100644
--- a/Userland/Libraries/LibWeb/CSS/Percentage.h
+++ b/Userland/Libraries/LibWeb/CSS/Percentage.h
@@ -31,7 +31,7 @@ public:
float value() const { return m_value; }
float as_fraction() const { return m_value * 0.01f; }
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
return DeprecatedString::formatted("{}%", m_value);
}
@@ -128,12 +128,12 @@ public:
});
}
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
if (is_percentage())
- return m_value.template get<Percentage>().to_string();
+ return m_value.template get<Percentage>().to_deprecated_string();
- return m_value.template get<T>().to_string();
+ return m_value.template get<T>().to_deprecated_string();
}
bool operator==(PercentageOr<T> const& other) const
@@ -231,7 +231,7 @@ template<>
struct AK::Formatter<Web::CSS::Percentage> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Percentage const& percentage)
{
- return Formatter<StringView>::format(builder, percentage.to_string());
+ return Formatter<StringView>::format(builder, percentage.to_deprecated_string());
}
};
@@ -239,7 +239,7 @@ template<>
struct AK::Formatter<Web::CSS::AnglePercentage> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::AnglePercentage const& angle_percentage)
{
- return Formatter<StringView>::format(builder, angle_percentage.to_string());
+ return Formatter<StringView>::format(builder, angle_percentage.to_deprecated_string());
}
};
@@ -247,7 +247,7 @@ template<>
struct AK::Formatter<Web::CSS::FrequencyPercentage> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::FrequencyPercentage const& frequency_percentage)
{
- return Formatter<StringView>::format(builder, frequency_percentage.to_string());
+ return Formatter<StringView>::format(builder, frequency_percentage.to_deprecated_string());
}
};
@@ -255,7 +255,7 @@ template<>
struct AK::Formatter<Web::CSS::LengthPercentage> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::LengthPercentage const& length_percentage)
{
- return Formatter<StringView>::format(builder, length_percentage.to_string());
+ return Formatter<StringView>::format(builder, length_percentage.to_deprecated_string());
}
};
@@ -263,6 +263,6 @@ template<>
struct AK::Formatter<Web::CSS::TimePercentage> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::TimePercentage const& time_percentage)
{
- return Formatter<StringView>::format(builder, time_percentage.to_string());
+ return Formatter<StringView>::format(builder, time_percentage.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/Ratio.cpp b/Userland/Libraries/LibWeb/CSS/Ratio.cpp
index 8d9e070e30..7c3cb89b10 100644
--- a/Userland/Libraries/LibWeb/CSS/Ratio.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Ratio.cpp
@@ -22,7 +22,7 @@ bool Ratio::is_degenerate() const
|| !isfinite(m_second_value) || m_second_value == 0;
}
-DeprecatedString Ratio::to_string() const
+DeprecatedString Ratio::to_deprecated_string() const
{
return DeprecatedString::formatted("{} / {}", m_first_value, m_second_value);
}
diff --git a/Userland/Libraries/LibWeb/CSS/Ratio.h b/Userland/Libraries/LibWeb/CSS/Ratio.h
index 7d32491823..022b78be04 100644
--- a/Userland/Libraries/LibWeb/CSS/Ratio.h
+++ b/Userland/Libraries/LibWeb/CSS/Ratio.h
@@ -17,7 +17,7 @@ public:
float value() const { return m_first_value / m_second_value; }
bool is_degenerate() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
float m_first_value { 0 };
diff --git a/Userland/Libraries/LibWeb/CSS/Resolution.cpp b/Userland/Libraries/LibWeb/CSS/Resolution.cpp
index 870dee9da4..22251ffc54 100644
--- a/Userland/Libraries/LibWeb/CSS/Resolution.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Resolution.cpp
@@ -21,7 +21,7 @@ Resolution::Resolution(float value, Type type)
{
}
-DeprecatedString Resolution::to_string() const
+DeprecatedString Resolution::to_deprecated_string() const
{
return DeprecatedString::formatted("{}{}", m_value, unit_name());
}
diff --git a/Userland/Libraries/LibWeb/CSS/Resolution.h b/Userland/Libraries/LibWeb/CSS/Resolution.h
index a9d71dec05..bb810c533b 100644
--- a/Userland/Libraries/LibWeb/CSS/Resolution.h
+++ b/Userland/Libraries/LibWeb/CSS/Resolution.h
@@ -24,7 +24,7 @@ public:
Resolution(int value, Type type);
Resolution(float value, Type type);
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
float to_dots_per_pixel() const;
bool operator==(Resolution const& other) const
diff --git a/Userland/Libraries/LibWeb/CSS/Selector.cpp b/Userland/Libraries/LibWeb/CSS/Selector.cpp
index b31a4dc44c..59f6fcce02 100644
--- a/Userland/Libraries/LibWeb/CSS/Selector.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Selector.cpp
@@ -275,7 +275,7 @@ DeprecatedString Selector::SimpleSelector::serialize() const
dbgln("FIXME: Unsupported simple selector serialization for type {}", to_underlying(type));
break;
}
- return s.to_string();
+ return s.to_deprecated_string();
}
// https://www.w3.org/TR/cssom/#serialize-a-selector
@@ -333,7 +333,7 @@ DeprecatedString Selector::serialize() const
}
}
- return s.to_string();
+ return s.to_deprecated_string();
}
// https://www.w3.org/TR/cssom/#serialize-a-group-of-selectors
@@ -342,7 +342,7 @@ DeprecatedString serialize_a_group_of_selectors(NonnullRefPtrVector<Selector> co
// To serialize a group of selectors serialize each selector in the group of selectors and then serialize a comma-separated list of these serializations.
StringBuilder builder;
builder.join(", "sv, selectors);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
Optional<Selector::PseudoElement> pseudo_element_from_string(StringView name)
diff --git a/Userland/Libraries/LibWeb/CSS/Selector.h b/Userland/Libraries/LibWeb/CSS/Selector.h
index 3ac08fad0b..2dcb26db22 100644
--- a/Userland/Libraries/LibWeb/CSS/Selector.h
+++ b/Userland/Libraries/LibWeb/CSS/Selector.h
@@ -80,7 +80,7 @@ public:
result.appendff("{}", offset);
// 5. Return result.
- return result.to_string();
+ return result.to_deprecated_string();
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/Serialize.cpp b/Userland/Libraries/LibWeb/CSS/Serialize.cpp
index 3896cca1e1..be68aac192 100644
--- a/Userland/Libraries/LibWeb/CSS/Serialize.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Serialize.cpp
@@ -113,7 +113,7 @@ void serialize_a_url(StringBuilder& builder, StringView url)
// To serialize a URL means to create a string represented by "url(",
// followed by the serialization of the URL as a string, followed by ")".
builder.append("url("sv);
- serialize_a_string(builder, url.to_string());
+ serialize_a_string(builder, url.to_deprecated_string());
builder.append(')');
}
@@ -123,7 +123,7 @@ void serialize_a_local(StringBuilder& builder, StringView path)
// To serialize a LOCAL means to create a string represented by "local(",
// followed by the serialization of the LOCAL as a string, followed by ")".
builder.append("local("sv);
- serialize_a_string(builder, path.to_string());
+ serialize_a_string(builder, path.to_deprecated_string());
builder.append(')');
}
@@ -131,7 +131,7 @@ void serialize_a_local(StringBuilder& builder, StringView path)
void serialize_unicode_ranges(StringBuilder& builder, Vector<UnicodeRange> const& unicode_ranges)
{
serialize_a_comma_separated_list(builder, unicode_ranges, [&](UnicodeRange unicode_range) {
- serialize_a_string(builder, unicode_range.to_string());
+ serialize_a_string(builder, unicode_range.to_deprecated_string());
});
}
@@ -151,42 +151,42 @@ DeprecatedString escape_a_character(u32 character)
{
StringBuilder builder;
escape_a_character(builder, character);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
DeprecatedString escape_a_character_as_code_point(u32 character)
{
StringBuilder builder;
escape_a_character_as_code_point(builder, character);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
DeprecatedString serialize_an_identifier(StringView ident)
{
StringBuilder builder;
serialize_an_identifier(builder, ident);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
DeprecatedString serialize_a_string(StringView string)
{
StringBuilder builder;
serialize_a_string(builder, string);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
DeprecatedString serialize_a_url(StringView url)
{
StringBuilder builder;
serialize_a_url(builder, url);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
DeprecatedString serialize_a_srgb_value(Color color)
{
StringBuilder builder;
serialize_a_srgb_value(builder, color);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/Size.cpp b/Userland/Libraries/LibWeb/CSS/Size.cpp
index cd90466ed9..504aac0352 100644
--- a/Userland/Libraries/LibWeb/CSS/Size.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Size.cpp
@@ -74,20 +74,20 @@ bool Size::contains_percentage() const
}
}
-DeprecatedString Size::to_string() const
+DeprecatedString Size::to_deprecated_string() const
{
switch (m_type) {
case Type::Auto:
return "auto";
case Type::Length:
case Type::Percentage:
- return m_length_percentage.to_string();
+ return m_length_percentage.to_deprecated_string();
case Type::MinContent:
return "min-content";
case Type::MaxContent:
return "max-content";
case Type::FitContent:
- return DeprecatedString::formatted("fit-content({})", m_length_percentage.to_string());
+ return DeprecatedString::formatted("fit-content({})", m_length_percentage.to_deprecated_string());
case Type::None:
return "none";
}
diff --git a/Userland/Libraries/LibWeb/CSS/Size.h b/Userland/Libraries/LibWeb/CSS/Size.h
index 200cbabf27..dc52c3cdc7 100644
--- a/Userland/Libraries/LibWeb/CSS/Size.h
+++ b/Userland/Libraries/LibWeb/CSS/Size.h
@@ -63,7 +63,7 @@ public:
return m_length_percentage.length();
}
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
Size(Type type, LengthPercentage);
@@ -78,6 +78,6 @@ template<>
struct AK::Formatter<Web::CSS::Size> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Size const& size)
{
- return Formatter<StringView>::format(builder, size.to_string());
+ return Formatter<StringView>::format(builder, size.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
index 1c6e3f09e9..35937a906c 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
@@ -1168,7 +1168,7 @@ void StyleComputer::compute_font(StyleProperties& style, DOM::Element const* ele
if (family.is_identifier()) {
found_font = find_generic_font(family.to_identifier());
} else if (family.is_string()) {
- found_font = find_font(family.to_string());
+ found_font = find_font(family.to_deprecated_string());
}
if (found_font)
break;
@@ -1176,7 +1176,7 @@ void StyleComputer::compute_font(StyleProperties& style, DOM::Element const* ele
} else if (family_value->is_identifier()) {
found_font = find_generic_font(family_value->to_identifier());
} else if (family_value->is_string()) {
- found_font = find_font(family_value->to_string());
+ found_font = find_font(family_value->to_deprecated_string());
}
if (!found_font) {
@@ -1477,7 +1477,7 @@ void StyleComputer::load_fonts_from_sheet(CSSStyleSheet const& sheet)
continue;
LoadRequest request;
- auto url = m_document.parse_url(candidate_url.value().to_string());
+ auto url = m_document.parse_url(candidate_url.value().to_deprecated_string());
auto loader = make<FontLoader>(const_cast<StyleComputer&>(*this), font_face.font_family(), move(url));
const_cast<StyleComputer&>(*this).m_loaded_fonts.set(font_face.font_family(), move(loader));
}
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
index 0af11f79e5..07d76e58b2 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
@@ -81,7 +81,7 @@ CSS::Size StyleProperties::size_value(CSS::PropertyID id) const
}
// FIXME: Support `fit-content(<length>)`
- dbgln("FIXME: Unsupported size value: `{}`, treating as `auto`", value->to_string());
+ dbgln("FIXME: Unsupported size value: `{}`, treating as `auto`", value->to_deprecated_string());
return CSS::Size::make_auto();
}
@@ -201,13 +201,13 @@ float StyleProperties::opacity() const
if (maybe_percentage.has_value())
unclamped_opacity = maybe_percentage->as_fraction();
else
- dbgln("Unable to resolve calc() as opacity (percentage): {}", value->to_string());
+ dbgln("Unable to resolve calc() as opacity (percentage): {}", value->to_deprecated_string());
} else {
auto maybe_number = value->as_calculated().resolve_number();
if (maybe_number.has_value())
unclamped_opacity = maybe_number.value();
else
- dbgln("Unable to resolve calc() as opacity (number): {}", value->to_string());
+ dbgln("Unable to resolve calc() as opacity (number): {}", value->to_deprecated_string());
}
} else if (value->is_percentage()) {
unclamped_opacity = value->as_percentage().percentage().as_fraction();
@@ -498,24 +498,24 @@ CSS::ContentData StyleProperties::content() const
StringBuilder builder;
for (auto const& item : content_style_value.content().values()) {
if (item.is_string()) {
- builder.append(item.to_string());
+ builder.append(item.to_deprecated_string());
} else {
// TODO: Implement quotes, counters, images, and other things.
}
}
content_data.type = ContentData::Type::String;
- content_data.data = builder.to_string();
+ content_data.data = builder.to_deprecated_string();
if (content_style_value.has_alt_text()) {
StringBuilder alt_text_builder;
for (auto const& item : content_style_value.alt_text()->values()) {
if (item.is_string()) {
- alt_text_builder.append(item.to_string());
+ alt_text_builder.append(item.to_deprecated_string());
} else {
// TODO: Implement counters
}
}
- content_data.alt_text = alt_text_builder.to_string();
+ content_data.alt_text = alt_text_builder.to_deprecated_string();
}
return content_data;
@@ -608,7 +608,7 @@ Vector<CSS::TextDecorationLine> StyleProperties::text_decoration_line() const
if (value->is_identifier() && value->to_identifier() == ValueID::None)
return {};
- dbgln("FIXME: Unsupported value for text-decoration-line: {}", value->to_string());
+ dbgln("FIXME: Unsupported value for text-decoration-line: {}", value->to_deprecated_string());
return {};
}
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
index 8d91e78475..25a9642616 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp
@@ -313,16 +313,16 @@ BackgroundStyleValue::BackgroundStyleValue(
VERIFY(!m_color->is_value_list());
}
-DeprecatedString BackgroundStyleValue::to_string() const
+DeprecatedString BackgroundStyleValue::to_deprecated_string() const
{
if (m_layer_count == 1) {
- return DeprecatedString::formatted("{} {} {} {} {} {} {} {}", m_color->to_string(), m_image->to_string(), m_position->to_string(), m_size->to_string(), m_repeat->to_string(), m_attachment->to_string(), m_origin->to_string(), m_clip->to_string());
+ return DeprecatedString::formatted("{} {} {} {} {} {} {} {}", m_color->to_deprecated_string(), m_image->to_deprecated_string(), m_position->to_deprecated_string(), m_size->to_deprecated_string(), m_repeat->to_deprecated_string(), m_attachment->to_deprecated_string(), m_origin->to_deprecated_string(), m_clip->to_deprecated_string());
}
auto get_layer_value_string = [](NonnullRefPtr<StyleValue> const& style_value, size_t index) {
if (style_value->is_value_list())
- return style_value->as_value_list().value_at(index, true)->to_string();
- return style_value->to_string();
+ return style_value->as_value_list().value_at(index, true)->to_deprecated_string();
+ return style_value->to_deprecated_string();
};
StringBuilder builder;
@@ -330,11 +330,11 @@ DeprecatedString BackgroundStyleValue::to_string() const
if (i)
builder.append(", "sv);
if (i == m_layer_count - 1)
- builder.appendff("{} ", m_color->to_string());
+ builder.appendff("{} ", m_color->to_deprecated_string());
builder.appendff("{} {} {} {} {} {} {}", get_layer_value_string(m_image, i), get_layer_value_string(m_position, i), get_layer_value_string(m_size, i), get_layer_value_string(m_repeat, i), get_layer_value_string(m_attachment, i), get_layer_value_string(m_origin, i), get_layer_value_string(m_clip, i));
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
bool BackgroundStyleValue::equals(StyleValue const& other) const
@@ -352,7 +352,7 @@ bool BackgroundStyleValue::equals(StyleValue const& other) const
&& m_clip->equals(typed_other.m_clip);
}
-DeprecatedString BackgroundRepeatStyleValue::to_string() const
+DeprecatedString BackgroundRepeatStyleValue::to_deprecated_string() const
{
return DeprecatedString::formatted("{} {}", CSS::to_string(m_repeat_x), CSS::to_string(m_repeat_y));
}
@@ -365,9 +365,9 @@ bool BackgroundRepeatStyleValue::equals(StyleValue const& other) const
return m_repeat_x == typed_other.m_repeat_x && m_repeat_y == typed_other.m_repeat_y;
}
-DeprecatedString BackgroundSizeStyleValue::to_string() const
+DeprecatedString BackgroundSizeStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("{} {}", m_size_x.to_string(), m_size_y.to_string());
+ return DeprecatedString::formatted("{} {}", m_size_x.to_deprecated_string(), m_size_y.to_deprecated_string());
}
bool BackgroundSizeStyleValue::equals(StyleValue const& other) const
@@ -378,9 +378,9 @@ bool BackgroundSizeStyleValue::equals(StyleValue const& other) const
return m_size_x == typed_other.m_size_x && m_size_y == typed_other.m_size_y;
}
-DeprecatedString BorderStyleValue::to_string() const
+DeprecatedString BorderStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("{} {} {}", m_border_width->to_string(), m_border_style->to_string(), m_border_color->to_string());
+ return DeprecatedString::formatted("{} {} {}", m_border_width->to_deprecated_string(), m_border_style->to_deprecated_string(), m_border_color->to_deprecated_string());
}
bool BorderStyleValue::equals(StyleValue const& other) const
@@ -393,11 +393,11 @@ bool BorderStyleValue::equals(StyleValue const& other) const
&& m_border_color->equals(typed_other.m_border_color);
}
-DeprecatedString BorderRadiusStyleValue::to_string() const
+DeprecatedString BorderRadiusStyleValue::to_deprecated_string() const
{
if (m_horizontal_radius == m_vertical_radius)
- return m_horizontal_radius.to_string();
- return DeprecatedString::formatted("{} / {}", m_horizontal_radius.to_string(), m_vertical_radius.to_string());
+ return m_horizontal_radius.to_deprecated_string();
+ return DeprecatedString::formatted("{} / {}", m_horizontal_radius.to_deprecated_string(), m_vertical_radius.to_deprecated_string());
}
bool BorderRadiusStyleValue::equals(StyleValue const& other) const
@@ -410,9 +410,9 @@ bool BorderRadiusStyleValue::equals(StyleValue const& other) const
&& m_vertical_radius == typed_other.m_vertical_radius;
}
-DeprecatedString BorderRadiusShorthandStyleValue::to_string() const
+DeprecatedString BorderRadiusShorthandStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("{} {} {} {} / {} {} {} {}", m_top_left->horizontal_radius().to_string(), m_top_right->horizontal_radius().to_string(), m_bottom_right->horizontal_radius().to_string(), m_bottom_left->horizontal_radius().to_string(), m_top_left->vertical_radius().to_string(), m_top_right->vertical_radius().to_string(), m_bottom_right->vertical_radius().to_string(), m_bottom_left->vertical_radius().to_string());
+ return DeprecatedString::formatted("{} {} {} {} / {} {} {} {}", m_top_left->horizontal_radius().to_deprecated_string(), m_top_right->horizontal_radius().to_deprecated_string(), m_bottom_right->horizontal_radius().to_deprecated_string(), m_bottom_left->horizontal_radius().to_deprecated_string(), m_top_left->vertical_radius().to_deprecated_string(), m_top_right->vertical_radius().to_deprecated_string(), m_bottom_right->vertical_radius().to_deprecated_string(), m_bottom_left->vertical_radius().to_deprecated_string());
}
bool BorderRadiusShorthandStyleValue::equals(StyleValue const& other) const
@@ -615,9 +615,9 @@ void CalculatedStyleValue::CalculationResult::divide_by(CalculationResult const&
});
}
-DeprecatedString CalculatedStyleValue::to_string() const
+DeprecatedString CalculatedStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("calc({})", m_expression->to_string());
+ return DeprecatedString::formatted("calc({})", m_expression->to_deprecated_string());
}
bool CalculatedStyleValue::equals(StyleValue const& other) const
@@ -625,81 +625,81 @@ bool CalculatedStyleValue::equals(StyleValue const& other) const
if (type() != other.type())
return false;
// This is a case where comparing the strings actually makes sense.
- return to_string() == other.to_string();
+ return to_deprecated_string() == other.to_deprecated_string();
}
-DeprecatedString CalculatedStyleValue::CalcNumberValue::to_string() const
+DeprecatedString CalculatedStyleValue::CalcNumberValue::to_deprecated_string() const
{
return value.visit(
[](Number const& number) { return DeprecatedString::number(number.value()); },
- [](NonnullOwnPtr<CalcNumberSum> const& sum) { return DeprecatedString::formatted("({})", sum->to_string()); });
+ [](NonnullOwnPtr<CalcNumberSum> const& sum) { return DeprecatedString::formatted("({})", sum->to_deprecated_string()); });
}
-DeprecatedString CalculatedStyleValue::CalcValue::to_string() const
+DeprecatedString CalculatedStyleValue::CalcValue::to_deprecated_string() const
{
return value.visit(
[](Number const& number) { return DeprecatedString::number(number.value()); },
- [](NonnullOwnPtr<CalcSum> const& sum) { return DeprecatedString::formatted("({})", sum->to_string()); },
- [](auto const& v) { return v.to_string(); });
+ [](NonnullOwnPtr<CalcSum> const& sum) { return DeprecatedString::formatted("({})", sum->to_deprecated_string()); },
+ [](auto const& v) { return v.to_deprecated_string(); });
}
-DeprecatedString CalculatedStyleValue::CalcSum::to_string() const
+DeprecatedString CalculatedStyleValue::CalcSum::to_deprecated_string() const
{
StringBuilder builder;
- builder.append(first_calc_product->to_string());
+ builder.append(first_calc_product->to_deprecated_string());
for (auto const& item : zero_or_more_additional_calc_products)
- builder.append(item.to_string());
- return builder.to_string();
+ builder.append(item.to_deprecated_string());
+ return builder.to_deprecated_string();
}
-DeprecatedString CalculatedStyleValue::CalcNumberSum::to_string() const
+DeprecatedString CalculatedStyleValue::CalcNumberSum::to_deprecated_string() const
{
StringBuilder builder;
- builder.append(first_calc_number_product->to_string());
+ builder.append(first_calc_number_product->to_deprecated_string());
for (auto const& item : zero_or_more_additional_calc_number_products)
- builder.append(item.to_string());
- return builder.to_string();
+ builder.append(item.to_deprecated_string());
+ return builder.to_deprecated_string();
}
-DeprecatedString CalculatedStyleValue::CalcProduct::to_string() const
+DeprecatedString CalculatedStyleValue::CalcProduct::to_deprecated_string() const
{
StringBuilder builder;
- builder.append(first_calc_value.to_string());
+ builder.append(first_calc_value.to_deprecated_string());
for (auto const& item : zero_or_more_additional_calc_values)
- builder.append(item.to_string());
- return builder.to_string();
+ builder.append(item.to_deprecated_string());
+ return builder.to_deprecated_string();
}
-DeprecatedString CalculatedStyleValue::CalcSumPartWithOperator::to_string() const
+DeprecatedString CalculatedStyleValue::CalcSumPartWithOperator::to_deprecated_string() const
{
- return DeprecatedString::formatted(" {} {}", op == SumOperation::Add ? "+"sv : "-"sv, value->to_string());
+ return DeprecatedString::formatted(" {} {}", op == SumOperation::Add ? "+"sv : "-"sv, value->to_deprecated_string());
}
-DeprecatedString CalculatedStyleValue::CalcProductPartWithOperator::to_string() const
+DeprecatedString CalculatedStyleValue::CalcProductPartWithOperator::to_deprecated_string() const
{
auto value_string = value.visit(
- [](CalcValue const& v) { return v.to_string(); },
- [](CalcNumberValue const& v) { return v.to_string(); });
+ [](CalcValue const& v) { return v.to_deprecated_string(); },
+ [](CalcNumberValue const& v) { return v.to_deprecated_string(); });
return DeprecatedString::formatted(" {} {}", op == ProductOperation::Multiply ? "*"sv : "/"sv, value_string);
}
-DeprecatedString CalculatedStyleValue::CalcNumberProduct::to_string() const
+DeprecatedString CalculatedStyleValue::CalcNumberProduct::to_deprecated_string() const
{
StringBuilder builder;
- builder.append(first_calc_number_value.to_string());
+ builder.append(first_calc_number_value.to_deprecated_string());
for (auto const& item : zero_or_more_additional_calc_number_values)
- builder.append(item.to_string());
- return builder.to_string();
+ builder.append(item.to_deprecated_string());
+ return builder.to_deprecated_string();
}
-DeprecatedString CalculatedStyleValue::CalcNumberProductPartWithOperator::to_string() const
+DeprecatedString CalculatedStyleValue::CalcNumberProductPartWithOperator::to_deprecated_string() const
{
- return DeprecatedString::formatted(" {} {}", op == ProductOperation::Multiply ? "*"sv : "/"sv, value.to_string());
+ return DeprecatedString::formatted(" {} {}", op == ProductOperation::Multiply ? "*"sv : "/"sv, value.to_deprecated_string());
}
-DeprecatedString CalculatedStyleValue::CalcNumberSumPartWithOperator::to_string() const
+DeprecatedString CalculatedStyleValue::CalcNumberSumPartWithOperator::to_deprecated_string() const
{
- return DeprecatedString::formatted(" {} {}", op == SumOperation::Add ? "+"sv : "-"sv, value->to_string());
+ return DeprecatedString::formatted(" {} {}", op == SumOperation::Add ? "+"sv : "-"sv, value->to_deprecated_string());
}
Optional<Angle> CalculatedStyleValue::resolve_angle() const
@@ -1149,7 +1149,7 @@ CalculatedStyleValue::CalculationResult CalculatedStyleValue::CalcNumberSumPartW
return value->resolve(layout_node, percentage_basis);
}
-DeprecatedString ColorStyleValue::to_string() const
+DeprecatedString ColorStyleValue::to_deprecated_string() const
{
return serialize_a_srgb_value(m_color);
}
@@ -1161,11 +1161,11 @@ bool ColorStyleValue::equals(StyleValue const& other) const
return m_color == other.as_color().m_color;
}
-DeprecatedString ContentStyleValue::to_string() const
+DeprecatedString ContentStyleValue::to_deprecated_string() const
{
if (has_alt_text())
- return DeprecatedString::formatted("{} / {}", m_content->to_string(), m_alt_text->to_string());
- return m_content->to_string();
+ return DeprecatedString::formatted("{} / {}", m_content->to_deprecated_string(), m_alt_text->to_deprecated_string());
+ return m_content->to_deprecated_string();
}
bool ContentStyleValue::equals(StyleValue const& other) const
@@ -1223,7 +1223,7 @@ float Filter::Color::resolved_amount() const
return 1.0f;
}
-DeprecatedString FilterValueListStyleValue::to_string() const
+DeprecatedString FilterValueListStyleValue::to_deprecated_string() const
{
StringBuilder builder {};
bool first = true;
@@ -1234,13 +1234,13 @@ DeprecatedString FilterValueListStyleValue::to_string() const
[&](Filter::Blur const& blur) {
builder.append("blur("sv);
if (blur.radius.has_value())
- builder.append(blur.radius->to_string());
+ builder.append(blur.radius->to_deprecated_string());
},
[&](Filter::DropShadow const& drop_shadow) {
builder.appendff("drop-shadow({} {}"sv,
drop_shadow.offset_x, drop_shadow.offset_y);
if (drop_shadow.radius.has_value())
- builder.appendff(" {}", drop_shadow.radius->to_string());
+ builder.appendff(" {}", drop_shadow.radius->to_deprecated_string());
if (drop_shadow.color.has_value()) {
builder.append(' ');
serialize_a_srgb_value(builder, *drop_shadow.color);
@@ -1251,7 +1251,7 @@ DeprecatedString FilterValueListStyleValue::to_string() const
if (hue_rotate.angle.has_value()) {
hue_rotate.angle->visit(
[&](Angle const& angle) {
- builder.append(angle.to_string());
+ builder.append(angle.to_deprecated_string());
},
[&](auto&) {
builder.append('0');
@@ -1281,12 +1281,12 @@ DeprecatedString FilterValueListStyleValue::to_string() const
}
}());
if (color.amount.has_value())
- builder.append(color.amount->to_string());
+ builder.append(color.amount->to_deprecated_string());
});
builder.append(')');
first = false;
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
static bool operator==(Filter::Blur const& a, Filter::Blur const& b)
@@ -1347,9 +1347,9 @@ bool FilterValueListStyleValue::equals(StyleValue const& other) const
return true;
}
-DeprecatedString FlexStyleValue::to_string() const
+DeprecatedString FlexStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("{} {} {}", m_grow->to_string(), m_shrink->to_string(), m_basis->to_string());
+ return DeprecatedString::formatted("{} {} {}", m_grow->to_deprecated_string(), m_shrink->to_deprecated_string(), m_basis->to_deprecated_string());
}
bool FlexStyleValue::equals(StyleValue const& other) const
@@ -1362,9 +1362,9 @@ bool FlexStyleValue::equals(StyleValue const& other) const
&& m_basis->equals(typed_other.m_basis);
}
-DeprecatedString FlexFlowStyleValue::to_string() const
+DeprecatedString FlexFlowStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("{} {}", m_flex_direction->to_string(), m_flex_wrap->to_string());
+ return DeprecatedString::formatted("{} {}", m_flex_direction->to_deprecated_string(), m_flex_wrap->to_deprecated_string());
}
bool FlexFlowStyleValue::equals(StyleValue const& other) const
@@ -1376,9 +1376,9 @@ bool FlexFlowStyleValue::equals(StyleValue const& other) const
&& m_flex_wrap->equals(typed_other.m_flex_wrap);
}
-DeprecatedString FontStyleValue::to_string() const
+DeprecatedString FontStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("{} {} {} / {} {}", m_font_style->to_string(), m_font_weight->to_string(), m_font_size->to_string(), m_line_height->to_string(), m_font_families->to_string());
+ return DeprecatedString::formatted("{} {} {} / {} {}", m_font_style->to_deprecated_string(), m_font_weight->to_deprecated_string(), m_font_size->to_deprecated_string(), m_line_height->to_deprecated_string(), m_font_families->to_deprecated_string());
}
bool FontStyleValue::equals(StyleValue const& other) const
@@ -1400,11 +1400,11 @@ bool FrequencyStyleValue::equals(StyleValue const& other) const
return m_frequency == other.as_frequency().m_frequency;
}
-DeprecatedString GridTrackPlacementShorthandStyleValue::to_string() const
+DeprecatedString GridTrackPlacementShorthandStyleValue::to_deprecated_string() const
{
if (m_end->grid_track_placement().is_auto())
- return DeprecatedString::formatted("{}", m_start->grid_track_placement().to_string());
- return DeprecatedString::formatted("{} / {}", m_start->grid_track_placement().to_string(), m_end->grid_track_placement().to_string());
+ return DeprecatedString::formatted("{}", m_start->grid_track_placement().to_deprecated_string());
+ return DeprecatedString::formatted("{} / {}", m_start->grid_track_placement().to_deprecated_string(), m_end->grid_track_placement().to_deprecated_string());
}
bool GridTrackPlacementShorthandStyleValue::equals(StyleValue const& other) const
@@ -1416,9 +1416,9 @@ bool GridTrackPlacementShorthandStyleValue::equals(StyleValue const& other) cons
&& m_end->equals(typed_other.m_end);
}
-DeprecatedString GridTrackPlacementStyleValue::to_string() const
+DeprecatedString GridTrackPlacementStyleValue::to_deprecated_string() const
{
- return m_grid_track_placement.to_string();
+ return m_grid_track_placement.to_deprecated_string();
}
bool GridTrackPlacementStyleValue::equals(StyleValue const& other) const
@@ -1429,9 +1429,9 @@ bool GridTrackPlacementStyleValue::equals(StyleValue const& other) const
return m_grid_track_placement == typed_other.grid_track_placement();
}
-DeprecatedString GridTrackSizeStyleValue::to_string() const
+DeprecatedString GridTrackSizeStyleValue::to_deprecated_string() const
{
- return m_grid_track_size_list.to_string();
+ return m_grid_track_size_list.to_deprecated_string();
}
bool GridTrackSizeStyleValue::equals(StyleValue const& other) const
@@ -1442,7 +1442,7 @@ bool GridTrackSizeStyleValue::equals(StyleValue const& other) const
return m_grid_track_size_list == typed_other.grid_track_size_list();
}
-DeprecatedString IdentifierStyleValue::to_string() const
+DeprecatedString IdentifierStyleValue::to_deprecated_string() const
{
return CSS::string_from_value_id(m_id);
}
@@ -1706,9 +1706,9 @@ Gfx::Bitmap const* ImageStyleValue::bitmap(size_t frame_index) const
return resource()->bitmap(frame_index);
}
-DeprecatedString ImageStyleValue::to_string() const
+DeprecatedString ImageStyleValue::to_deprecated_string() const
{
- return serialize_a_url(m_url.to_string());
+ return serialize_a_url(m_url.to_deprecated_string());
}
bool ImageStyleValue::equals(StyleValue const& other) const
@@ -1746,22 +1746,22 @@ static void serialize_color_stop_list(StringBuilder& builder, auto const& color_
builder.append(", "sv);
if (element.transition_hint.has_value()) {
- builder.appendff("{}, "sv, element.transition_hint->value.to_string());
+ builder.appendff("{}, "sv, element.transition_hint->value.to_deprecated_string());
}
serialize_a_srgb_value(builder, element.color_stop.color);
for (auto position : Array { &element.color_stop.position, &element.color_stop.second_position }) {
if (position->has_value())
- builder.appendff(" {}"sv, (*position)->to_string());
+ builder.appendff(" {}"sv, (*position)->to_deprecated_string());
}
first = false;
}
}
-DeprecatedString LinearGradientStyleValue::to_string() const
+DeprecatedString LinearGradientStyleValue::to_deprecated_string() const
{
StringBuilder builder;
- auto side_or_corner_to_string = [](SideOrCorner value) {
+ auto side_or_corner_to_deprecated_string = [](SideOrCorner value) {
switch (value) {
case SideOrCorner::Top:
return "top"sv;
@@ -1791,15 +1791,15 @@ DeprecatedString LinearGradientStyleValue::to_string() const
builder.append("linear-gradient("sv);
m_direction.visit(
[&](SideOrCorner side_or_corner) {
- builder.appendff("{}{}, "sv, m_gradient_type == GradientType::Standard ? "to "sv : ""sv, side_or_corner_to_string(side_or_corner));
+ builder.appendff("{}{}, "sv, m_gradient_type == GradientType::Standard ? "to "sv : ""sv, side_or_corner_to_deprecated_string(side_or_corner));
},
[&](Angle const& angle) {
- builder.appendff("{}, "sv, angle.to_string());
+ builder.appendff("{}, "sv, angle.to_deprecated_string());
});
serialize_color_stop_list(builder, m_color_stop_list);
builder.append(")"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
static bool operator==(LinearGradientStyleValue::GradientDirection const& a, LinearGradientStyleValue::GradientDirection const& b)
@@ -1947,7 +1947,7 @@ void PositionValue::serialize(StringBuilder& builder) const
}());
},
[&](LengthPercentage length_percentage) {
- builder.append(length_percentage.to_string());
+ builder.append(length_percentage.to_deprecated_string());
});
builder.append(' ');
if (has_relative_edges)
@@ -1968,7 +1968,7 @@ void PositionValue::serialize(StringBuilder& builder) const
}());
},
[&](LengthPercentage length_percentage) {
- builder.append(length_percentage.to_string());
+ builder.append(length_percentage.to_deprecated_string());
});
}
@@ -1981,7 +1981,7 @@ bool PositionValue::operator==(PositionValue const& other) const
&& variant_equals(vertical_position, other.vertical_position));
}
-DeprecatedString RadialGradientStyleValue::to_string() const
+DeprecatedString RadialGradientStyleValue::to_deprecated_string() const
{
StringBuilder builder;
if (is_repeating())
@@ -2006,8 +2006,8 @@ DeprecatedString RadialGradientStyleValue::to_string() const
}
}());
},
- [&](CircleSize const& circle_size) { builder.append(circle_size.radius.to_string()); },
- [&](EllipseSize const& ellipse_size) { builder.appendff("{} {}", ellipse_size.radius_a.to_string(), ellipse_size.radius_b.to_string()); });
+ [&](CircleSize const& circle_size) { builder.append(circle_size.radius.to_deprecated_string()); },
+ [&](EllipseSize const& ellipse_size) { builder.appendff("{} {}", ellipse_size.radius_a.to_deprecated_string(), ellipse_size.radius_b.to_deprecated_string()); });
if (m_position != PositionValue::center()) {
builder.appendff(" at "sv);
@@ -2017,7 +2017,7 @@ DeprecatedString RadialGradientStyleValue::to_string() const
builder.append(", "sv);
serialize_color_stop_list(builder, m_color_stop_list);
builder.append(')');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
Gfx::FloatSize RadialGradientStyleValue::resolve_size(Layout::Node const& node, Gfx::FloatPoint center, Gfx::FloatRect const& size) const
@@ -2181,7 +2181,7 @@ void RadialGradientStyleValue::paint(PaintContext& context, Gfx::IntRect const&
Painting::paint_radial_gradient(context, dest_rect, m_resolved->data, m_resolved->center.to_rounded<int>(), m_resolved->gradient_size);
}
-DeprecatedString ConicGradientStyleValue::to_string() const
+DeprecatedString ConicGradientStyleValue::to_deprecated_string() const
{
StringBuilder builder;
if (is_repeating())
@@ -2190,7 +2190,7 @@ DeprecatedString ConicGradientStyleValue::to_string() const
bool has_from_angle = false;
bool has_at_position = false;
if ((has_from_angle = m_from_angle.to_degrees() != 0))
- builder.appendff("from {}", m_from_angle.to_string());
+ builder.appendff("from {}", m_from_angle.to_deprecated_string());
if ((has_at_position = m_position != PositionValue::center())) {
if (has_from_angle)
builder.append(' ');
@@ -2201,7 +2201,7 @@ DeprecatedString ConicGradientStyleValue::to_string() const
builder.append(", "sv);
serialize_color_stop_list(builder, m_color_stop_list);
builder.append(')');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void ConicGradientStyleValue::resolve_for_size(Layout::Node const& node, Gfx::FloatSize const& size) const
@@ -2250,9 +2250,9 @@ bool LengthStyleValue::equals(StyleValue const& other) const
return m_length == other.as_length().m_length;
}
-DeprecatedString ListStyleStyleValue::to_string() const
+DeprecatedString ListStyleStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("{} {} {}", m_position->to_string(), m_image->to_string(), m_style_type->to_string());
+ return DeprecatedString::formatted("{} {} {}", m_position->to_deprecated_string(), m_image->to_deprecated_string(), m_style_type->to_deprecated_string());
}
bool ListStyleStyleValue::equals(StyleValue const& other) const
@@ -2265,7 +2265,7 @@ bool ListStyleStyleValue::equals(StyleValue const& other) const
&& m_style_type->equals(typed_other.m_style_type);
}
-DeprecatedString NumericStyleValue::to_string() const
+DeprecatedString NumericStyleValue::to_deprecated_string() const
{
return m_value.visit(
[](float value) {
@@ -2287,9 +2287,9 @@ bool NumericStyleValue::equals(StyleValue const& other) const
return m_value.get<float>() == other.as_numeric().m_value.get<float>();
}
-DeprecatedString OverflowStyleValue::to_string() const
+DeprecatedString OverflowStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("{} {}", m_overflow_x->to_string(), m_overflow_y->to_string());
+ return DeprecatedString::formatted("{} {}", m_overflow_x->to_deprecated_string(), m_overflow_y->to_deprecated_string());
}
bool OverflowStyleValue::equals(StyleValue const& other) const
@@ -2301,9 +2301,9 @@ bool OverflowStyleValue::equals(StyleValue const& other) const
&& m_overflow_y->equals(typed_other.m_overflow_y);
}
-DeprecatedString PercentageStyleValue::to_string() const
+DeprecatedString PercentageStyleValue::to_deprecated_string() const
{
- return m_percentage.to_string();
+ return m_percentage.to_deprecated_string();
}
bool PercentageStyleValue::equals(StyleValue const& other) const
@@ -2313,9 +2313,9 @@ bool PercentageStyleValue::equals(StyleValue const& other) const
return m_percentage == other.as_percentage().m_percentage;
}
-DeprecatedString PositionStyleValue::to_string() const
+DeprecatedString PositionStyleValue::to_deprecated_string() const
{
- auto to_string = [](PositionEdge edge) {
+ auto to_deprecated_string = [](PositionEdge edge) {
switch (edge) {
case PositionEdge::Left:
return "left";
@@ -2329,7 +2329,7 @@ DeprecatedString PositionStyleValue::to_string() const
VERIFY_NOT_REACHED();
};
- return DeprecatedString::formatted("{} {} {} {}", to_string(m_edge_x), m_offset_x.to_string(), to_string(m_edge_y), m_offset_y.to_string());
+ return DeprecatedString::formatted("{} {} {} {}", to_deprecated_string(m_edge_x), m_offset_x.to_deprecated_string(), to_deprecated_string(m_edge_y), m_offset_y.to_deprecated_string());
}
bool PositionStyleValue::equals(StyleValue const& other) const
@@ -2343,7 +2343,7 @@ bool PositionStyleValue::equals(StyleValue const& other) const
&& m_offset_y == typed_other.m_offset_y;
}
-DeprecatedString RectStyleValue::to_string() const
+DeprecatedString RectStyleValue::to_deprecated_string() const
{
return DeprecatedString::formatted("rect({} {} {} {})", m_rect.top_edge, m_rect.right_edge, m_rect.bottom_edge, m_rect.left_edge);
}
@@ -2363,13 +2363,13 @@ bool ResolutionStyleValue::equals(StyleValue const& other) const
return m_resolution == other.as_resolution().m_resolution;
}
-DeprecatedString ShadowStyleValue::to_string() const
+DeprecatedString ShadowStyleValue::to_deprecated_string() const
{
StringBuilder builder;
- builder.appendff("{} {} {} {} {}", m_color.to_string(), m_offset_x.to_string(), m_offset_y.to_string(), m_blur_radius.to_string(), m_spread_distance.to_string());
+ builder.appendff("{} {} {} {} {}", m_color.to_deprecated_string(), m_offset_x.to_deprecated_string(), m_offset_y.to_deprecated_string(), m_blur_radius.to_deprecated_string(), m_spread_distance.to_deprecated_string());
if (m_placement == ShadowPlacement::Inner)
builder.append(" inset"sv);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
bool ShadowStyleValue::equals(StyleValue const& other) const
@@ -2392,9 +2392,9 @@ bool StringStyleValue::equals(StyleValue const& other) const
return m_string == other.as_string().m_string;
}
-DeprecatedString TextDecorationStyleValue::to_string() const
+DeprecatedString TextDecorationStyleValue::to_deprecated_string() const
{
- return DeprecatedString::formatted("{} {} {} {}", m_line->to_string(), m_thickness->to_string(), m_style->to_string(), m_color->to_string());
+ return DeprecatedString::formatted("{} {} {} {}", m_line->to_deprecated_string(), m_thickness->to_deprecated_string(), m_style->to_deprecated_string(), m_color->to_deprecated_string());
}
bool TextDecorationStyleValue::equals(StyleValue const& other) const
@@ -2415,7 +2415,7 @@ bool TimeStyleValue::equals(StyleValue const& other) const
return m_time == other.as_time().m_time;
}
-DeprecatedString TransformationStyleValue::to_string() const
+DeprecatedString TransformationStyleValue::to_deprecated_string() const
{
StringBuilder builder;
builder.append(CSS::to_string(m_transform_function));
@@ -2423,7 +2423,7 @@ DeprecatedString TransformationStyleValue::to_string() const
builder.join(", "sv, m_values);
builder.append(')');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
bool TransformationStyleValue::equals(StyleValue const& other) const
@@ -2442,12 +2442,12 @@ bool TransformationStyleValue::equals(StyleValue const& other) const
return true;
}
-DeprecatedString UnresolvedStyleValue::to_string() const
+DeprecatedString UnresolvedStyleValue::to_deprecated_string() const
{
StringBuilder builder;
for (auto& value : m_values)
- builder.append(value.to_string());
- return builder.to_string();
+ builder.append(value.to_deprecated_string());
+ return builder.to_deprecated_string();
}
bool UnresolvedStyleValue::equals(StyleValue const& other) const
@@ -2455,7 +2455,7 @@ bool UnresolvedStyleValue::equals(StyleValue const& other) const
if (type() != other.type())
return false;
// This is a case where comparing the strings actually makes sense.
- return to_string() == other.to_string();
+ return to_deprecated_string() == other.to_deprecated_string();
}
bool UnsetStyleValue::equals(StyleValue const& other) const
@@ -2463,7 +2463,7 @@ bool UnsetStyleValue::equals(StyleValue const& other) const
return type() == other.type();
}
-DeprecatedString StyleValueList::to_string() const
+DeprecatedString StyleValueList::to_deprecated_string() const
{
DeprecatedString separator = "";
switch (m_separator) {
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h
index fa0f70c77a..eebf701b75 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValue.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h
@@ -403,7 +403,7 @@ public:
virtual Length to_length() const { VERIFY_NOT_REACHED(); }
virtual float to_number() const { return 0; }
virtual float to_integer() const { return 0; }
- virtual DeprecatedString to_string() const = 0;
+ virtual DeprecatedString to_deprecated_string() const = 0;
bool operator==(StyleValue const& other) const { return equals(other); }
@@ -426,7 +426,7 @@ public:
Angle const& angle() const { return m_angle; }
- virtual DeprecatedString to_string() const override { return m_angle.to_string(); }
+ virtual DeprecatedString to_deprecated_string() const override { return m_angle.to_deprecated_string(); }
virtual bool equals(StyleValue const& other) const override
{
@@ -472,7 +472,7 @@ public:
NonnullRefPtr<StyleValue> repeat() const { return m_repeat; }
NonnullRefPtr<StyleValue> size() const { return m_size; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -509,7 +509,7 @@ public:
Repeat repeat_x() const { return m_repeat_x; }
Repeat repeat_y() const { return m_repeat_y; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -536,7 +536,7 @@ public:
LengthPercentage size_x() const { return m_size_x; }
LengthPercentage size_y() const { return m_size_y; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -566,7 +566,7 @@ public:
NonnullRefPtr<StyleValue> border_style() const { return m_border_style; }
NonnullRefPtr<StyleValue> border_color() const { return m_border_color; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -598,7 +598,7 @@ public:
LengthPercentage const& vertical_radius() const { return m_vertical_radius; }
bool is_elliptical() const { return m_is_elliptical; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -630,7 +630,7 @@ public:
NonnullRefPtr<BorderRadiusStyleValue> bottom_right() const { return m_bottom_right; }
NonnullRefPtr<BorderRadiusStyleValue> bottom_left() const { return m_bottom_left; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -702,14 +702,14 @@ public:
struct CalcNumberValue {
Variant<Number, NonnullOwnPtr<CalcNumberSum>> value;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
};
struct CalcValue {
Variant<Number, Angle, Frequency, Length, Percentage, Time, NonnullOwnPtr<CalcSum>> value;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
bool contains_percentage() const;
@@ -724,7 +724,7 @@ public:
NonnullOwnPtr<CalcProduct> first_calc_product;
NonnullOwnPtrVector<CalcSumPartWithOperator> zero_or_more_additional_calc_products;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
@@ -739,7 +739,7 @@ public:
NonnullOwnPtr<CalcNumberProduct> first_calc_number_product;
NonnullOwnPtrVector<CalcNumberSumPartWithOperator> zero_or_more_additional_calc_number_products;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
};
@@ -748,7 +748,7 @@ public:
CalcValue first_calc_value;
NonnullOwnPtrVector<CalcProductPartWithOperator> zero_or_more_additional_calc_values;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
bool contains_percentage() const;
@@ -762,7 +762,7 @@ public:
SumOperation op;
NonnullOwnPtr<CalcProduct> value;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
bool contains_percentage() const;
@@ -772,7 +772,7 @@ public:
ProductOperation op;
Variant<CalcValue, CalcNumberValue> value;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
@@ -783,7 +783,7 @@ public:
CalcNumberValue first_calc_number_value;
NonnullOwnPtrVector<CalcNumberProductPartWithOperator> zero_or_more_additional_calc_number_values;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
};
@@ -792,7 +792,7 @@ public:
ProductOperation op;
CalcNumberValue value;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
};
@@ -805,7 +805,7 @@ public:
SumOperation op;
NonnullOwnPtr<CalcNumberProduct> value;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Optional<ResolvedType> resolved_type() const;
CalculationResult resolve(Layout::Node const*, PercentageBasis const& percentage_basis) const;
};
@@ -815,7 +815,7 @@ public:
return adopt_ref(*new CalculatedStyleValue(move(calc_sum), resolved_type));
}
- DeprecatedString to_string() const override;
+ DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
ResolvedType resolved_type() const { return m_resolved_type; }
NonnullOwnPtr<CalcSum> const& expression() const { return m_expression; }
@@ -864,7 +864,7 @@ public:
virtual ~ColorStyleValue() override = default;
Color color() const { return m_color; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool has_color() const override { return true; }
virtual Color to_color(Layout::NodeWithStyle const&) const override { return m_color; }
@@ -891,7 +891,7 @@ public:
bool has_alt_text() const { return !m_alt_text.is_null(); }
StyleValueList const* alt_text() const { return m_alt_text; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -917,7 +917,7 @@ public:
Vector<FilterFunction> const& filter_value_list() const { return m_filter_value_list; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
virtual ~FilterValueListStyleValue() override = default;
@@ -948,7 +948,7 @@ public:
NonnullRefPtr<StyleValue> shrink() const { return m_shrink; }
NonnullRefPtr<StyleValue> basis() const { return m_basis; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -979,7 +979,7 @@ public:
NonnullRefPtr<StyleValue> flex_direction() const { return m_flex_direction; }
NonnullRefPtr<StyleValue> flex_wrap() const { return m_flex_wrap; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1005,7 +1005,7 @@ public:
NonnullRefPtr<StyleValue> line_height() const { return m_line_height; }
NonnullRefPtr<StyleValue> font_families() const { return m_font_families; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1037,7 +1037,7 @@ public:
Frequency const& frequency() const { return m_frequency; }
- virtual DeprecatedString to_string() const override { return m_frequency.to_string(); }
+ virtual DeprecatedString to_deprecated_string() const override { return m_frequency.to_deprecated_string(); }
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1056,7 +1056,7 @@ public:
virtual ~GridTrackPlacementStyleValue() override = default;
CSS::GridTrackPlacement const& grid_track_placement() const { return m_grid_track_placement; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1084,7 +1084,7 @@ public:
NonnullRefPtr<GridTrackPlacementStyleValue> start() const { return m_start; }
NonnullRefPtr<GridTrackPlacementStyleValue> end() const { return m_end; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1108,7 +1108,7 @@ public:
CSS::GridTrackSizeList grid_track_size_list() const { return m_grid_track_size_list; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1136,7 +1136,7 @@ public:
virtual CSS::ValueID to_identifier() const override { return m_id; }
virtual bool has_color() const override;
virtual Color to_color(Layout::NodeWithStyle const& node) const override;
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1170,7 +1170,7 @@ public:
static NonnullRefPtr<ImageStyleValue> create(AK::URL const& url) { return adopt_ref(*new ImageStyleValue(url)); }
virtual ~ImageStyleValue() override = default;
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
virtual void load_any_resources(DOM::Document&) override;
@@ -1238,7 +1238,7 @@ public:
return adopt_ref(*new RadialGradientStyleValue(ending_shape, size, position, move(color_stop_list), repeating));
}
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
void paint(PaintContext&, Gfx::IntRect const& dest_rect, CSS::ImageRendering) const override;
@@ -1293,7 +1293,7 @@ public:
return adopt_ref(*new ConicGradientStyleValue(from_angle, position, move(color_stop_list), repeating));
}
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
void paint(PaintContext&, Gfx::IntRect const& dest_rect, CSS::ImageRendering) const override;
@@ -1355,7 +1355,7 @@ public:
return adopt_ref(*new LinearGradientStyleValue(direction, move(color_stop_list), type, repeating));
}
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual ~LinearGradientStyleValue() override = default;
virtual bool equals(StyleValue const& other) const override;
@@ -1405,7 +1405,7 @@ public:
}
virtual ~InheritStyleValue() override = default;
- DeprecatedString to_string() const override { return "inherit"; }
+ DeprecatedString to_deprecated_string() const override { return "inherit"; }
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1424,7 +1424,7 @@ public:
}
virtual ~InitialStyleValue() override = default;
- DeprecatedString to_string() const override { return "initial"; }
+ DeprecatedString to_deprecated_string() const override { return "initial"; }
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1444,7 +1444,7 @@ public:
virtual bool has_auto() const override { return m_length.is_auto(); }
virtual bool has_length() const override { return true; }
virtual bool has_identifier() const override { return has_auto(); }
- virtual DeprecatedString to_string() const override { return m_length.to_string(); }
+ virtual DeprecatedString to_deprecated_string() const override { return m_length.to_deprecated_string(); }
virtual Length to_length() const override { return m_length; }
virtual ValueID to_identifier() const override { return has_auto() ? ValueID::Auto : ValueID::Invalid; }
virtual NonnullRefPtr<StyleValue> absolutized(Gfx::IntRect const& viewport_rect, Gfx::FontPixelMetrics const& font_metrics, float font_size, float root_font_size) const override;
@@ -1475,7 +1475,7 @@ public:
NonnullRefPtr<StyleValue> image() const { return m_image; }
NonnullRefPtr<StyleValue> style_type() const { return m_style_type; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1521,7 +1521,7 @@ public:
virtual bool has_integer() const override { return m_value.has<i64>(); }
virtual float to_integer() const override { return m_value.get<i64>(); }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1545,7 +1545,7 @@ public:
NonnullRefPtr<StyleValue> overflow_x() const { return m_overflow_x; }
NonnullRefPtr<StyleValue> overflow_y() const { return m_overflow_y; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1571,7 +1571,7 @@ public:
Percentage const& percentage() const { return m_percentage; }
Percentage& percentage() { return m_percentage; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1597,7 +1597,7 @@ public:
PositionEdge edge_y() const { return m_edge_y; }
LengthPercentage const& offset_y() const { return m_offset_y; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1626,7 +1626,7 @@ public:
Resolution const& resolution() const { return m_resolution; }
- virtual DeprecatedString to_string() const override { return m_resolution.to_string(); }
+ virtual DeprecatedString to_deprecated_string() const override { return m_resolution.to_deprecated_string(); }
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1655,7 +1655,7 @@ public:
Length const& spread_distance() const { return m_spread_distance; }
ShadowPlacement placement() const { return m_placement; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1688,7 +1688,7 @@ public:
}
virtual ~StringStyleValue() override = default;
- DeprecatedString to_string() const override { return m_string; }
+ DeprecatedString to_deprecated_string() const override { return m_string; }
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1718,7 +1718,7 @@ public:
NonnullRefPtr<StyleValue> style() const { return m_style; }
NonnullRefPtr<StyleValue> color() const { return m_color; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1751,7 +1751,7 @@ public:
Time const& time() const { return m_time; }
- virtual DeprecatedString to_string() const override { return m_time.to_string(); }
+ virtual DeprecatedString to_deprecated_string() const override { return m_time.to_deprecated_string(); }
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1775,7 +1775,7 @@ public:
CSS::TransformFunction transform_function() const { return m_transform_function; }
NonnullRefPtrVector<StyleValue> values() const { return m_values; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1798,7 +1798,7 @@ public:
}
virtual ~UnresolvedStyleValue() override = default;
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
Vector<Parser::ComponentValue> const& values() const { return m_values; }
@@ -1825,7 +1825,7 @@ public:
}
virtual ~UnsetStyleValue() override = default;
- DeprecatedString to_string() const override { return "unset"; }
+ DeprecatedString to_deprecated_string() const override { return "unset"; }
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1852,7 +1852,7 @@ public:
return m_values[i];
}
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool equals(StyleValue const& other) const override;
private:
@@ -1873,7 +1873,7 @@ public:
virtual ~RectStyleValue() override = default;
EdgeRect rect() const { return m_rect; }
- virtual DeprecatedString to_string() const override;
+ virtual DeprecatedString to_deprecated_string() const override;
virtual bool has_rect() const override { return true; }
virtual EdgeRect to_rect() const override { return m_rect; }
virtual bool equals(StyleValue const& other) const override;
@@ -1894,6 +1894,6 @@ template<>
struct AK::Formatter<Web::CSS::StyleValue> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::StyleValue const& style_value)
{
- return Formatter<StringView>::format(builder, style_value.to_string());
+ return Formatter<StringView>::format(builder, style_value.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/Supports.cpp b/Userland/Libraries/LibWeb/CSS/Supports.cpp
index d0ad51e382..41287f0b8c 100644
--- a/Userland/Libraries/LibWeb/CSS/Supports.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Supports.cpp
@@ -73,33 +73,34 @@ bool Supports::Feature::evaluate() const
});
}
-DeprecatedString Supports::Declaration::to_string() const
+DeprecatedString Supports::Declaration::to_deprecated_string() const
{
return DeprecatedString::formatted("({})", declaration);
}
-DeprecatedString Supports::Selector::to_string() const
+DeprecatedString Supports::Selector::to_deprecated_string() const
{
return DeprecatedString::formatted("selector({})", selector);
}
-DeprecatedString Supports::Feature::to_string() const
+DeprecatedString Supports::Feature::to_deprecated_string() const
{
- return value.visit([](auto& it) { return it.to_string(); });
+ return value.visit([](auto& it) { return it.to_deprecated_string(); });
}
-DeprecatedString Supports::InParens::to_string() const
+DeprecatedString Supports::InParens::to_deprecated_string() const
{
return value.visit(
- [](NonnullOwnPtr<Condition> const& condition) -> DeprecatedString { return DeprecatedString::formatted("({})", condition->to_string()); },
- [](auto& it) -> DeprecatedString { return it.to_string(); });
+ [](NonnullOwnPtr<Condition> const& condition) -> DeprecatedString { return DeprecatedString::formatted("({})", condition->to_deprecated_string()); },
+ [](Supports::Feature const& it) -> DeprecatedString { return it.to_deprecated_string(); },
+ [](GeneralEnclosed const& it) -> DeprecatedString { return it.to_string(); });
}
-DeprecatedString Supports::Condition::to_string() const
+DeprecatedString Supports::Condition::to_deprecated_string() const
{
switch (type) {
case Type::Not:
- return DeprecatedString::formatted("not {}", children.first().to_string());
+ return DeprecatedString::formatted("not {}", children.first().to_deprecated_string());
case Type::And:
return DeprecatedString::join(" and "sv, children);
case Type::Or:
@@ -108,9 +109,9 @@ DeprecatedString Supports::Condition::to_string() const
VERIFY_NOT_REACHED();
}
-DeprecatedString Supports::to_string() const
+DeprecatedString Supports::to_deprecated_string() const
{
- return m_condition->to_string();
+ return m_condition->to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/CSS/Supports.h b/Userland/Libraries/LibWeb/CSS/Supports.h
index e6e6fb369f..385fc5eb7f 100644
--- a/Userland/Libraries/LibWeb/CSS/Supports.h
+++ b/Userland/Libraries/LibWeb/CSS/Supports.h
@@ -24,19 +24,19 @@ public:
struct Declaration {
DeprecatedString declaration;
bool evaluate() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
};
struct Selector {
DeprecatedString selector;
bool evaluate() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
};
struct Feature {
Variant<Declaration, Selector> value;
bool evaluate() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
};
struct Condition;
@@ -44,7 +44,7 @@ public:
Variant<NonnullOwnPtr<Condition>, Feature, GeneralEnclosed> value;
bool evaluate() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
};
struct Condition {
@@ -57,7 +57,7 @@ public:
Vector<InParens> children;
bool evaluate() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
};
static NonnullRefPtr<Supports> create(NonnullOwnPtr<Condition>&& condition)
@@ -66,7 +66,7 @@ public:
}
bool matches() const { return m_matches; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
Supports(NonnullOwnPtr<Condition>&&);
@@ -81,6 +81,6 @@ template<>
struct AK::Formatter<Web::CSS::Supports::InParens> : AK::Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Supports::InParens const& in_parens)
{
- return Formatter<StringView>::format(builder, in_parens.to_string());
+ return Formatter<StringView>::format(builder, in_parens.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/Time.cpp b/Userland/Libraries/LibWeb/CSS/Time.cpp
index 724d8b8648..fa685cf7de 100644
--- a/Userland/Libraries/LibWeb/CSS/Time.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Time.cpp
@@ -40,10 +40,10 @@ Time Time::percentage_of(Percentage const& percentage) const
return Time { percentage.as_fraction() * m_value, m_type };
}
-DeprecatedString Time::to_string() const
+DeprecatedString Time::to_deprecated_string() const
{
if (is_calculated())
- return m_calculated_style->to_string();
+ return m_calculated_style->to_deprecated_string();
return DeprecatedString::formatted("{}{}", m_value, unit_name());
}
diff --git a/Userland/Libraries/LibWeb/CSS/Time.h b/Userland/Libraries/LibWeb/CSS/Time.h
index 9655241eff..42dfa1d3dd 100644
--- a/Userland/Libraries/LibWeb/CSS/Time.h
+++ b/Userland/Libraries/LibWeb/CSS/Time.h
@@ -31,7 +31,7 @@ public:
bool is_calculated() const { return m_type == Type::Calculated; }
NonnullRefPtr<CalculatedStyleValue> calculated_style_value() const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
float to_seconds() const;
bool operator==(Time const& other) const
@@ -55,6 +55,6 @@ template<>
struct AK::Formatter<Web::CSS::Time> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Time const& time)
{
- return Formatter<StringView>::format(builder, time.to_string());
+ return Formatter<StringView>::format(builder, time.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/CSS/UnicodeRange.h b/Userland/Libraries/LibWeb/CSS/UnicodeRange.h
index 505532b3c1..4443e3d6cb 100644
--- a/Userland/Libraries/LibWeb/CSS/UnicodeRange.h
+++ b/Userland/Libraries/LibWeb/CSS/UnicodeRange.h
@@ -29,7 +29,7 @@ public:
return m_min_code_point <= code_point && code_point <= m_max_code_point;
}
- DeprecatedString to_string() const
+ DeprecatedString to_deprecated_string() const
{
if (m_min_code_point == m_max_code_point)
return DeprecatedString::formatted("U+{:x}", m_min_code_point);
diff --git a/Userland/Libraries/LibWeb/Crypto/Crypto.cpp b/Userland/Libraries/LibWeb/Crypto/Crypto.cpp
index dc627525a5..3f41847065 100644
--- a/Userland/Libraries/LibWeb/Crypto/Crypto.cpp
+++ b/Userland/Libraries/LibWeb/Crypto/Crypto.cpp
@@ -111,7 +111,7 @@ DeprecatedString Crypto::random_uuid() const
builder.appendff("{:02x}{:02x}-", bytes[6], bytes[7]);
builder.appendff("{:02x}{:02x}-", bytes[8], bytes[9]);
builder.appendff("{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}", bytes[10], bytes[11], bytes[12], bytes[13], bytes[14], bytes[15]);
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void Crypto::visit_edges(Cell::Visitor& visitor)
diff --git a/Userland/Libraries/LibWeb/DOM/CharacterData.cpp b/Userland/Libraries/LibWeb/DOM/CharacterData.cpp
index 39fccecab6..fcd298bd0e 100644
--- a/Userland/Libraries/LibWeb/DOM/CharacterData.cpp
+++ b/Userland/Libraries/LibWeb/DOM/CharacterData.cpp
@@ -73,7 +73,7 @@ WebIDL::ExceptionOr<void> CharacterData::replace_data(size_t offset, size_t coun
builder.append(this->data().substring_view(0, offset));
builder.append(data);
builder.append(this->data().substring_view(offset + count));
- m_data = builder.to_string();
+ m_data = builder.to_deprecated_string();
// 8. For each live range whose start node is node and start offset is greater than offset but less than or equal to offset plus count, set its start offset to offset.
for (auto& range : Range::live_ranges()) {
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp
index b2a52929cc..17d2c32d85 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Document.cpp
@@ -663,7 +663,7 @@ DeprecatedString Document::title() const
last_was_space = false;
}
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void Document::set_title(DeprecatedString const& title)
@@ -1595,7 +1595,7 @@ DeprecatedString Document::dump_dom_tree_as_json() const
serialize_tree_as_json(json);
MUST(json.finish());
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// https://html.spec.whatwg.org/multipage/semantics.html#has-a-style-sheet-that-is-blocking-scripts
diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h
index eb661c7a2f..50a9461f72 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.h
+++ b/Userland/Libraries/LibWeb/DOM/Document.h
@@ -108,8 +108,8 @@ public:
void update_base_element(Badge<HTML::HTMLBaseElement>);
JS::GCPtr<HTML::HTMLBaseElement> first_base_element_with_href_in_tree_order() const;
- DeprecatedString url_string() const { return m_url.to_string(); }
- DeprecatedString document_uri() const { return m_url.to_string(); }
+ DeprecatedString url_string() const { return m_url.to_deprecated_string(); }
+ DeprecatedString document_uri() const { return m_url.to_deprecated_string(); }
HTML::Origin origin() const;
void set_origin(HTML::Origin const& origin);
diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp
index 7c186a6d59..f79fa7065c 100644
--- a/Userland/Libraries/LibWeb/DOM/Element.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Element.cpp
@@ -315,7 +315,7 @@ JS::GCPtr<Layout::Node> Element::create_layout_node_for_display_type(DOM::Docume
return document.heap().allocate_without_realm<Layout::InlineNode>(document, element, move(style));
if (display.is_flex_inside())
return document.heap().allocate_without_realm<Layout::BlockContainer>(document, element, move(style));
- dbgln_if(LIBWEB_CSS_DEBUG, "FIXME: Support display: {}", display.to_string());
+ dbgln_if(LIBWEB_CSS_DEBUG, "FIXME: Support display: {}", display.to_deprecated_string());
return document.heap().allocate_without_realm<Layout::InlineNode>(document, element, move(style));
}
diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
index 329ffe6a38..ed54f66521 100644
--- a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
+++ b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
@@ -386,7 +386,7 @@ WebIDL::CallbackType* EventTarget::get_current_value_of_event_handler(FlyString
builder.appendff("function {}(event) {{\n{}\n}}", name, body);
}
- auto source_text = builder.to_string();
+ auto source_text = builder.to_deprecated_string();
auto parser = JS::Parser(JS::Lexer(source_text));
@@ -454,7 +454,7 @@ WebIDL::CallbackType* EventTarget::get_current_value_of_event_handler(FlyString
// 6. Return scope. (NOTE: Not necessary)
- auto* function = JS::ECMAScriptFunctionObject::create(realm, name, builder.to_string(), program->body(), program->parameters(), program->function_length(), scope, nullptr, JS::FunctionKind::Normal, program->is_strict_mode(), program->might_need_arguments_object(), is_arrow_function);
+ auto* function = JS::ECMAScriptFunctionObject::create(realm, name, builder.to_deprecated_string(), program->body(), program->parameters(), program->function_length(), scope, nullptr, JS::FunctionKind::Normal, program->is_strict_mode(), program->might_need_arguments_object(), is_arrow_function);
VERIFY(function);
// 10. Remove settings object's realm execution context from the JavaScript execution context stack.
diff --git a/Userland/Libraries/LibWeb/DOM/Node.cpp b/Userland/Libraries/LibWeb/DOM/Node.cpp
index 58b3bc8133..7f672fbece 100644
--- a/Userland/Libraries/LibWeb/DOM/Node.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Node.cpp
@@ -105,7 +105,7 @@ void Node::visit_edges(Cell::Visitor& visitor)
DeprecatedString Node::base_uri() const
{
// Return this’s node document’s document base URL, serialized.
- return document().base_url().to_string();
+ return document().base_url().to_deprecated_string();
}
const HTML::HTMLAnchorElement* Node::enclosing_link_element() const
@@ -142,7 +142,7 @@ DeprecatedString Node::descendant_text_content() const
builder.append(text_node.data());
return IterationDecision::Continue;
});
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// https://dom.spec.whatwg.org/#dom-node-textcontent
@@ -1318,7 +1318,7 @@ DeprecatedString Node::debug_description() const
for (auto const& class_name : element.class_names())
builder.appendff(".{}", class_name);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// https://dom.spec.whatwg.org/#concept-node-length
diff --git a/Userland/Libraries/LibWeb/DOM/Position.cpp b/Userland/Libraries/LibWeb/DOM/Position.cpp
index f827b85334..6c1cc31cef 100644
--- a/Userland/Libraries/LibWeb/DOM/Position.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Position.cpp
@@ -18,7 +18,7 @@ Position::Position(Node& node, unsigned offset)
{
}
-DeprecatedString Position::to_string() const
+DeprecatedString Position::to_deprecated_string() const
{
if (!node())
return DeprecatedString::formatted("DOM::Position(nullptr, {})", offset());
diff --git a/Userland/Libraries/LibWeb/DOM/Position.h b/Userland/Libraries/LibWeb/DOM/Position.h
index 739e350506..ee7fe84eaa 100644
--- a/Userland/Libraries/LibWeb/DOM/Position.h
+++ b/Userland/Libraries/LibWeb/DOM/Position.h
@@ -35,7 +35,7 @@ public:
return m_node.ptr() == other.m_node.ptr() && m_offset == other.m_offset;
}
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
JS::Handle<Node> m_node;
@@ -49,7 +49,7 @@ template<>
struct Formatter<Web::DOM::Position> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::DOM::Position const& value)
{
- return Formatter<StringView>::format(builder, value.to_string());
+ return Formatter<StringView>::format(builder, value.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/DOM/Range.cpp b/Userland/Libraries/LibWeb/DOM/Range.cpp
index 219b07644a..c8af80e6af 100644
--- a/Userland/Libraries/LibWeb/DOM/Range.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Range.cpp
@@ -516,7 +516,7 @@ WebIDL::ExceptionOr<i16> Range::compare_point(Node const& node, u32 offset) cons
}
// https://dom.spec.whatwg.org/#dom-range-stringifier
-DeprecatedString Range::to_string() const
+DeprecatedString Range::to_deprecated_string() const
{
// 1. Let s be the empty string.
StringBuilder builder;
@@ -541,7 +541,7 @@ DeprecatedString Range::to_string() const
builder.append(static_cast<Text const&>(*end_container()).data().substring_view(0, end_offset()));
// 6. Return s.
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// https://dom.spec.whatwg.org/#dom-range-extractcontents
diff --git a/Userland/Libraries/LibWeb/DOM/Range.h b/Userland/Libraries/LibWeb/DOM/Range.h
index 3f958ee3ee..21f7b89be1 100644
--- a/Userland/Libraries/LibWeb/DOM/Range.h
+++ b/Userland/Libraries/LibWeb/DOM/Range.h
@@ -78,7 +78,7 @@ public:
WebIDL::ExceptionOr<void> insert_node(JS::NonnullGCPtr<Node>);
WebIDL::ExceptionOr<void> surround_contents(JS::NonnullGCPtr<Node> new_parent);
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
static HashTable<Range*>& live_ranges();
diff --git a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp
index 04cc04beec..c72d5da40c 100644
--- a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp
+++ b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp
@@ -455,7 +455,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_element_attributes(DOM::E
}
// 4. Return the value of result.
- return result.to_string();
+ return result.to_deprecated_string();
}
// https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
@@ -524,7 +524,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_element(DOM::Element cons
qualified_name.append(element.local_name());
// 4. Append the value of qualified name to markup.
- markup.append(qualified_name.to_string());
+ markup.append(qualified_name.to_deprecated_string());
}
// 12. Otherwise, inherited ns is not equal to ns (the node's own namespace is different from the context namespace of its parent). Run these sub-steps:
@@ -561,7 +561,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_element(DOM::Element cons
}
// 3. Append the value of qualified name to markup.
- markup.append(qualified_name.to_string());
+ markup.append(qualified_name.to_deprecated_string());
}
// 5. Otherwise, if prefix is not null, then:
@@ -577,7 +577,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_element(DOM::Element cons
qualified_name.appendff("{}:{}", prefix, element.local_name());
// 4. Append the value of qualified name to markup.
- markup.append(qualified_name.to_string());
+ markup.append(qualified_name.to_deprecated_string());
// 5. Append the following to markup, in the order listed:
// 1. " " (U+0020 SPACE);
@@ -618,7 +618,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_element(DOM::Element cons
inherited_ns = ns;
// 4. Append the value of qualified name to markup.
- markup.append(qualified_name.to_string());
+ markup.append(qualified_name.to_deprecated_string());
// 5. Append the following to markup, in the order listed:
// 1. " " (U+0020 SPACE);
@@ -641,7 +641,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_element(DOM::Element cons
qualified_name.append(element.local_name());
inherited_ns = ns;
- markup.append(qualified_name.to_string());
+ markup.append(qualified_name.to_deprecated_string());
}
}
@@ -671,7 +671,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_element(DOM::Element cons
// 17. If the value of skip end tag is true, then return the value of markup and skip the remaining steps. The node is a leaf-node.
if (skip_end_tag)
- return markup.to_string();
+ return markup.to_deprecated_string();
// 18. If ns is the HTML namespace, and the node's localName matches the string "template", then this is a template element.
if (ns == Namespace::HTML && element.local_name() == HTML::TagNames::template_) {
@@ -691,13 +691,13 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_element(DOM::Element cons
markup.append("</"sv);
// 2. The value of qualified name;
- markup.append(qualified_name.to_string());
+ markup.append(qualified_name.to_deprecated_string());
// 3. ">" (U+003E GREATER-THAN SIGN).
markup.append('>');
// 21. Return the value of markup.
- return markup.to_string();
+ return markup.to_deprecated_string();
}
// https://w3c.github.io/DOM-Parsing/#xml-serializing-a-document-node
@@ -717,7 +717,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_document(DOM::Document co
serialized_document.append(TRY(serialize_node_to_xml_string_impl(*child, namespace_, namespace_prefix_map, prefix_index, require_well_formed)));
// 3. Return the value of serialized document.
- return serialized_document.to_string();
+ return serialized_document.to_deprecated_string();
}
// https://w3c.github.io/DOM-Parsing/#xml-serializing-a-comment-node
@@ -774,7 +774,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_document_fragment(DOM::Do
markup.append(TRY(serialize_node_to_xml_string_impl(*child, namespace_, namespace_prefix_map, prefix_index, require_well_formed)));
// 3. Return the value of markup.
- return markup.to_string();
+ return markup.to_deprecated_string();
}
// https://w3c.github.io/DOM-Parsing/#xml-serializing-a-documenttype-node
@@ -840,7 +840,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_document_type(DOM::Docume
markup.append('>');
// 11. Return the value of markup.
- return markup.to_string();
+ return markup.to_deprecated_string();
}
// https://w3c.github.io/DOM-Parsing/#dfn-xml-serializing-a-processinginstruction-node
@@ -881,7 +881,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_processing_instruction(DO
markup.append("?>"sv);
// 4. Return the value of markup.
- return markup.to_string();
+ return markup.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/Dump.cpp b/Userland/Libraries/LibWeb/Dump.cpp
index 9fa8443cfb..a9aef46eda 100644
--- a/Userland/Libraries/LibWeb/Dump.cpp
+++ b/Userland/Libraries/LibWeb/Dump.cpp
@@ -113,7 +113,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
builder.append('.');
builder.append(class_name);
}
- identifier = builder.to_string();
+ identifier = builder.to_deprecated_string();
}
StringView nonbox_color_on = ""sv;
@@ -264,7 +264,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
builder.appendff("start: {}, length: {}, rect: {}\n",
fragment.start(),
fragment.length(),
- fragment.absolute_rect().to_string());
+ fragment.absolute_rect().to_deprecated_string());
if (is<Layout::TextNode>(fragment.layout_node())) {
for (size_t i = 0; i < indent; ++i)
builder.append(" "sv);
@@ -283,7 +283,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
};
Vector<NameAndValue> properties;
verify_cast<DOM::Element>(*layout_node.dom_node()).computed_css_values()->for_each_property([&](auto property_id, auto& value) {
- properties.append({ CSS::string_from_property_id(property_id), value.to_string() });
+ properties.append({ CSS::string_from_property_id(property_id), value.to_deprecated_string() });
});
quick_sort(properties, [](auto& a, auto& b) { return a.name < b.name; });
@@ -602,7 +602,7 @@ void dump_font_face_rule(StringBuilder& builder, CSS::CSSFontFaceRule const& rul
builder.append("unicode-ranges:\n"sv);
for (auto const& unicode_range : font_face.unicode_ranges()) {
indent(builder, indent_levels + 2);
- builder.appendff("{}\n", unicode_range.to_string());
+ builder.appendff("{}\n", unicode_range.to_deprecated_string());
}
}
@@ -642,14 +642,14 @@ void dump_style_rule(StringBuilder& builder, CSS::CSSStyleRule const& rule, int
auto& style_declaration = verify_cast<CSS::PropertyOwningCSSStyleDeclaration>(rule.declaration());
for (auto& property : style_declaration.properties()) {
indent(builder, indent_levels);
- builder.appendff(" {}: '{}'", CSS::string_from_property_id(property.property_id), property.value->to_string());
+ builder.appendff(" {}: '{}'", CSS::string_from_property_id(property.property_id), property.value->to_deprecated_string());
if (property.important == CSS::Important::Yes)
builder.append(" \033[31;1m!important\033[0m"sv);
builder.append('\n');
}
for (auto& property : style_declaration.custom_properties()) {
indent(builder, indent_levels);
- builder.appendff(" {}: '{}'", property.key, property.value.value->to_string());
+ builder.appendff(" {}: '{}'", property.key, property.value.value->to_deprecated_string());
if (property.value.important == CSS::Important::Yes)
builder.append(" \033[31;1m!important\033[0m"sv);
builder.append('\n');
diff --git a/Userland/Libraries/LibWeb/Fetch/Body.cpp b/Userland/Libraries/LibWeb/Fetch/Body.cpp
index 21134d3070..45ab82ed80 100644
--- a/Userland/Libraries/LibWeb/Fetch/Body.cpp
+++ b/Userland/Libraries/LibWeb/Fetch/Body.cpp
@@ -162,7 +162,7 @@ JS::NonnullGCPtr<JS::Promise> consume_body(JS::Realm& realm, BodyMixin const& ob
// 4. Let steps be to return the result of package data with the first argument given, type, and object’s MIME type.
auto steps = [&realm, &object, type](JS::Value value) -> WebIDL::ExceptionOr<JS::Value> {
VERIFY(value.is_string());
- auto bytes = TRY_OR_RETURN_OOM(realm, ByteBuffer::copy(value.as_string().string().bytes()));
+ auto bytes = TRY_OR_RETURN_OOM(realm, ByteBuffer::copy(value.as_string().deprecated_string().bytes()));
return package_data(realm, move(bytes), type, object.mime_type_impl());
};
diff --git a/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp b/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp
index b44c7ac14a..621d16991f 100644
--- a/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp
+++ b/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp
@@ -87,7 +87,7 @@ WebIDL::ExceptionOr<Infrastructure::BodyWithType> extract_body(JS::Realm& realm,
},
[&](JS::Handle<URL::URLSearchParams> const& url_search_params) -> WebIDL::ExceptionOr<void> {
// Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list.
- source = url_search_params->to_string().to_byte_buffer();
+ source = url_search_params->to_deprecated_string().to_byte_buffer();
// Set type to `application/x-www-form-urlencoded;charset=UTF-8`.
type = TRY_OR_RETURN_OOM(realm, ByteBuffer::copy("application/x-www-form-urlencoded;charset=UTF-8"sv.bytes()));
return {};
diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.cpp b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.cpp
index 08f53f71c0..1f7338bd0a 100644
--- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.cpp
+++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP.cpp
@@ -69,7 +69,7 @@ DeprecatedString collect_an_http_quoted_string(GenericLexer& lexer, HttpQuotedSt
// 6. If the extract-value flag is set, then return value.
if (extract_value == HttpQuotedStringExtractValue::Yes)
- return value.to_string();
+ return value.to_deprecated_string();
// 7. Return the code points from positionStart to position, inclusive, within input.
auto position = lexer.tell();
diff --git a/Userland/Libraries/LibWeb/FileAPI/Blob.cpp b/Userland/Libraries/LibWeb/FileAPI/Blob.cpp
index a53b6a6d8f..fe00283ae5 100644
--- a/Userland/Libraries/LibWeb/FileAPI/Blob.cpp
+++ b/Userland/Libraries/LibWeb/FileAPI/Blob.cpp
@@ -63,7 +63,7 @@ ErrorOr<DeprecatedString> convert_line_endings_to_native(DeprecatedString const&
TRY(result.try_append(lexer.consume_until(is_any_of("\n\r"sv))));
}
// 5. Return result.
- return result.to_string();
+ return result.to_deprecated_string();
}
// https://w3c.github.io/FileAPI/#process-blob-parts
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
index 8cf8aec193..07cda36dae 100644
--- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
+++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
@@ -512,7 +512,7 @@ DeprecatedString BrowsingContext::selected_text() const
builder.append(text.substring(0, selection.end().index_in_node));
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
void BrowsingContext::select_all()
diff --git a/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h b/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h
index a39e780acc..e5fa17a78e 100644
--- a/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h
+++ b/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h
@@ -28,7 +28,7 @@ public:
DeprecatedString fill_style() const
{
- return my_drawing_state().fill_style.to_string();
+ return my_drawing_state().fill_style.to_deprecated_string();
}
void set_stroke_style(DeprecatedString style)
@@ -39,7 +39,7 @@ public:
DeprecatedString stroke_style() const
{
- return my_drawing_state().stroke_style.to_string();
+ return my_drawing_state().stroke_style.to_deprecated_string();
}
JS::NonnullGCPtr<CanvasGradient> create_radial_gradient(double x0, double y0, double r0, double x1, double y1, double r1)
diff --git a/Userland/Libraries/LibWeb/HTML/DOMParser.cpp b/Userland/Libraries/LibWeb/HTML/DOMParser.cpp
index 6fc6c45912..6aa861bdf2 100644
--- a/Userland/Libraries/LibWeb/HTML/DOMParser.cpp
+++ b/Userland/Libraries/LibWeb/HTML/DOMParser.cpp
@@ -31,7 +31,7 @@ JS::NonnullGCPtr<DOM::Document> DOMParser::parse_from_string(DeprecatedString co
{
// 1. Let document be a new Document, whose content type is type and url is this's relevant global object's associated Document's URL.
auto document = DOM::Document::create(realm(), verify_cast<HTML::Window>(relevant_global_object(*this)).associated_document().url());
- document->set_content_type(Bindings::idl_enum_to_string(type));
+ document->set_content_type(Bindings::idl_enum_to_deprecated_string(type));
// 2. Switch on type:
if (type == Bindings::DOMParserSupportedType::Text_Html) {
diff --git a/Userland/Libraries/LibWeb/HTML/DOMStringMap.cpp b/Userland/Libraries/LibWeb/HTML/DOMStringMap.cpp
index 976e41bf0a..60dff8eb6d 100644
--- a/Userland/Libraries/LibWeb/HTML/DOMStringMap.cpp
+++ b/Userland/Libraries/LibWeb/HTML/DOMStringMap.cpp
@@ -74,7 +74,7 @@ Vector<DOMStringMap::NameValuePair> DOMStringMap::get_name_value_pairs() const
builder.append(current_character);
}
- list.append({ builder.to_string(), value });
+ list.append({ builder.to_deprecated_string(), value });
});
// 4. Return list.
@@ -139,7 +139,7 @@ WebIDL::ExceptionOr<void> DOMStringMap::set_value_of_new_named_property(Deprecat
builder.append(current_character);
}
- auto data_name = builder.to_string();
+ auto data_name = builder.to_deprecated_string();
// FIXME: 4. If name does not match the XML Name production, throw an "InvalidCharacterError" DOMException.
@@ -176,7 +176,7 @@ bool DOMStringMap::delete_existing_named_property(DeprecatedString const& name)
}
// Remove an attribute by name given name and the DOMStringMap's associated element.
- auto data_name = builder.to_string();
+ auto data_name = builder.to_deprecated_string();
m_associated_element->remove_attribute(data_name);
// The spec doesn't have the step. This indicates that the deletion was successful.
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp
index d533f934c7..66d41240df 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp
@@ -94,7 +94,7 @@ DeprecatedString HTMLBaseElement::href() const
return url;
// 5. Return the serialization of urlRecord.
- return url_record.to_string();
+ return url_record.to_deprecated_string();
}
// https://html.spec.whatwg.org/multipage/semantics.html#dom-base-href
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp
index d2bbadc429..587eddd683 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp
@@ -177,7 +177,7 @@ DeprecatedString HTMLCanvasElement::to_data_url(DeprecatedString const& type, [[
if (type != "image/png")
return {};
auto encoded_bitmap = Gfx::PNGWriter::encode(*m_bitmap);
- return AK::URL::create_with_data(type, encode_base64(encoded_bitmap), true).to_string();
+ return AK::URL::create_with_data(type, encode_base64(encoded_bitmap), true).to_deprecated_string();
}
void HTMLCanvasElement::present()
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
index 2a32de5ad3..cd281a7ea3 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
@@ -157,7 +157,7 @@ DeprecatedString HTMLElement::inner_text()
};
recurse(*layout_node());
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// // https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsettop
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
index fa0669e55b..93a39dea6a 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
@@ -158,7 +158,7 @@ DeprecatedString HTMLFormElement::action() const
// Return the current URL if the action attribute is null or an empty string
if (value.is_null() || value.is_empty()) {
- return document().url().to_string();
+ return document().url().to_deprecated_string();
}
return value;
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp b/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp
index dfcc28de18..110263cf81 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp
@@ -504,7 +504,7 @@ void HTMLHyperlinkElementUtils::follow_the_hyperlink(Optional<DeprecatedString>
auto url = source->active_document()->parse_url(href());
// 10. If that is successful, let URL be the resulting URL string.
- auto url_string = url.to_string();
+ auto url_string = url.to_deprecated_string();
// 11. Otherwise, if parsing the URL failed, the user agent may report the
// error to the user in a user-agent-specific manner, may queue an element
@@ -519,7 +519,7 @@ void HTMLHyperlinkElementUtils::follow_the_hyperlink(Optional<DeprecatedString>
url_builder.append(url_string);
url_builder.append(*hyperlink_suffix);
- url_string = url_builder.to_string();
+ url_string = url_builder.to_deprecated_string();
}
// FIXME: 13. Let request be a new request whose URL is URL and whose
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
index 5642e926f5..aa8d45a434 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
@@ -352,7 +352,7 @@ Optional<DeprecatedString> HTMLInputElement::placeholder_value() const
if (ch != '\r' && ch != '\n')
builder.append(ch);
}
- placeholder = builder.to_string();
+ placeholder = builder.to_deprecated_string();
}
return placeholder;
@@ -477,7 +477,7 @@ DeprecatedString HTMLInputElement::value_sanitization_algorithm(DeprecatedString
if (!(c == '\r' || c == '\n'))
builder.append(c);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
} else if (type_state() == HTMLInputElement::TypeAttributeState::URL) {
// Strip newlines from the value, then strip leading and trailing ASCII whitespace from the value.
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
index 5470f44e60..10a81b0c6e 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
@@ -36,7 +36,7 @@ void HTMLObjectElement::parse_attribute(FlyString const& name, DeprecatedString
DeprecatedString HTMLObjectElement::data() const
{
auto data = attribute(HTML::AttributeNames::data);
- return document().parse_url(data).to_string();
+ return document().parse_url(data).to_deprecated_string();
}
JS::GCPtr<Layout::Node> HTMLObjectElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
index 3cd643d792..4a39299a27 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
@@ -361,7 +361,7 @@ void HTMLScriptElement::prepare_script()
if (m_script_type == ScriptType::Classic) {
// 1. Let script be the result of creating a classic script using source text, settings object, base URL, and options.
// FIXME: Pass options.
- auto script = ClassicScript::create(m_document->url().to_string(), source_text, settings_object, base_url, m_source_line_number);
+ auto script = ClassicScript::create(m_document->url().to_deprecated_string(), source_text, settings_object, base_url, m_source_line_number);
// 2. Mark as ready el given script.
mark_as_ready(Result(move(script)));
@@ -373,7 +373,7 @@ void HTMLScriptElement::prepare_script()
// 2. Fetch an inline module script graph, given source text, base URL, settings object, options, and with the following steps given result:
// FIXME: Pass options
- fetch_inline_module_script_graph(m_document->url().to_string(), source_text, base_url, document().relevant_settings_object(), [this](auto const* result) {
+ fetch_inline_module_script_graph(m_document->url().to_deprecated_string(), source_text, base_url, document().relevant_settings_object(), [this](auto const* result) {
// 1. Mark as ready el given result.
if (!result)
mark_as_ready(ResultState::Null {});
@@ -510,7 +510,7 @@ void HTMLScriptElement::resource_did_load()
}
}
- auto script = ClassicScript::create(resource()->url().to_string(), data, document().relevant_settings_object(), AK::URL());
+ auto script = ClassicScript::create(resource()->url().to_deprecated_string(), data, document().relevant_settings_object(), AK::URL());
// When the chosen algorithm asynchronously completes, set the script's script to the result. At that time, the script is ready.
mark_as_ready(Result(script));
diff --git a/Userland/Libraries/LibWeb/HTML/Origin.h b/Userland/Libraries/LibWeb/HTML/Origin.h
index 1f4f565477..62f32dc03a 100644
--- a/Userland/Libraries/LibWeb/HTML/Origin.h
+++ b/Userland/Libraries/LibWeb/HTML/Origin.h
@@ -89,7 +89,7 @@ public:
result.append(DeprecatedString::number(port()));
}
// 6. Return result
- return result.to_string();
+ return result.to_deprecated_string();
}
// https://html.spec.whatwg.org/multipage/origin.html#concept-origin-effective-domain
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp
index 72485438f7..74a688b68c 100644
--- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp
@@ -109,7 +109,7 @@ JS::GCPtr<DOM::Attr> prescan_get_attribute(DOM::Document& document, ByteBuffer c
} else if (input[position] == '\t' || input[position] == '\n' || input[position] == '\f' || input[position] == '\r' || input[position] == ' ')
goto spaces;
else if (input[position] == '/' || input[position] == '>')
- return *DOM::Attr::create(document, attribute_name.to_string(), "");
+ return *DOM::Attr::create(document, attribute_name.to_deprecated_string(), "");
else
attribute_name.append_as_lowercase(input[position]);
++position;
@@ -121,7 +121,7 @@ spaces:
if (!prescan_skip_whitespace_and_slashes(input, position))
return {};
if (input[position] != '=')
- return DOM::Attr::create(document, attribute_name.to_string(), "");
+ return DOM::Attr::create(document, attribute_name.to_deprecated_string(), "");
++position;
value:
@@ -134,13 +134,13 @@ value:
++position;
for (; !prescan_should_abort(input, position); ++position) {
if (input[position] == quote_character)
- return DOM::Attr::create(document, attribute_name.to_string(), attribute_value.to_string());
+ return DOM::Attr::create(document, attribute_name.to_deprecated_string(), attribute_value.to_deprecated_string());
else
attribute_value.append_as_lowercase(input[position]);
}
return {};
} else if (input[position] == '>')
- return DOM::Attr::create(document, attribute_name.to_string(), "");
+ return DOM::Attr::create(document, attribute_name.to_deprecated_string(), "");
else
attribute_value.append_as_lowercase(input[position]);
@@ -150,7 +150,7 @@ value:
for (; !prescan_should_abort(input, position); ++position) {
if (input[position] == '\t' || input[position] == '\n' || input[position] == '\f' || input[position] == '\r' || input[position] == ' ' || input[position] == '>')
- return DOM::Attr::create(document, attribute_name.to_string(), attribute_value.to_string());
+ return DOM::Attr::create(document, attribute_name.to_deprecated_string(), attribute_value.to_deprecated_string());
else
attribute_value.append_as_lowercase(input[position]);
}
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp
index 6da35de951..fb12da26a6 100644
--- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp
@@ -170,7 +170,7 @@ void HTMLParser::run()
break;
auto& token = optional_token.value();
- dbgln_if(HTML_PARSER_DEBUG, "[{}] {}", insertion_mode_name(), token.to_string());
+ dbgln_if(HTML_PARSER_DEBUG, "[{}] {}", insertion_mode_name(), token.to_deprecated_string());
// https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
// As each token is emitted from the tokenizer, the user agent must follow the appropriate steps from the following list, known as the tree construction dispatcher:
@@ -954,7 +954,7 @@ void HTMLParser::flush_character_insertions()
{
if (m_character_insertion_builder.is_empty())
return;
- m_character_insertion_node->set_data(m_character_insertion_builder.to_string());
+ m_character_insertion_node->set_data(m_character_insertion_builder.to_deprecated_string());
m_character_insertion_node->parent()->children_changed();
m_character_insertion_builder.clear();
}
@@ -3604,7 +3604,7 @@ DeprecatedString HTMLParser::serialize_html_fragment(DOM::Node const& node)
else
builder.append(ch);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
};
// 2. Let s be a string, and initialize it to the empty string.
@@ -3752,7 +3752,7 @@ DeprecatedString HTMLParser::serialize_html_fragment(DOM::Node const& node)
});
// 5. Return s.
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#current-dimension-value
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.cpp
index 3bcc635007..f77a6f91da 100644
--- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.cpp
@@ -8,7 +8,7 @@
namespace Web::HTML {
-DeprecatedString HTMLToken::to_string() const
+DeprecatedString HTMLToken::to_deprecated_string() const
{
StringBuilder builder;
@@ -70,7 +70,7 @@ DeprecatedString HTMLToken::to_string() const
builder.appendff("@{}:{}-{}:{}", m_start_position.line, m_start_position.column, m_end_position.line, m_end_position.column);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h
index 6523014931..d42562d774 100644
--- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h
+++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h
@@ -315,7 +315,7 @@ public:
Type type() const { return m_type; }
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
Position const& start_position() const { return m_start_position; }
Position const& end_position() const { return m_end_position; }
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
index bd992f124e..aa4c066193 100644
--- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
@@ -2887,7 +2887,7 @@ void HTMLTokenizer::restore_to(Utf8CodePointIterator const& new_iterator)
DeprecatedString HTMLTokenizer::consume_current_builder()
{
- auto string = m_current_builder.to_string();
+ auto string = m_current_builder.to_deprecated_string();
m_current_builder.clear();
return string;
}
diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp
index 39abf3ffe7..2fdc908821 100644
--- a/Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp
@@ -53,7 +53,7 @@ JS::NonnullGCPtr<ClassicScript> ClassicScript::create(DeprecatedString filename,
// 11. If result is a list of errors, then:
if (result.is_error()) {
auto& parse_error = result.error().first();
- dbgln_if(HTML_SCRIPT_DEBUG, "ClassicScript: Failed to parse: {}", parse_error.to_string());
+ dbgln_if(HTML_SCRIPT_DEBUG, "ClassicScript: Failed to parse: {}", parse_error.to_deprecated_string());
// FIXME: 1. Set script's parse error and its error to rethrow to result[0].
// We do not have parse error as it would currently go unused.
@@ -90,7 +90,7 @@ JS::Completion ClassicScript::run(RethrowErrors rethrow_errors)
// 5. If script's error to rethrow is not null, then set evaluationStatus to Completion { [[Type]]: throw, [[Value]]: script's error to rethrow, [[Target]]: empty }.
if (m_error_to_rethrow.has_value()) {
- evaluation_status = vm.throw_completion<JS::SyntaxError>(m_error_to_rethrow.value().to_string());
+ evaluation_status = vm.throw_completion<JS::SyntaxError>(m_error_to_rethrow.value().to_deprecated_string());
} else {
auto timer = Core::ElapsedTimer::start_new();
diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/ModuleMap.h b/Userland/Libraries/LibWeb/HTML/Scripting/ModuleMap.h
index 3599207b0b..7d177b2695 100644
--- a/Userland/Libraries/LibWeb/HTML/Scripting/ModuleMap.h
+++ b/Userland/Libraries/LibWeb/HTML/Scripting/ModuleMap.h
@@ -74,7 +74,7 @@ template<>
struct Traits<Web::HTML::ModuleLocationTuple> : public GenericTraits<Web::HTML::ModuleLocationTuple> {
static unsigned hash(Web::HTML::ModuleLocationTuple const& tuple)
{
- return pair_int_hash(tuple.url().to_string().hash(), tuple.type().hash());
+ return pair_int_hash(tuple.url().to_deprecated_string().hash(), tuple.type().hash());
}
};
diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp
index daac2b986f..b0536be3b7 100644
--- a/Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Scripting/ModuleScript.cpp
@@ -57,7 +57,7 @@ JS::GCPtr<JavaScriptModuleScript> JavaScriptModuleScript::create(DeprecatedStrin
// 8. If result is a list of errors, then:
if (result.is_error()) {
auto& parse_error = result.error().first();
- dbgln("JavaScriptModuleScript: Failed to parse: {}", parse_error.to_string());
+ dbgln("JavaScriptModuleScript: Failed to parse: {}", parse_error.to_deprecated_string());
// FIXME: 1. Set script's parse error to result[0].
diff --git a/Userland/Libraries/LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.cpp b/Userland/Libraries/LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.cpp
index 44e5b74c39..feb247cde8 100644
--- a/Userland/Libraries/LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.cpp
+++ b/Userland/Libraries/LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.cpp
@@ -71,7 +71,7 @@ void SyntaxHighlighter::rehighlight(Palette const& palette)
auto token = tokenizer.next_token();
if (!token.has_value() || token.value().is_end_of_file())
break;
- dbgln_if(SYNTAX_HIGHLIGHTING_DEBUG, "(HTML::SyntaxHighlighter) got token of type {}", token->to_string());
+ dbgln_if(SYNTAX_HIGHLIGHTING_DEBUG, "(HTML::SyntaxHighlighter) got token of type {}", token->to_deprecated_string());
if (token->is_start_tag()) {
if (token->tag_name() == "script"sv) {
diff --git a/Userland/Libraries/LibWeb/HTML/Worker.cpp b/Userland/Libraries/LibWeb/HTML/Worker.cpp
index 06d0cf1d08..23ad8dc99a 100644
--- a/Userland/Libraries/LibWeb/HTML/Worker.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Worker.cpp
@@ -247,7 +247,7 @@ void Worker::run_a_worker(AK::URL& url, EnvironmentSettingsObject& outside_setti
// Asynchronously complete the perform the fetch steps with response.
dbgln_if(WEB_WORKER_DEBUG, "WebWorker: Script ready!");
- auto script = ClassicScript::create(url.to_string(), data, *m_inner_settings, AK::URL());
+ auto script = ClassicScript::create(url.to_deprecated_string(), data, *m_inner_settings, AK::URL());
// NOTE: Steps 15-31 below pick up after step 14 in the main context, steps 1-10 above
// are only for validation when used in a top-level case (ie: from a Window)
diff --git a/Userland/Libraries/LibWeb/Infra/JSON.cpp b/Userland/Libraries/LibWeb/Infra/JSON.cpp
index c1db9ad874..66d2b3e74e 100644
--- a/Userland/Libraries/LibWeb/Infra/JSON.cpp
+++ b/Userland/Libraries/LibWeb/Infra/JSON.cpp
@@ -48,7 +48,7 @@ WebIDL::ExceptionOr<DeprecatedString> serialize_javascript_value_to_json_string(
VERIFY(result.is_string());
// 4. Return result.
- return result.as_string().string();
+ return result.as_string().deprecated_string();
}
// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-json-bytes
diff --git a/Userland/Libraries/LibWeb/Layout/AvailableSpace.cpp b/Userland/Libraries/LibWeb/Layout/AvailableSpace.cpp
index fa4c131e9e..f452d877cc 100644
--- a/Userland/Libraries/LibWeb/Layout/AvailableSpace.cpp
+++ b/Userland/Libraries/LibWeb/Layout/AvailableSpace.cpp
@@ -29,7 +29,7 @@ AvailableSize AvailableSize::make_max_content()
return AvailableSize { Type::MaxContent, INFINITY };
}
-DeprecatedString AvailableSize::to_string() const
+DeprecatedString AvailableSize::to_deprecated_string() const
{
switch (m_type) {
case Type::Definite:
@@ -44,7 +44,7 @@ DeprecatedString AvailableSize::to_string() const
VERIFY_NOT_REACHED();
}
-DeprecatedString AvailableSpace::to_string() const
+DeprecatedString AvailableSpace::to_deprecated_string() const
{
return DeprecatedString::formatted("{} x {}", width, height);
}
diff --git a/Userland/Libraries/LibWeb/Layout/AvailableSpace.h b/Userland/Libraries/LibWeb/Layout/AvailableSpace.h
index 5ca85a7187..ce6de61beb 100644
--- a/Userland/Libraries/LibWeb/Layout/AvailableSpace.h
+++ b/Userland/Libraries/LibWeb/Layout/AvailableSpace.h
@@ -44,7 +44,7 @@ public:
return m_value;
}
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
AvailableSize(Type type, float);
@@ -64,7 +64,7 @@ public:
AvailableSize width;
AvailableSize height;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
};
}
@@ -73,7 +73,7 @@ template<>
struct AK::Formatter<Web::Layout::AvailableSize> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::Layout::AvailableSize const& available_size)
{
- return Formatter<StringView>::format(builder, available_size.to_string());
+ return Formatter<StringView>::format(builder, available_size.to_deprecated_string());
}
};
@@ -81,6 +81,6 @@ template<>
struct AK::Formatter<Web::Layout::AvailableSpace> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::Layout::AvailableSpace const& available_space)
{
- return Formatter<StringView>::format(builder, available_space.to_string());
+ return Formatter<StringView>::format(builder, available_space.to_deprecated_string());
}
};
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
index 69b9080ad1..edf2f8d1b1 100644
--- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
@@ -160,7 +160,7 @@ OwnPtr<FormattingContext> FormattingContext::create_independent_formatting_conte
// The child box is a block container that doesn't create its own BFC.
// It will be formatted by this BFC.
if (!child_display.is_flow_inside()) {
- dbgln("FIXME: Child box doesn't create BFC, but inside is also not flow! display={}", child_display.to_string());
+ dbgln("FIXME: Child box doesn't create BFC, but inside is also not flow! display={}", child_display.to_deprecated_string());
// HACK: Instead of crashing, create a dummy formatting context that does nothing.
// FIXME: Remove this once it's no longer needed. It currently swallows problem with standalone
// table-related boxes that don't get fixed up by CSS anonymous table box generation.
diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp
index 8ed3275e06..d2dd45beb0 100644
--- a/Userland/Libraries/LibWeb/Layout/Node.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Node.cpp
@@ -601,7 +601,7 @@ DeprecatedString Node::debug_description() const
} else {
builder.append("(anonymous)"sv);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
CSS::Display Node::display() const
diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.cpp b/Userland/Libraries/LibWeb/Layout/TextNode.cpp
index a2e0fd3fe0..4902339046 100644
--- a/Userland/Libraries/LibWeb/Layout/TextNode.cpp
+++ b/Userland/Libraries/LibWeb/Layout/TextNode.cpp
@@ -88,7 +88,7 @@ void TextNode::compute_text_for_rendering(bool collapse)
}
}
- m_text_for_rendering = builder.to_string();
+ m_text_for_rendering = builder.to_deprecated_string();
}
TextNode::ChunkIterator::ChunkIterator(StringView text, bool wrap_lines, bool respect_linebreaks, bool is_generated_empty_string)
diff --git a/Userland/Libraries/LibWeb/Loader/ContentFilter.cpp b/Userland/Libraries/LibWeb/Loader/ContentFilter.cpp
index dc402a2fab..4caabbef1d 100644
--- a/Userland/Libraries/LibWeb/Loader/ContentFilter.cpp
+++ b/Userland/Libraries/LibWeb/Loader/ContentFilter.cpp
@@ -24,7 +24,7 @@ bool ContentFilter::is_filtered(const AK::URL& url) const
if (url.scheme() == "data")
return false;
- auto url_string = url.to_string();
+ auto url_string = url.to_deprecated_string();
for (auto& pattern : m_patterns) {
if (url_string.matches(pattern.text, CaseSensitivity::CaseSensitive))
@@ -41,7 +41,7 @@ void ContentFilter::add_pattern(DeprecatedString const& pattern)
builder.append(pattern);
if (!pattern.ends_with('*'))
builder.append('*');
- m_patterns.empend(builder.to_string());
+ m_patterns.empend(builder.to_deprecated_string());
}
}
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
index 1143882422..8c0f8de912 100644
--- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
@@ -150,7 +150,7 @@ static bool build_image_document(DOM::Document& document, ByteBuffer const& data
MUST(html_element->append_child(body_element));
auto image_element = document.create_element("img").release_value();
- MUST(image_element->set_attribute(HTML::AttributeNames::src, document.url().to_string()));
+ MUST(image_element->set_attribute(HTML::AttributeNames::src, document.url().to_deprecated_string()));
MUST(body_element->append_child(image_element));
return true;
@@ -342,7 +342,7 @@ void FrameLoader::load_error_page(const AK::URL& failed_url, DeprecatedString co
VERIFY(!data.is_null());
StringBuilder builder;
SourceGenerator generator { builder };
- generator.set("failed_url", escape_html_entities(failed_url.to_string()));
+ generator.set("failed_url", escape_html_entities(failed_url.to_deprecated_string()));
generator.set("error", escape_html_entities(error));
generator.append(data);
load_html(generator.as_string_view(), failed_url);
diff --git a/Userland/Libraries/LibWeb/Loader/LoadRequest.h b/Userland/Libraries/LibWeb/Loader/LoadRequest.h
index 244336cfa5..ff21d0dc4a 100644
--- a/Userland/Libraries/LibWeb/Loader/LoadRequest.h
+++ b/Userland/Libraries/LibWeb/Loader/LoadRequest.h
@@ -45,7 +45,7 @@ public:
{
auto body_hash = string_hash((char const*)m_body.data(), m_body.size());
auto body_and_headers_hash = pair_int_hash(body_hash, m_headers.hash());
- auto url_and_method_hash = pair_int_hash(m_url.to_string().hash(), m_method.hash());
+ auto url_and_method_hash = pair_int_hash(m_url.to_deprecated_string().hash(), m_method.hash());
return pair_int_hash(body_and_headers_hash, url_and_method_hash);
}
diff --git a/Userland/Libraries/LibWeb/Loader/ProxyMappings.cpp b/Userland/Libraries/LibWeb/Loader/ProxyMappings.cpp
index e3792e968e..687ea485fe 100644
--- a/Userland/Libraries/LibWeb/Loader/ProxyMappings.cpp
+++ b/Userland/Libraries/LibWeb/Loader/ProxyMappings.cpp
@@ -14,7 +14,7 @@ Web::ProxyMappings& Web::ProxyMappings::the()
Core::ProxyData Web::ProxyMappings::proxy_for_url(AK::URL const& url) const
{
- auto url_string = url.to_string();
+ auto url_string = url.to_deprecated_string();
for (auto& it : m_mappings) {
if (url_string.matches(it.key)) {
auto result = Core::ProxyData::parse_url(m_proxies[it.value]);
diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
index b041aa44c2..ef061baa0b 100644
--- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
@@ -122,7 +122,7 @@ static DeprecatedString sanitized_url_for_logging(AK::URL const& url)
{
if (url.scheme() == "data"sv)
return DeprecatedString::formatted("[data URL, mime-type={}, size={}]", url.data_mime_type(), url.data_payload().length());
- return url.to_string();
+ return url.to_deprecated_string();
}
static void emit_signpost(DeprecatedString const& message, int id)
@@ -307,7 +307,7 @@ void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, Has
error_builder.append("Load failed"sv);
log_failure(request, error_builder.string_view());
if (error_callback)
- error_callback(error_builder.to_string(), status_code);
+ error_callback(error_builder.to_deprecated_string(), status_code);
return;
}
log_success(request);
diff --git a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp
index 4bdb6b0850..b138a6e412 100644
--- a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp
+++ b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp
@@ -220,7 +220,7 @@ DeprecatedString MimeType::serialized() const
}
// 3. Return serialization.
- return serialization.to_string();
+ return serialization.to_deprecated_string();
}
void MimeType::set_parameter(DeprecatedString const& name, DeprecatedString const& value)
diff --git a/Userland/Libraries/LibWeb/Page/EditEventHandler.cpp b/Userland/Libraries/LibWeb/Page/EditEventHandler.cpp
index b5b411b009..d5369010de 100644
--- a/Userland/Libraries/LibWeb/Page/EditEventHandler.cpp
+++ b/Userland/Libraries/LibWeb/Page/EditEventHandler.cpp
@@ -31,7 +31,7 @@ void EditEventHandler::handle_delete_character_after(const DOM::Position& cursor
StringBuilder builder;
builder.append(text.substring_view(0, cursor_position.offset()));
builder.append(text.substring_view(cursor_position.offset() + code_point_length));
- node.set_data(builder.to_string());
+ node.set_data(builder.to_deprecated_string());
// FIXME: When nodes are removed from the DOM, the associated layout nodes become stale and still
// remain in the layout tree. This has to be fixed, this just causes everything to be recomputed
@@ -52,7 +52,7 @@ void EditEventHandler::handle_delete(DOM::Range& range)
builder.append(start->data().substring_view(0, range.start_offset()));
builder.append(end->data().substring_view(range.end_offset()));
- start->set_data(builder.to_string());
+ start->set_data(builder.to_deprecated_string());
} else {
// Remove all the nodes that are fully enclosed in the range.
HashTable<DOM::Node*> queued_for_deletion;
@@ -90,7 +90,7 @@ void EditEventHandler::handle_delete(DOM::Range& range)
builder.append(start->data().substring_view(0, range.start_offset()));
builder.append(end->data().substring_view(range.end_offset()));
- start->set_data(builder.to_string());
+ start->set_data(builder.to_deprecated_string());
end->remove();
}
@@ -111,7 +111,7 @@ void EditEventHandler::handle_insert(DOM::Position position, u32 code_point)
builder.append(node.data().substring_view(0, position.offset()));
builder.append_code_point(code_point);
builder.append(node.data().substring_view(position.offset()));
- node.set_data(builder.to_string());
+ node.set_data(builder.to_deprecated_string());
node.invalidate_style();
}
diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
index 73b87f496d..c54f758d5f 100644
--- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
+++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
@@ -201,7 +201,7 @@ void PaintableBox::paint(PaintContext& context, PaintPhase phase) const
else
builder.append(layout_box().debug_description());
builder.appendff(" {}x{} @ {},{}", border_rect.width(), border_rect.height(), border_rect.x(), border_rect.y());
- auto size_text = builder.to_string();
+ auto size_text = builder.to_deprecated_string();
auto size_text_rect = border_rect;
size_text_rect.set_y(border_rect.y() + border_rect.height());
size_text_rect.set_top(size_text_rect.top());
diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
index 7c71d31ac7..747008ab46 100644
--- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
+++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
@@ -319,7 +319,7 @@ Gfx::FloatMatrix4x4 StackingContext::get_transformation_matrix(CSS::Transformati
return Gfx::rotation_matrix({ 0.0f, 0.0f, 1.0f }, value(0));
break;
default:
- dbgln_if(LIBWEB_CSS_DEBUG, "FIXME: Unhandled transformation function {}", CSS::TransformationStyleValue::create(transformation.function, {})->to_string());
+ dbgln_if(LIBWEB_CSS_DEBUG, "FIXME: Unhandled transformation function {}", CSS::TransformationStyleValue::create(transformation.function, {})->to_deprecated_string());
}
return Gfx::FloatMatrix4x4::identity();
}
diff --git a/Userland/Libraries/LibWeb/SecureContexts/AbstractOperations.cpp b/Userland/Libraries/LibWeb/SecureContexts/AbstractOperations.cpp
index 6e94b6f44f..9163e1d785 100644
--- a/Userland/Libraries/LibWeb/SecureContexts/AbstractOperations.cpp
+++ b/Userland/Libraries/LibWeb/SecureContexts/AbstractOperations.cpp
@@ -30,7 +30,7 @@ Trustworthiness is_origin_potentially_trustworthy(HTML::Origin const& origin)
// 4. If origin’s host matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return "Potentially Trustworthy".
if (auto ipv4_address = IPv4Address::from_string(origin.host()); ipv4_address.has_value() && (ipv4_address->to_u32() & 0xff000000) != 0)
return Trustworthiness::PotentiallyTrustworthy;
- if (auto ipv6_address = IPv6Address::from_string(origin.host()); ipv6_address.has_value() && ipv6_address->to_string() == "::1")
+ if (auto ipv6_address = IPv6Address::from_string(origin.host()); ipv6_address.has_value() && ipv6_address->to_deprecated_string() == "::1")
return Trustworthiness::PotentiallyTrustworthy;
// 5. If the user agent conforms to the name resolution rules in [let-localhost-be-localhost] and one of the following is true:
diff --git a/Userland/Libraries/LibWeb/Selection/Selection.cpp b/Userland/Libraries/LibWeb/Selection/Selection.cpp
index 953f3e3e36..8f6cc66a58 100644
--- a/Userland/Libraries/LibWeb/Selection/Selection.cpp
+++ b/Userland/Libraries/LibWeb/Selection/Selection.cpp
@@ -329,13 +329,13 @@ bool Selection::contains_node(JS::NonnullGCPtr<DOM::Node> node, bool allow_parti
&& (end_relative_position == DOM::RelativeBoundaryPointPosition::Equal || end_relative_position == DOM::RelativeBoundaryPointPosition::After);
}
-DeprecatedString Selection::to_string() const
+DeprecatedString Selection::to_deprecated_string() const
{
// FIXME: This needs more work to be compatible with other engines.
// See https://www.w3.org/Bugs/Public/show_bug.cgi?id=10583
if (!m_range)
return DeprecatedString::empty();
- return m_range->to_string();
+ return m_range->to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWeb/Selection/Selection.h b/Userland/Libraries/LibWeb/Selection/Selection.h
index bad87c5307..fbccc7e780 100644
--- a/Userland/Libraries/LibWeb/Selection/Selection.h
+++ b/Userland/Libraries/LibWeb/Selection/Selection.h
@@ -48,7 +48,7 @@ public:
delete_from_document();
bool contains_node(JS::NonnullGCPtr<DOM::Node>, bool allow_partial_containment) const;
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
private:
Selection(JS::NonnullGCPtr<JS::Realm>, JS::NonnullGCPtr<DOM::Document>);
diff --git a/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp b/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp
index 0c4c3815ac..808380be92 100644
--- a/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp
+++ b/Userland/Libraries/LibWeb/URL/URLSearchParams.cpp
@@ -38,7 +38,7 @@ DeprecatedString url_encode(Vector<QueryParam> const& pairs, AK::URL::PercentEnc
if (i != pairs.size() - 1)
builder.append('&');
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
Vector<QueryParam> url_decode(StringView input)
@@ -156,7 +156,7 @@ void URLSearchParams::update()
if (!m_url)
return;
// 2. Let serializedQuery be the serialization of query’s list.
- auto serialized_query = to_string();
+ auto serialized_query = to_deprecated_string();
// 3. If serializedQuery is the empty string, then set serializedQuery to null.
if (serialized_query.is_empty())
serialized_query = {};
@@ -255,7 +255,7 @@ void URLSearchParams::sort()
update();
}
-DeprecatedString URLSearchParams::to_string() const
+DeprecatedString URLSearchParams::to_deprecated_string() const
{
// return the serialization of this’s list.
return url_encode(m_list, AK::URL::PercentEncodeSet::ApplicationXWWWFormUrlencoded);
diff --git a/Userland/Libraries/LibWeb/URL/URLSearchParams.h b/Userland/Libraries/LibWeb/URL/URLSearchParams.h
index 05a72ffa4e..02f5fb708e 100644
--- a/Userland/Libraries/LibWeb/URL/URLSearchParams.h
+++ b/Userland/Libraries/LibWeb/URL/URLSearchParams.h
@@ -37,7 +37,7 @@ public:
void sort();
- DeprecatedString to_string() const;
+ DeprecatedString to_deprecated_string() const;
using ForEachCallback = Function<JS::ThrowCompletionOr<void>(DeprecatedString const&, DeprecatedString const&)>;
JS::ThrowCompletionOr<void> for_each(ForEachCallback);
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
index e20b028523..4d28a8362e 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
@@ -141,7 +141,7 @@ JS::ThrowCompletionOr<size_t> parse_module(JS::VM& vm, JS::Object* buffer_object
};
if (module_result.is_error()) {
// FIXME: Throw CompileError instead.
- return vm.throw_completion<JS::TypeError>(Wasm::parse_error_to_string(module_result.error()));
+ return vm.throw_completion<JS::TypeError>(Wasm::parse_error_to_deprecated_string(module_result.error()));
}
if (auto validation_result = WebAssemblyObject::s_abstract_machine.validate(module_result.value()); validation_result.is_error()) {
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp
index 6b7076fbad..ca14bc3d8b 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp
@@ -35,7 +35,7 @@ JS::ThrowCompletionOr<JS::Object*> WebAssemblyTableConstructor::construct(Functi
auto element_value = TRY(descriptor->get("element"));
if (!element_value.is_string())
return vm.throw_completion<JS::TypeError>(JS::ErrorType::InvalidHint, element_value.to_string_without_side_effects());
- auto& element = element_value.as_string().string();
+ auto& element = element_value.as_string().deprecated_string();
Optional<Wasm::ValueType> reference_type;
if (element == "anyfunc"sv)
diff --git a/Userland/Libraries/LibWeb/WebDriver/Client.cpp b/Userland/Libraries/LibWeb/WebDriver/Client.cpp
index 175e6bc87f..05e1d0564a 100644
--- a/Userland/Libraries/LibWeb/WebDriver/Client.cpp
+++ b/Userland/Libraries/LibWeb/WebDriver/Client.cpp
@@ -106,7 +106,7 @@ static constexpr auto s_webdriver_endpoints = Array {
// https://w3c.github.io/webdriver/#dfn-match-a-request
static ErrorOr<MatchedRoute, Error> match_route(HTTP::HttpRequest const& request)
{
- dbgln_if(WEBDRIVER_DEBUG, "match_route({}, {})", HTTP::to_string(request.method()), request.resource());
+ dbgln_if(WEBDRIVER_DEBUG, "match_route({}, {})", HTTP::to_deprecated_string(request.method()), request.resource());
auto request_path = request.resource().view();
Vector<StringView> parameters;
@@ -125,7 +125,7 @@ static ErrorOr<MatchedRoute, Error> match_route(HTTP::HttpRequest const& request
};
for (auto const& route : s_webdriver_endpoints) {
- dbgln_if(WEBDRIVER_DEBUG, "- Checking {} {}", HTTP::to_string(route.method), route.path);
+ dbgln_if(WEBDRIVER_DEBUG, "- Checking {} {}", HTTP::to_deprecated_string(route.method), route.path);
if (route.method != request.method())
continue;
@@ -252,7 +252,7 @@ ErrorOr<void, Client::WrappedError> Client::handle_request(JsonValue body)
if constexpr (WEBDRIVER_DEBUG) {
dbgln("Got HTTP request: {} {}", m_request->method_name(), m_request->resource());
if (!body.is_null())
- dbgln("Body: {}", body.to_string());
+ dbgln("Body: {}", body.to_deprecated_string());
}
auto const& [handler, parameters] = TRY(match_route(*m_request));
@@ -325,7 +325,7 @@ ErrorOr<void, Client::WrappedError> Client::send_error_response(Error const& err
void Client::log_response(unsigned code)
{
- outln("{} :: {:03d} :: {} {}", Core::DateTime::now().to_string(), code, m_request->method_name(), m_request->resource());
+ outln("{} :: {:03d} :: {} {}", Core::DateTime::now().to_deprecated_string(), code, m_request->method_name(), m_request->resource());
}
}
diff --git a/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp b/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp
index 0909fbf36e..28a801f15a 100644
--- a/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp
+++ b/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp
@@ -95,7 +95,7 @@ static ErrorOr<JsonValue, ExecuteScriptResultType> internal_json_clone_algorithm
if (value.is_number())
return JsonValue { value.as_double() };
if (value.is_string())
- return JsonValue { value.as_string().string() };
+ return JsonValue { value.as_string().deprecated_string() };
// NOTE: BigInt and Symbol not mentioned anywhere in the WebDriver spec, as it references ES5.
// It assumes that all primitives are handled above, and the value is an object for the remaining steps.
@@ -114,7 +114,7 @@ static ErrorOr<JsonValue, ExecuteScriptResultType> internal_json_clone_algorithm
auto to_json_result = TRY_OR_JS_ERROR(to_json.as_function().internal_call(value, JS::MarkedVector<JS::Value> { vm.heap() }));
if (!to_json_result.is_string())
return ExecuteScriptResultType::JavaScriptError;
- return to_json_result.as_string().string();
+ return to_json_result.as_string().deprecated_string();
}
// -> Otherwise
diff --git a/Userland/Libraries/LibWeb/WebSockets/WebSocket.h b/Userland/Libraries/LibWeb/WebSockets/WebSocket.h
index efeb2f5f16..d931c5a810 100644
--- a/Userland/Libraries/LibWeb/WebSockets/WebSocket.h
+++ b/Userland/Libraries/LibWeb/WebSockets/WebSocket.h
@@ -41,7 +41,7 @@ public:
virtual ~WebSocket() override;
- DeprecatedString url() const { return m_url.to_string(); }
+ DeprecatedString url() const { return m_url.to_deprecated_string(); }
#undef __ENUMERATE
#define __ENUMERATE(attribute_name, event_name) \
diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
index 1c46f01c0d..a5885d1a0c 100644
--- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
+++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
@@ -439,7 +439,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
body_with_type = TRY(Fetch::extract_body(realm, body->downcast<Fetch::BodyInitOrReadableBytes>()));
}
- AK::URL request_url = m_window->associated_document().parse_url(m_request_url.to_string());
+ AK::URL request_url = m_window->associated_document().parse_url(m_request_url.to_deprecated_string());
dbgln("XHR send from {} to {}", m_window->associated_document().url(), request_url);
// TODO: Add support for preflight requests to support CORS requests
@@ -587,7 +587,7 @@ DeprecatedString XMLHttpRequest::get_all_response_headers() const
builder.append(m_response_headers.get(key).value());
builder.append("\r\n"sv);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// https://xhr.spec.whatwg.org/#dom-xmlhttprequest-overridemimetype
diff --git a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp
index 8257a8fbb6..b7e09dce75 100644
--- a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp
+++ b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp
@@ -132,7 +132,7 @@ void XMLDocumentBuilder::text(DeprecatedString const& data)
auto& text_node = static_cast<DOM::Text&>(*last);
text_builder.append(text_node.data());
text_builder.append(data);
- text_node.set_data(text_builder.to_string());
+ text_node.set_data(text_builder.to_deprecated_string());
text_builder.clear();
} else {
auto node = m_document.create_text_node(data);
diff --git a/Userland/Libraries/LibWebSocket/ConnectionInfo.cpp b/Userland/Libraries/LibWebSocket/ConnectionInfo.cpp
index 99af1bda70..88db1d07d7 100644
--- a/Userland/Libraries/LibWebSocket/ConnectionInfo.cpp
+++ b/Userland/Libraries/LibWebSocket/ConnectionInfo.cpp
@@ -35,7 +35,7 @@ DeprecatedString ConnectionInfo::resource_name() const
builder.append('?');
// the query component
builder.append(m_url.query());
- return builder.to_string();
+ return builder.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp b/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp
index 608bdb79b3..0f2004a336 100644
--- a/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp
+++ b/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp
@@ -83,7 +83,7 @@ ErrorOr<DeprecatedString> WebSocketImplSerenity::read_line(size_t size)
{
auto buffer = TRY(ByteBuffer::create_uninitialized(size));
auto line = TRY(m_socket->read_line(buffer));
- return line.to_string();
+ return line.to_deprecated_string();
}
}
diff --git a/Userland/Libraries/LibWebSocket/WebSocket.cpp b/Userland/Libraries/LibWebSocket/WebSocket.cpp
index c13b15737d..78147eb608 100644
--- a/Userland/Libraries/LibWebSocket/WebSocket.cpp
+++ b/Userland/Libraries/LibWebSocket/WebSocket.cpp
@@ -213,7 +213,7 @@ void WebSocket::send_client_handshake()
builder.append("\r\n"sv);
m_state = WebSocket::InternalState::WaitingForServerHandshake;
- auto success = m_impl->send(builder.to_string().bytes());
+ auto success = m_impl->send(builder.to_deprecated_string().bytes());
VERIFY(success);
}
diff --git a/Userland/Libraries/LibWebView/DOMTreeModel.cpp b/Userland/Libraries/LibWebView/DOMTreeModel.cpp
index ac15dcc34b..c0f55566f2 100644
--- a/Userland/Libraries/LibWebView/DOMTreeModel.cpp
+++ b/Userland/Libraries/LibWebView/DOMTreeModel.cpp
@@ -113,7 +113,7 @@ static DeprecatedString with_whitespace_collapsed(StringView string)
}
builder.append(string[i]);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
GUI::Variant DOMTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
@@ -167,12 +167,12 @@ GUI::Variant DOMTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
builder.append(name);
builder.append('=');
builder.append('"');
- builder.append(value.to_string());
+ builder.append(value.to_deprecated_string());
builder.append('"');
});
}
builder.append('>');
- return builder.to_string();
+ return builder.to_deprecated_string();
}
return {};
}
diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
index 523c7932f0..a9e7953f8d 100644
--- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
+++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
@@ -45,17 +45,17 @@ void OutOfProcessWebView::handle_web_content_process_crash()
handle_resize();
StringBuilder builder;
builder.append("<html><head><title>Crashed: "sv);
- builder.append(escape_html_entities(m_url.to_string()));
+ builder.append(escape_html_entities(m_url.to_deprecated_string()));
builder.append("</title></head><body>"sv);
builder.append("<h1>Web page crashed"sv);
if (!m_url.host().is_empty()) {
builder.appendff(" on {}", escape_html_entities(m_url.host()));
}
builder.append("</h1>"sv);
- auto escaped_url = escape_html_entities(m_url.to_string());
+ auto escaped_url = escape_html_entities(m_url.to_deprecated_string());
builder.appendff("The web page <a href=\"{}\">{}</a> has crashed.<br><br>You can reload the page to try again.", escaped_url, escaped_url);
builder.append("</body></html>"sv);
- load_html(builder.to_string(), m_url);
+ load_html(builder.to_deprecated_string(), m_url);
}
void OutOfProcessWebView::create_client()
diff --git a/Userland/Libraries/LibWebView/StylePropertiesModel.cpp b/Userland/Libraries/LibWebView/StylePropertiesModel.cpp
index 86a979daaf..8484d115b7 100644
--- a/Userland/Libraries/LibWebView/StylePropertiesModel.cpp
+++ b/Userland/Libraries/LibWebView/StylePropertiesModel.cpp
@@ -16,7 +16,7 @@ StylePropertiesModel::StylePropertiesModel(JsonObject properties)
m_properties.for_each_member([&](auto& property_name, auto& property_value) {
Value value;
value.name = property_name;
- value.value = property_value.to_string();
+ value.value = property_value.to_deprecated_string();
m_values.append(value);
});
diff --git a/Userland/Libraries/LibX86/Instruction.cpp b/Userland/Libraries/LibX86/Instruction.cpp
index 2f7ae0976f..115bddec88 100644
--- a/Userland/Libraries/LibX86/Instruction.cpp
+++ b/Userland/Libraries/LibX86/Instruction.cpp
@@ -1290,105 +1290,105 @@ StringView Instruction::reg64_name() const
return register_name(static_cast<RegisterIndex64>(register_index()));
}
-DeprecatedString MemoryOrRegisterReference::to_string_o8(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_o8(Instruction const& insn) const
{
if (is_register())
return register_name(reg8());
- return DeprecatedString::formatted("[{}]", to_string(insn));
+ return DeprecatedString::formatted("[{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_o16(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_o16(Instruction const& insn) const
{
if (is_register())
return register_name(reg16());
- return DeprecatedString::formatted("[{}]", to_string(insn));
+ return DeprecatedString::formatted("[{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_o32(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_o32(Instruction const& insn) const
{
if (is_register())
return register_name(reg32());
- return DeprecatedString::formatted("[{}]", to_string(insn));
+ return DeprecatedString::formatted("[{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_o64(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_o64(Instruction const& insn) const
{
if (is_register())
return register_name(reg64());
- return DeprecatedString::formatted("[{}]", to_string(insn));
+ return DeprecatedString::formatted("[{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_fpu_reg() const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_fpu_reg() const
{
VERIFY(is_register());
return register_name(reg_fpu());
}
-DeprecatedString MemoryOrRegisterReference::to_string_fpu_mem(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_fpu_mem(Instruction const& insn) const
{
VERIFY(!is_register());
- return DeprecatedString::formatted("[{}]", to_string(insn));
+ return DeprecatedString::formatted("[{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_fpu_ax16() const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_fpu_ax16() const
{
VERIFY(is_register());
return register_name(reg16());
}
-DeprecatedString MemoryOrRegisterReference::to_string_fpu16(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_fpu16(Instruction const& insn) const
{
if (is_register())
return register_name(reg_fpu());
- return DeprecatedString::formatted("word ptr [{}]", to_string(insn));
+ return DeprecatedString::formatted("word ptr [{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_fpu32(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_fpu32(Instruction const& insn) const
{
if (is_register())
return register_name(reg_fpu());
- return DeprecatedString::formatted("dword ptr [{}]", to_string(insn));
+ return DeprecatedString::formatted("dword ptr [{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_fpu64(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_fpu64(Instruction const& insn) const
{
if (is_register())
return register_name(reg_fpu());
- return DeprecatedString::formatted("qword ptr [{}]", to_string(insn));
+ return DeprecatedString::formatted("qword ptr [{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_fpu80(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_fpu80(Instruction const& insn) const
{
VERIFY(!is_register());
- return DeprecatedString::formatted("tbyte ptr [{}]", to_string(insn));
+ return DeprecatedString::formatted("tbyte ptr [{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_mm(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_mm(Instruction const& insn) const
{
if (is_register())
return register_name(static_cast<MMXRegisterIndex>(m_register_index));
- return DeprecatedString::formatted("[{}]", to_string(insn));
+ return DeprecatedString::formatted("[{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string_xmm(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_xmm(Instruction const& insn) const
{
if (is_register())
return register_name(static_cast<XMMRegisterIndex>(m_register_index));
- return DeprecatedString::formatted("[{}]", to_string(insn));
+ return DeprecatedString::formatted("[{}]", to_deprecated_string(insn));
}
-DeprecatedString MemoryOrRegisterReference::to_string(Instruction const& insn) const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string(Instruction const& insn) const
{
switch (insn.address_size()) {
case AddressSize::Size64:
- return to_string_a64();
+ return to_deprecated_string_a64();
case AddressSize::Size32:
- return insn.mode() == ProcessorMode::Long ? to_string_a64() : to_string_a32();
+ return insn.mode() == ProcessorMode::Long ? to_deprecated_string_a64() : to_deprecated_string_a32();
case AddressSize::Size16:
- return to_string_a16();
+ return to_deprecated_string_a16();
}
VERIFY_NOT_REACHED();
}
-DeprecatedString MemoryOrRegisterReference::to_string_a16() const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_a16() const
{
DeprecatedString base;
bool hasDisplacement = false;
@@ -1435,7 +1435,7 @@ DeprecatedString MemoryOrRegisterReference::to_string_a16() const
return DeprecatedString::formatted("{}{:+#x}", base, (i16)m_displacement16);
}
-DeprecatedString MemoryOrRegisterReference::sib_to_string(ProcessorMode mode) const
+DeprecatedString MemoryOrRegisterReference::sib_to_deprecated_string(ProcessorMode mode) const
{
DeprecatedString scale;
DeprecatedString index;
@@ -1476,10 +1476,10 @@ DeprecatedString MemoryOrRegisterReference::sib_to_string(ProcessorMode mode) co
builder.append(index);
builder.append(scale);
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
-DeprecatedString MemoryOrRegisterReference::to_string_a64() const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_a64() const
{
if (is_register())
return register_name(static_cast<RegisterIndex64>(m_register_index));
@@ -1505,7 +1505,7 @@ DeprecatedString MemoryOrRegisterReference::to_string_a64() const
base = "rbp";
break;
case 4:
- base = sib_to_string(ProcessorMode::Long);
+ base = sib_to_deprecated_string(ProcessorMode::Long);
break;
default:
base = register_name(RegisterIndex64(m_rm));
@@ -1517,7 +1517,7 @@ DeprecatedString MemoryOrRegisterReference::to_string_a64() const
return DeprecatedString::formatted("{}{:+#x}", base, (i32)m_displacement32);
}
-DeprecatedString MemoryOrRegisterReference::to_string_a32() const
+DeprecatedString MemoryOrRegisterReference::to_deprecated_string_a32() const
{
if (is_register())
return register_name(static_cast<RegisterIndex32>(m_register_index));
@@ -1540,7 +1540,7 @@ DeprecatedString MemoryOrRegisterReference::to_string_a32() const
base = "ebp";
break;
case 4:
- base = sib_to_string(ProcessorMode::Protected);
+ base = sib_to_deprecated_string(ProcessorMode::Protected);
break;
default:
base = register_name(RegisterIndex32(m_rm));
@@ -1569,7 +1569,7 @@ static DeprecatedString relative_address(u32 origin, bool x32, i32 imm)
return DeprecatedString::formatted("{:x}", w + si);
}
-DeprecatedString Instruction::to_string(u32 origin, SymbolProvider const* symbol_provider, bool x32) const
+DeprecatedString Instruction::to_deprecated_string(u32 origin, SymbolProvider const* symbol_provider, bool x32) const
{
StringBuilder builder;
if (has_segment_prefix())
@@ -1605,11 +1605,11 @@ DeprecatedString Instruction::to_string(u32 origin, SymbolProvider const* symbol
// Note: SSE instructions use these to toggle between packed and single data
if (has_rep_prefix() && !(m_descriptor->format > __SSE && m_descriptor->format < __EndFormatsWithRMByte))
builder.append(m_rep_prefix == Prefix::REPNZ ? "repnz "sv : "repz "sv);
- to_string_internal(builder, origin, symbol_provider, x32);
- return builder.to_string();
+ to_deprecated_string_internal(builder, origin, symbol_provider, x32);
+ return builder.to_deprecated_string();
}
-void Instruction::to_string_internal(StringBuilder& builder, u32 origin, SymbolProvider const* symbol_provider, bool x32) const
+void Instruction::to_deprecated_string_internal(StringBuilder& builder, u32 origin, SymbolProvider const* symbol_provider, bool x32) const
{
if (!m_descriptor) {
builder.appendff("db {:02x}", m_op);
@@ -1635,22 +1635,22 @@ void Instruction::to_string_internal(StringBuilder& builder, u32 origin, SymbolP
}
};
- auto append_rm8 = [&] { builder.append(m_modrm.to_string_o8(*this)); };
- auto append_rm16 = [&] { builder.append(m_modrm.to_string_o16(*this)); };
+ auto append_rm8 = [&] { builder.append(m_modrm.to_deprecated_string_o8(*this)); };
+ auto append_rm16 = [&] { builder.append(m_modrm.to_deprecated_string_o16(*this)); };
auto append_rm32 = [&] {
if (m_operand_size == OperandSize::Size64)
- builder.append(m_modrm.to_string_o64(*this));
+ builder.append(m_modrm.to_deprecated_string_o64(*this));
else
- builder.append(m_modrm.to_string_o32(*this));
+ builder.append(m_modrm.to_deprecated_string_o32(*this));
};
- auto append_rm64 = [&] { builder.append(m_modrm.to_string_o64(*this)); };
- auto append_fpu_reg = [&] { builder.append(m_modrm.to_string_fpu_reg()); };
- auto append_fpu_mem = [&] { builder.append(m_modrm.to_string_fpu_mem(*this)); };
- auto append_fpu_ax16 = [&] { builder.append(m_modrm.to_string_fpu_ax16()); };
- auto append_fpu_rm16 = [&] { builder.append(m_modrm.to_string_fpu16(*this)); };
- auto append_fpu_rm32 = [&] { builder.append(m_modrm.to_string_fpu32(*this)); };
- auto append_fpu_rm64 = [&] { builder.append(m_modrm.to_string_fpu64(*this)); };
- auto append_fpu_rm80 = [&] { builder.append(m_modrm.to_string_fpu80(*this)); };
+ auto append_rm64 = [&] { builder.append(m_modrm.to_deprecated_string_o64(*this)); };
+ auto append_fpu_reg = [&] { builder.append(m_modrm.to_deprecated_string_fpu_reg()); };
+ auto append_fpu_mem = [&] { builder.append(m_modrm.to_deprecated_string_fpu_mem(*this)); };
+ auto append_fpu_ax16 = [&] { builder.append(m_modrm.to_deprecated_string_fpu_ax16()); };
+ auto append_fpu_rm16 = [&] { builder.append(m_modrm.to_deprecated_string_fpu16(*this)); };
+ auto append_fpu_rm32 = [&] { builder.append(m_modrm.to_deprecated_string_fpu32(*this)); };
+ auto append_fpu_rm64 = [&] { builder.append(m_modrm.to_deprecated_string_fpu64(*this)); };
+ auto append_fpu_rm80 = [&] { builder.append(m_modrm.to_deprecated_string_fpu80(*this)); };
auto append_imm8 = [&] { builder.appendff("{:#02x}", imm8()); };
auto append_imm8_2 = [&] { builder.appendff("{:#02x}", imm8_2()); };
auto append_imm16 = [&] { builder.appendff("{:#04x}", imm16()); };
@@ -1693,12 +1693,12 @@ void Instruction::to_string_internal(StringBuilder& builder, u32 origin, SymbolP
auto append_relative_imm32 = [&] { formatted_address(origin + 5, x32, i32(imm32())); };
auto append_mm = [&] { builder.appendff("mm{}", register_index()); };
- auto append_mmrm32 = [&] { builder.append(m_modrm.to_string_mm(*this)); };
- auto append_mmrm64 = [&] { builder.append(m_modrm.to_string_mm(*this)); };
+ auto append_mmrm32 = [&] { builder.append(m_modrm.to_deprecated_string_mm(*this)); };
+ auto append_mmrm64 = [&] { builder.append(m_modrm.to_deprecated_string_mm(*this)); };
auto append_xmm = [&] { builder.appendff("xmm{}", register_index()); };
- auto append_xmmrm32 = [&] { builder.append(m_modrm.to_string_xmm(*this)); };
- auto append_xmmrm64 = [&] { builder.append(m_modrm.to_string_xmm(*this)); };
- auto append_xmmrm128 = [&] { builder.append(m_modrm.to_string_xmm(*this)); };
+ auto append_xmmrm32 = [&] { builder.append(m_modrm.to_deprecated_string_xmm(*this)); };
+ auto append_xmmrm64 = [&] { builder.append(m_modrm.to_deprecated_string_xmm(*this)); };
+ auto append_xmmrm128 = [&] { builder.append(m_modrm.to_deprecated_string_xmm(*this)); };
auto append_mm_or_xmm = [&] {
if (has_operand_size_override_prefix())
diff --git a/Userland/Libraries/LibX86/Instruction.h b/Userland/Libraries/LibX86/Instruction.h
index a1207df9b2..10ea32adda 100644
--- a/Userland/Libraries/LibX86/Instruction.h
+++ b/Userland/Libraries/LibX86/Instruction.h
@@ -518,20 +518,20 @@ class MemoryOrRegisterReference {
friend class Instruction;
public:
- DeprecatedString to_string_o8(Instruction const&) const;
- DeprecatedString to_string_o16(Instruction const&) const;
- DeprecatedString to_string_o32(Instruction const&) const;
- DeprecatedString to_string_o64(Instruction const&) const;
- DeprecatedString to_string_fpu_reg() const;
- DeprecatedString to_string_fpu_mem(Instruction const&) const;
- DeprecatedString to_string_fpu_ax16() const;
- DeprecatedString to_string_fpu16(Instruction const&) const;
- DeprecatedString to_string_fpu32(Instruction const&) const;
- DeprecatedString to_string_fpu64(Instruction const&) const;
- DeprecatedString to_string_fpu80(Instruction const&) const;
- DeprecatedString to_string_mm(Instruction const&) const;
- DeprecatedString to_string_xmm(Instruction const&) const;
- DeprecatedString sib_to_string(ProcessorMode) const;
+ DeprecatedString to_deprecated_string_o8(Instruction const&) const;
+ DeprecatedString to_deprecated_string_o16(Instruction const&) const;
+ DeprecatedString to_deprecated_string_o32(Instruction const&) const;
+ DeprecatedString to_deprecated_string_o64(Instruction const&) const;
+ DeprecatedString to_deprecated_string_fpu_reg() const;
+ DeprecatedString to_deprecated_string_fpu_mem(Instruction const&) const;
+ DeprecatedString to_deprecated_string_fpu_ax16() const;
+ DeprecatedString to_deprecated_string_fpu16(Instruction const&) const;
+ DeprecatedString to_deprecated_string_fpu32(Instruction const&) const;
+ DeprecatedString to_deprecated_string_fpu64(Instruction const&) const;
+ DeprecatedString to_deprecated_string_fpu80(Instruction const&) const;
+ DeprecatedString to_deprecated_string_mm(Instruction const&) const;
+ DeprecatedString to_deprecated_string_xmm(Instruction const&) const;
+ DeprecatedString sib_to_deprecated_string(ProcessorMode) const;
bool is_register() const { return m_register_index != 0x7f; }
@@ -580,10 +580,10 @@ public:
private:
MemoryOrRegisterReference() = default;
- DeprecatedString to_string(Instruction const&) const;
- DeprecatedString to_string_a16() const;
- DeprecatedString to_string_a32() const;
- DeprecatedString to_string_a64() const;
+ DeprecatedString to_deprecated_string(Instruction const&) const;
+ DeprecatedString to_deprecated_string_a16() const;
+ DeprecatedString to_deprecated_string_a32() const;
+ DeprecatedString to_deprecated_string_a64() const;
template<typename InstructionStreamType>
void decode(InstructionStreamType&, AddressSize, bool has_rex_r, bool has_rex_x, bool has_rex_b);
@@ -695,13 +695,13 @@ public:
OperandSize operand_size() const { return m_operand_size; }
ProcessorMode mode() const { return m_mode; }
- DeprecatedString to_string(u32 origin, SymbolProvider const* = nullptr, bool x32 = true) const;
+ DeprecatedString to_deprecated_string(u32 origin, SymbolProvider const* = nullptr, bool x32 = true) const;
private:
template<typename InstructionStreamType>
Instruction(InstructionStreamType&, OperandSize, AddressSize);
- void to_string_internal(StringBuilder&, u32 origin, SymbolProvider const*, bool x32) const;
+ void to_deprecated_string_internal(StringBuilder&, u32 origin, SymbolProvider const*, bool x32) const;
StringView reg8_name() const;
StringView reg16_name() const;
diff --git a/Userland/Libraries/LibXML/Parser/Parser.cpp b/Userland/Libraries/LibXML/Parser/Parser.cpp
index 1091f015c4..7fa6a81f2b 100644
--- a/Userland/Libraries/LibXML/Parser/Parser.cpp
+++ b/Userland/Libraries/LibXML/Parser/Parser.cpp
@@ -547,7 +547,7 @@ ErrorOr<Name, ParseError> Parser::parse_name()
builder.append(rest);
rollback.disarm();
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 2.8.28. doctypedecl, https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-doctypedecl
@@ -732,7 +732,7 @@ ErrorOr<DeprecatedString, ParseError> Parser::parse_attribute_value_inner(String
builder.append(m_lexer.consume());
}
}
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
@@ -781,7 +781,7 @@ ErrorOr<Variant<Parser::EntityReference, DeprecatedString>, ParseError> Parser::
builder.append_code_point(*code_point);
rollback.disarm();
- return builder.to_string();
+ return builder.to_deprecated_string();
}
auto name = name_result.release_value();
@@ -1637,7 +1637,7 @@ ErrorOr<DeprecatedString, ParseError> Parser::parse_entity_value()
TRY(expect(quote));
rollback.disarm();
- return builder.to_string();
+ return builder.to_deprecated_string();
}
// 2.7.18 CDSect, https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-CDSect