1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00
serenity/Userland/Libraries/LibWeb/Loader
Max Wipfli 67a9ebc817 LibWeb: Change Document's m_encoding to Optional<String>
This modifies the Document class to use Optional<String> for the
encoding. If the encoding is unknown, the Optional will not have a
value. It also implements the has_encoding() and encoding_or_default()
instance methods, the latter of which will return "UTF-8" as a fallback
if no encoding is present.

The usage of Optional<String> instead of the null string is part of an
effort to explicitly indicate that a string could not have a value.

This also modifies the former callers of encoding() to use
encoding_or_default(). Furthermore, the encoding will now only be set if
it is actually known, rather than just guessed by earlier code.
2021-05-18 21:02:07 +02:00
..
ContentFilter.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ContentFilter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CSSLoader.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CSSLoader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FrameLoader.cpp LibWeb: Change Document's m_encoding to Optional<String> 2021-05-18 21:02:07 +02:00
FrameLoader.h LibWeb: Add a maximum redirects limit to FrameLoader 2021-05-11 21:41:48 +01:00
ImageLoader.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ImageLoader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ImageResource.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ImageResource.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LoadRequest.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LoadRequest.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Resource.cpp LibWeb: Change Resource's m_encoding to Optional<String> 2021-05-18 21:02:07 +02:00
Resource.h LibWeb: Change Resource's m_encoding to Optional<String> 2021-05-18 21:02:07 +02:00
ResourceLoader.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
ResourceLoader.h Services: Rename ProtocolServer to RequestServer 2021-04-25 19:04:34 +02:00