mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05:00
0197bfcadf
Before this commit, GenerateUnicodeData generated a `BidirectionalClass` enum directly from UnicodeData.txt. Now, GenerateUnicodeData instead generates `BidirectionalClassInternal` and CharacterTypes.h has an explicit enum `BidiClass` with nicer names -- no underscores, but also names more similar to ICUs names. (Since CharacterTypes.h is included in some of LibUnicode's generators, it can't refer to generated `BidirectionalClassInternal`, so we instead have a big manual mapping switch in UnicodeData.cpp.) `bidirectional_class()` used to return an `Optional<BidirectionalClass>` for when unicode data was disabled. Now we return `BidiClass` and just return `BidiClass::LeftToRight` instead of making every client do this. It also updates LibWeb's Element.cpp to this new system. Also remove now-unused `bidirectional_class_from_string()`. This kind of cherry-picks the 4th commit of LadybirdBrowser/ladybird#239 (aa3a30870b58c47cb37bce1418d7e6bee7af71d9): The CharacterTypes.h, Element.cpp and TestUnicodeCharacterTypes.cpp changes are by trflynn. Co-authored-by: Tim Flynn <trflynn89@serenityos.org> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
TestEmoji.cpp | ||
TestIDNA.cpp | ||
TestPunycode.cpp | ||
TestSegmentation.cpp | ||
TestUnicodeCharacterTypes.cpp | ||
TestUnicodeNormalization.cpp |