Andreas Kling
1bef057ec3
LibGUI: Make the TextEditor widget store UTF-32 codepoints
...
A TextDocumentLine is now backed by a non-null-terminated sequence of
Unicode codepoints encoded as UTF-32 (one u32 per codepoint.)
This makes it possible to view and edit arbitrary Unicode text without
strange cursor and selection behavior. You can freely copy and paste
emojis between TextEditor and Terminal now. :^)
Storing UTF-32 is quite space-inefficient, but we should be able to
use the same optimization techniques as LibVT does to reduce it in
the typical case where most text is ASCII.
There are a lot of things that can be cleaned up around this code,
but this works well enough that I'm pretty happy with it.
2020-05-17 22:35:25 +02:00
Andreas Kling
0272bbb4fb
LibGfx: Add UTF-32 version of the text painting code paths
...
There's a large amount of code duplication here right now, which will
need to be reduced.
2020-05-17 22:35:25 +02:00
Andreas Kling
0d78ee95f9
LibVT: Make TerminalWidget::selected_text() produce UTF-8 strings :^)
2020-05-17 22:35:25 +02:00
Andreas Kling
86242f9c18
AK: Add StringBuilder::append(Utf32View)
...
This encodes the incoming UTF-32 sequence as UTF-8.
2020-05-17 22:35:25 +02:00
Andreas Kling
bc6f469544
LibGfx: Let's make it Font::width(Utf32View)
2020-05-17 22:35:25 +02:00
Andreas Kling
00b5614ce2
AK: Add a very basic Utf32View class
...
This allows you to wrap a { const u32* codepoints, size_t length } in a
simple object.
2020-05-17 22:35:25 +02:00
Andreas Kling
b3f6b43d3c
LibC: Don't let ctype isfoo() helpers access array out of bounds
2020-05-17 22:35:25 +02:00
Andreas Kling
35875b68f5
LibGfx: Add Font::width(u32* codepoints, size_t)
...
This allows you to measure the width of a UTF-32 sequence.
2020-05-17 22:35:25 +02:00
mattco98
4ced126704
LibJS: Add symbol objects
...
This commit adds the following classes: SymbolObject, SymbolConstructor,
SymbolPrototype, and Symbol. This commit does not introduce any
new functionality to the Object class, so they cannot be used as
property keys in objects.
2020-05-17 18:05:15 +02:00
Conrad Pankoff
b5b08fba92
AK: Make sure URL retains trailing slash if present in complete_url
2020-05-17 16:35:42 +02:00
AnotherTest
013cb76d77
LibGemini: Implement rendering text/gemini documents to HTML
...
This also sets Content-Type to whatever 'meta' contains on success, to
allow the browser to pick up what the document contains.
2020-05-17 16:35:42 +02:00
Andreas Kling
a4902e0eec
ProtocolServer: Put everything in the ProtocolServer namespace
2020-05-17 16:33:09 +02:00
Andreas Kling
2949c3e5e1
Meta: Add Linus, Ali and Shannon to the "Contributors" list
...
I've been adding people here after they cross over the 100 commit line.
Make that criteria explicit in the text.
2020-05-17 16:27:51 +02:00
Linus Groh
71ec72bddf
LibJS: Simplify various StringPrototype functions
2020-05-17 16:23:48 +02:00
Linus Groh
73eef31f49
LibJS: Add Number.parseFloat()
2020-05-17 16:21:38 +02:00
Linus Groh
6f6b089aa0
LibJS: Add parseFloat()
2020-05-17 16:21:33 +02:00
Andreas Kling
cc42d75209
ls: Make column alignment Unicode-aware :^)
...
You can now have emojis in file names and they will line up correctly
in "ls" output.
2020-05-17 13:05:39 +02:00
Andreas Kling
6cde7e4d20
AK: Add Utf8View::length_in_codepoints()
2020-05-17 13:05:39 +02:00
AnotherTest
1469d20e63
Shell: Treat builtin names as programs and suggest them
2020-05-17 12:54:31 +02:00
Conrad Pankoff
87cb28fcf7
LibGemini+LibHTTP: Defer did_progress call to match other callbacks
2020-05-17 12:41:38 +02:00
Conrad Pankoff
4214680e76
AK: Set default port in URL to 1965 for gemini protocol
2020-05-17 12:41:38 +02:00
Conrad Pankoff
f2621f37a4
ProtocolServer: Attach downloads and their lifecycles to clients
...
Previously a download lived independently of the client connection it came
from. This was the source of several undesirable behaviours, including the
potential for clients to influence downloads they didn't start, and
downloads living longer than their associated client connections. Now we
attach downloads to client connections, which means they're cleaned up
automatically when the client goes away, and there's significantly less
risk of clients interfering with each other.
2020-05-17 12:41:38 +02:00
Conrad Pankoff
184ee8ac77
LibWeb: Recognise and pass gemini URLs to ProtocolServer
2020-05-17 12:41:38 +02:00
Conrad Pankoff
aaa6f90c34
ProtocolServer: Integrate LibGemini for simple requests
2020-05-17 12:41:38 +02:00
Conrad Pankoff
308a755c38
LibGemini: Implement basic Gemini protocol support
2020-05-17 12:41:38 +02:00
Andreas Kling
656d1e1318
Shell: Print the full name of missing interpreters
...
We were missing two characters at the end due to a mix-up when skipping
over the first two characters ("#!")
2020-05-17 12:33:28 +02:00
Andreas Kling
7b5b4bee70
LibVT: Store all-ASCII terminal lines as 8-bit characters
...
To conserve memory, we now use byte storage for terminal lines until we
encounter a non-ASCII codepoint. At that point, we transparently switch
to UTF-32 storage for that one line.
2020-05-17 12:32:09 +02:00
AnotherTest
a398898c12
Shell: Switch to using Core::EventLoop
...
This commit refactors Shell to a Core::Object and switches its looping
to Core::EventLoop.
2020-05-17 11:58:08 +02:00
AnotherTest
172df68666
Shell: Patch most of the builtins to use Core::ArgsParser
...
The remaining one is 'pushd', which seems to have relatively complex
logic with regards to its arguments.
2020-05-17 11:58:08 +02:00
AnotherTest
e630d83633
Shell: Add job control capabilities
...
This patchset adds the `jobs`, `fg` and `bg` builtins.
2020-05-17 11:58:08 +02:00
AnotherTest
8582a06899
Kernel + LibC: Handle running processes in do_waitid()
2020-05-17 11:58:08 +02:00
AnotherTest
9d54f21859
Kernel: wait() should not block if WNOHANG is specified
2020-05-17 11:58:08 +02:00
AnotherTest
1c4f38749e
LibCore: Allow ArgsParser::parse() to not exit on failure
...
This allows its use in places where multiple calls to
ArgsParser::parse() are needed, such as Shell builtins.
2020-05-17 11:58:08 +02:00
AnotherTest
16ba0b39f3
LibCore: Reset getopt's state when starting parse()
...
This way, a program can use ArgsParser multiple times, potentially with
multiple different options.
2020-05-17 11:58:08 +02:00
Linus Groh
ab2bb583a4
Base: Add "smiling face with sunglasses" emoji (U+1F60E)
2020-05-17 09:43:51 +02:00
Linus Groh
99a2f9517e
Base: Add "smiling face with open mouth and tightly-closed eyes" emoji (U+1F606)
2020-05-17 09:43:51 +02:00
Linus Groh
09e5c37e4e
Base: Add "smiling face with open mouth and smiling eyes" emoji (U+1F604)
2020-05-17 09:43:51 +02:00
Linus Groh
dcb35739a0
Base: Add "smiling face with open mouth" emoji (U+1F603)
2020-05-17 09:43:51 +02:00
Linus Groh
1f9dcd9174
Base: Add "grinning face" emoji (U+1F600)
2020-05-17 09:43:51 +02:00
Linus Groh
3fb9cad019
Base: Add "no entry" emoji (U+26D4)
2020-05-17 09:43:51 +02:00
Linus Groh
0e15d51a73
Base: Add "warning sign" emoji (U+26A0)
2020-05-17 09:43:51 +02:00
Linus Groh
edb795218d
Base: Add "eyes" emoji (U+1F440)
2020-05-17 09:43:51 +02:00
Linus Groh
bb0c137bdf
Base: Add "smiling face with smiling eyes" emoji (U+1F60A)
2020-05-17 09:43:51 +02:00
tgsm
56c4538085
Demos: Compile LibGfxDemo with the new CMake build system
2020-05-16 22:59:19 +02:00
jarhill0
c52f4923ed
Base: Add "Grimacing Face" emoji
2020-05-16 22:49:00 +02:00
jarhill0
ede82e5caa
Base: Add "Face Without Mouth" emoji
2020-05-16 22:49:00 +02:00
jarhill0
a2bd4f0c27
Base: add Upside-Down Face emoji
...
This is not simply an inversion of the Slightly Smiling Face emoji.
The facial features were flipped vertically but the underlying "face"
was kept the same, because for both emojis the top is lighter than the
bottom.
2020-05-16 22:49:00 +02:00
Dominik Madarasz
b7357d1a3a
Build: Use -Wno-expansion-to-defined
2020-05-16 22:41:09 +02:00
Linus Groh
ccc4cf915a
Base: Add file containing all emojis we support to /home/anon
2020-05-16 22:25:33 +02:00
Linus Groh
b0ae32d09a
Base: Add "Fire" emoji (U+1F525)
2020-05-16 22:25:33 +02:00