Commit Graph

19017 Commits

Author SHA1 Message Date
Brian Gianforcaro
c195ee6fd2 Meta: Add allow-list for icon size detection in CMake
The only icons we are currently warning about are designed
and rendered as small icons intentionally, as their only use
is in desktop applets, and thus are exempt to this rule.

This reduces build spam back down to a minimum.
I should have just done this in the first place, back in #4729
2021-04-20 08:10:21 +02:00
Andreas Kling
955eef83b0 LibWeb: Add basic support for HTMLCanvasElement.toDataURL() :^)
This allows you to serialize a <canvas> element's bitmap into a
data: URI. Pretty neat! :^)
2021-04-19 23:49:16 +02:00
Andreas Kling
6793574003 LibGfx: Improve PNG encoder API somewhat
This is still far from ideal, but let's at least make it take a
Gfx::Bitmap const&.
2021-04-19 23:49:16 +02:00
Brian Gianforcaro
51fe25fdbb Meta: Stop limiting stale-bot actions per hour.
Initially this was configured to 2 an hour so that we could easily
disable stale-bot if something went haywire. Now that it's successfully
proved it's doing what it's supposed to, let it run the default number
of actions per hour.
2021-04-19 23:32:48 +02:00
Idan Horowitz
dbc13e1ea2 Kernel: Stop treating port 0 (ephemeral auto bind) as a privileged port
Binding to port 0 is used to signal to listen() to bind to any port
that is available. (in serenity's case, to the port range of 32768 to
60999, which are not privileged ports)
2021-04-19 23:28:02 +02:00
Panagiotis Vasilopoulos
152c54a00a
Ports: Improve variable names in .hosted_defs.sh
- SERENITY_ROOT is being kept around for compatibility reasons, and will
  be removed gradually
- SERENITY_INSTALL_ROOT points to DESTDIR but will be preferred over
  that in the future
- SERENITY_SOURCE_DIR points to the root folder of the repository. Let's
  keep the root terminology in the directory structure sort of sense out
  of here
2021-04-19 22:43:54 +02:00
Gunnar Beutner
ddcd149224 LibC: Avoid division by zero in fread()/fwrite() 2021-04-19 22:13:52 +02:00
Itamar
4831dc0e30 LibCpp: Support parsing class declarations 2021-04-19 21:48:42 +02:00
Brian Gianforcaro
247f8f8dbb Meta: Configure probot/stale to close stale pull requests automatically.
This change adds the required configuration to setup the
https://github.com/probot/stale github bot to close stale pull requests.

We currently have a large amount of PRs just sitting around with no
activity, clogging up the PR queue. This will hopefully make that
situation better.
2021-04-19 21:37:53 +02:00
Gunnar Beutner
cd432860d8 LibC: Additional functionality for getaddrinfo()
When node is NULL and AI_PASSIVE is specified we are supposed to use
the "any" address, otherwise we should use the loopback address.
2021-04-19 21:00:23 +02:00
Gunnar Beutner
38619a9f24 LibELF: Ignore DT_SYMBOLIC entries
The shared library libicudata.so has a DT_SYMBOLIC entry:

Dynamic Section:
  NEEDED               libgcc_s.so
  SONAME               libicudata.so.69
  SYMBOLIC             0x00000000
  HASH                 0x00000094
  STRTAB               0x000000c8
  SYMTAB               0x000000a8
  STRSZ                0x0000002a
  SYMENT               0x00000010

According to the ELF spec DT_SYMBOLIC has no special meaning
for the dynamic loader.
2021-04-19 20:39:22 +02:00
Gunnar Beutner
6c729993a8 LibELF: Allow shared objects which don't have a text segment
Shared objects without a text segment are perfectly OK. For
example libicudata.so has only data segments:

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .hash         00000014  00000094  00000094  00000094  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .dynsym       00000020  000000a8  000000a8  000000a8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .dynstr       0000002a  000000c8  000000c8  000000c8  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .rodata       01b562d0  00000100  00000100  00000100  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .eh_frame     00000000  01b563d0  01b563d0  01b563d0  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .dynamic      00000070  01b573d0  01b573d0  01b563d0  2**2
2021-04-19 20:39:22 +02:00
Conor Byrne
68d1469aea Taskbar: Show start menu when super key is pressed
This commit re-adds the functionality of the start menu appearing when
the super key is pressed
2021-04-19 20:03:25 +02:00
Conor Byrne
88ecfa164a LibGUI+WindowServer: Add WM_SuperKeyPressed event
This commit adds an event called WM_SuperKeyPressed which is sent to all
windows via WindowManagerServerConnection.
The event is fired from WindowManager when the super key is pressed,
which is the windows key on most keyboards :)
2021-04-19 20:03:25 +02:00
Brian Gianforcaro
ec3596545a profile: Expose the ability to free the kernel profiling buffer. 2021-04-19 18:30:37 +02:00
Brian Gianforcaro
3e87e43f9d LibC: Expose new profiling_free_buffer(..) syscall.
Expose the new `profiling_free_buffer` syscall to user space.
2021-04-19 18:30:37 +02:00
Brian Gianforcaro
4ed682aebc Kernel: Add a syscall to clear the profiling buffer
While profiling all processes the profile buffer lives forever.
Once you have copied the profile to disk, there's no need to keep it
in memory. This syscall surfaces the ability to clear that buffer.
2021-04-19 18:30:37 +02:00
Brian Gianforcaro
cdd9faaf39 profile: Add an option to wait for user input to disable profiling.
Often you want to enable and then disable profiling after a period of time.
To make this slightly more ergonomic, add an option to wait for user
input after enabling profiling, this will disable profiling on exit
after the key press.
2021-04-19 18:30:37 +02:00
Panagiotis Vasilopoulos
9de58a2d89 LibC: Added sysexits.h 2021-04-19 18:27:55 +02:00
Gunnar Beutner
81f85746f6 Ports: Link libtiff against xz 2021-04-19 18:27:09 +02:00
Gunnar Beutner
a5be8d8976 LibC: Improve error logging for execvp() 2021-04-19 18:27:09 +02:00
Gunnar Beutner
ca06dfd1a0 Ports: Update tarball hash for quake 2021-04-19 18:27:09 +02:00
Gunnar Beutner
14de8c2dd2 Ports: Remove obsolete patch for hatari 2021-04-19 18:27:09 +02:00
Gunnar Beutner
f4bd739bd5 Ports: Link libtiff against zstd 2021-04-19 18:27:09 +02:00
Gunnar Beutner
e0363a612d Ports: Fix ports when building with ccache
When building with ccache these ports failed to build because
CC contains more than one word.

The ncurses port also doesn't like how ccache preprocesses
files. This patch fixes that.
2021-04-19 18:27:09 +02:00
Gunnar Beutner
253c1aa644 Ports: Fix SDLPoP
This port was still using the upstream's master branch as opposed to
a fixed git commit.

Also, now that SDL2 is installed into /usr/local the build failed.

I have also removed an obsolete patch because we're now linking
against shared libraries for SDL2 and those already have appropriate
library dependencies.
2021-04-19 18:27:09 +02:00
Leon Albrecht
6f5e92a279
AK/Tests: Install test fixtures required for TestJSON 2021-04-19 18:16:46 +02:00
Itamar
e5f84b53d8 HackStudio: Sort ClassView entries 2021-04-19 18:13:30 +02:00
Gunnar Beutner
8388e822cb Ports: Add xz port 2021-04-19 17:55:35 +02:00
Gunnar Beutner
bd08f9188a Pthread: Add stubs for pthread_cleanup_{push,pop}
The stubs are necessary to make the xz port properly detect pthread
support. The two functions are only used in the configure script and
nowhere else.
2021-04-19 17:55:35 +02:00
Maciej Zygmanowski
136f6fb7c8 WindowServer: Use VERIFY instead of assert in scale factor check 2021-04-19 17:30:07 +02:00
Ali Mohammad Pur
efb14e95c4 Shell: Don't whine about tcsetpgrp() failing
We intentionally skimp out on checking isatty() before them to cut down
on syscalls, so we should also accept the errors and just let them be.
Closes #6471.
2021-04-19 16:28:33 +02:00
Ali Mohammad Pur
74f0fdab98 LibLine: Avoid trying to restore() if the editor isn't initialized
Fixes #6472.
2021-04-19 16:28:33 +02:00
Ali Mohammad Pur
e1e84fe0fe LibLine: Redraw the suggestions when terminal size changes 2021-04-19 16:28:33 +02:00
Adam Hodgen
3cfab83e7e Base: Add HTML test page for cursor & table
This page is useful for testing the CSS 'cursor' property, as well as
HTML tables
2021-04-19 12:26:05 +02:00
Adam Hodgen
b9c6059984 LibWeb: Correctly calculate height of TableRowGroupBox
As well as correctly calculating the height of TableRowBox, this change
calculates the heights of TableRowGroupBoxs also.

As before, this does not correctly take into consideration the 'height'
attribute.

Now the horizontal layout is approximately correct for the
TableRowGroupBoxs we can now see that the `layout_row` method will need
updating to correctly calculate cell width across all rows, not just the
current TableRowGroupBox.
2021-04-19 12:26:05 +02:00
Adam Hodgen
ae02acb8e1 LibWeb: Properly handle thead and tfooter HTML tags
As the spec for the table fixup algorythm says:

> Treat table-row-groups in this spec also encompass the specialized
> table-header-groups and table-footer-groups.
2021-04-19 12:26:05 +02:00
Gunnar Beutner
c32b58873a LibELF: Fix calculation for TLS relocations
The calculation for TLS relocations was incorrect which would
result in overlapping TLS variables when more than one shared
object used TLS variables.

This bug can be reproduced with a shared library and a program
like this:

    $ cat tlstest.c
    #include <string.h>
    __thread char tls_val[1024];
    void set_val() { memset(tls_val, 0, sizeof(tls_val)); }

    $ gcc -g -shared -o usr/lib/libtlstest.so tlstest.c

    $ cat test.c
    void set_val();
    int main() { set_val(); }
    $ gcc -g -o tls test.c -ltlstest

Due to the way the TLS relocations are done this program would
clobber libc's TLS variables (e.g. errno).
2021-04-19 12:14:43 +02:00
Gunnar Beutner
0cca23def5 LibELF: Improve error message for missing symbols 2021-04-19 12:00:40 +02:00
Gunnar Beutner
1dab5ca5fd LibELF: Fix support for relocating weak symbols
Having unresolved weak symbols is allowed and we should initialize
them to zero.
2021-04-19 12:00:40 +02:00
Gunnar Beutner
97d7450571 LibELF: Remove VERIFY() calls and let control flow return to the caller
This way we get better error messages for unresolved symbols because
the caller logs the file and symbol names.
2021-04-19 12:00:40 +02:00
Ali Mohammad Pur
55914841b7 Shell/Tests: Replace 'type f -f' with 'type -f f'
The order of arguments seemed be confusing ArgsParser.
Fixes #6467.
2021-04-19 10:07:58 +02:00
Ali Mohammad Pur
061aaa33e8 Userland/test: Handle '!' being used as a string
e.g. `test ! = !`.
Fixes #6465.
2021-04-19 10:07:58 +02:00
xackus
6e2f2cd8b1 Toolchain: Don't produce debug symbols
Previously debug symbols were produced and then stripped.
2021-04-19 09:49:14 +02:00
Brendan Coles
3c4dc5cb11 Meta: Remove references to Userland/Libraries/LibELF/exec_elf.h 2021-04-19 09:19:31 +02:00
Lenny Maiorani
df916c9738 CMake: Quiet warnings about literal suffix
Problem:
- Newer versions of clang (ToT) have a similar `-Wliteral-suffix`
  warning as GCC. A previous commit enabled it for all compilers. This
  needs to be silenced for the entire build, but it currently only is
  silenced for some directories.

Solution:
- Move the `-Wno-literal-suffix` option up in the CMakeLists.txt so
  that it gets applied everywhere.
2021-04-19 00:38:31 +02:00
DexesTTP
4f9ab0b982 Userland: Add telws, a CLI REPL to connect to WebSockets 2021-04-18 22:42:10 +02:00
DexesTTP
d3a89ce737 LibWebSocket: Add a new websocket library
This library currently contains a basic WebSocket client that can
handle both standard TCP websockets and TLS websockets.
2021-04-18 22:42:10 +02:00
DexesTTP
b30f5dc8b5 LibCore: Add ArgsParser::add_option(String&)
The API existed for add_positional_argument, but not for named arguments.
2021-04-18 22:42:10 +02:00
DexesTTP
8e44a0bd46 AK: Add default ports for Websockets to the URL class 2021-04-18 22:42:10 +02:00