While you are typing in HackStudio, we re-lex the C++ as you type,
so this means we also need to keep re-checking for matching curlies and
parentheses at the cursor.
Fixes#769 (although it's not optional, because it's too cool. :^)
This works for C++ syntax highlighted text documents by caching the C++
token type in a new "arbitrary data" member of GTextDocumentSpan.
When the cursor is placed immediately before a '{' or immediately after
a '}', we highlight both of these brace buddies by changing their
corresponding spans to have a different background color.
..and spans can also now have a custom background color. :^)
After a socket has disconnected, we shouldn't return -EAGAIN. Instead
we should allow userspace to read/recvfrom the socket until its packet
queue has been exhausted.
At that point, we now return 0, signalling EOF.
It might be even better to start returning -ENOTCONN after signalling
EOF once. I'm not sure how that should work, needs looking into.
Instead of trying to build the host-side code generator helpers right
before we need them in the LibHTML build process, just build them ahead
of time in makeall.sh, like we already do for {IPC,Form}Compiler.
It's no longer possible to build LibHTML on the host machine since it
depends on LibGUI now. This patch gets rid of the dual Makefiles in
LibHTML since we only support Serenity builds anyway.
Also clean the code generator directory before building it.
This is a bit gentler than jumping to 0x0, which always crashes the
whole process. Also log a debug message about what happened, and let
the user know that it's probably time to rebuild the program.
These CSS properties constrain the computed width of a block-level box
to a maximum, followed by a minimum value.
This makes the "better mother fricken website" look more like it's
intended to (which helps makes the author's point, I suppose.)
This is a very bulky way of doing this, and doesn't seem sustainable to
implement every shorthand property this way, but it's a place to start.
The "margin" CSS property now expands into its four longhands as far as
my understanding of the specs.
Note that shorthand expansion happens when we *resolve* style, not when
we parse CSS. I'm not sure this is correct anymore, I think other UA's
may actually expand shorthands into the declaration directly at parse
these days. If so, we should do this at parsing as well.
Code for parsing and stringifying CSS properties is now generated based
on LibHTML/CSS/Properties.json
At the moment, the file tells us three things:
- The name of a property
- Its initial value
- Whether it's inherited
Also, for shorthand properties, it provides a list of all the longhand
properties it may expand too. This is not actually used in the engine
yet though.
This *finally* makes layout tree dumps show the names of CSS properties
in effect, instead of "CSS::PropertyID(32)" and such. :^)
This is more of a meta thing, since it's not seeing active development,
but is just a way for me to build some Serenity parts and include them
in other projects. Move it out of the root to keep things tidy.
Add an initial implementation of pthread attributes for:
* detach state (joinable, detached)
* schedule params (just priority)
* guard page size (as skeleton) (requires kernel support maybe?)
* stack size and user-provided stack location (4 or 8 MB only, must be aligned)
Add some tests too, to the thread test program.
Also, LibC: Move pthread declarations to sys/types.h, where they belong.
Previously we were only able to build with --with-features=small.
Thanks to all the compatibility work done in the kernel and LibC over
the last couple of months, we can now build --with-features=normal.
It's not the biggest deal in the world, but it's pretty nice to see
this kind of progress!
This can be implemented entirely in userspace by calling tcgetattr().
To avoid screwing up the syscall indexes, this patch also adds a
mechanism for removing a syscall without shifting the index of other
syscalls.
Note that ports will still have to be rebuilt after this change,
as their LibC code will try to make the isatty() syscall on startup.
Have pthread_create() allocate a stack and passing it to the kernel
instead of this work happening in the kernel. The more of this we can
do in userspace, the better.
This patch also unexposes the raw create_thread() and exit_thread()
syscalls since they are now only used by LibPthread anyway.
VM regions can now be marked as stack regions, which is then validated
on syscall, and on page fault.
If a thread is caught with its stack pointer pointing into anything
that's *not* a Region with its stack bit set, we'll crash the whole
process with SIGSTKFLT.
Userspace must now allocate custom stacks by using mmap() with the new
MAP_STACK flag. This mechanism was first introduced in OpenBSD, and now
we have it too, yay! :^)
I originally put it in FormWidget because CursorTool was clueless about
painting. This patch adds Tool::on_second_paint() which allows all the
tools to hook into the second paint pass.
This patch implements basic rubber-banding. Perhaps this mechanism can
be generalized somehow, but it's not clear to me how that would work
at the moment.