Commit graph

19040 commits

Author SHA1 Message Date
Panagiotis Vasilopoulos 492f7132d2 Ports: Improve consistency and quality of ports
- Replaced /Root with
- Improved documentation.
- Removed a few typos.
- Replaced  with
- Added brackets in some cases.

Most of the changes were reviewed and applied manually.
2021-04-20 18:20:00 +02:00
Panagiotis Vasilopoulos 139288b071 Ports: Fix up imgcat 2021-04-20 17:32:10 +02:00
Gunnar Beutner 2d62cf8b79 Ports: Update the lint-ports.py script to ignore missing auth_type for SerenityOS repositories 2021-04-20 17:04:51 +02:00
Gunnar Beutner 12ed436562 Ports: Remove auth_type for our own packages
Otherwise we'd have to update them in this repository
every time something changes.
2021-04-20 17:04:51 +02:00
Gunnar Beutner 111ac4b1f4 Shell: Auto-completion shouldn't suggest non-executable files for the program name 2021-04-20 17:02:10 +02:00
Panagiotis Vasilopoulos e45e0eeb47 Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR 2021-04-20 15:27:52 +02:00
Andreas Kling 3f5c934ea6 Ext2FS: Put bg_used_dirs_count debug logging behind EXT2_DEBUG 2021-04-20 15:08:56 +02:00
Idan Horowitz 63af67ea01 LibJS: Throw on a regex searchString in String.startsWith
As is required by the specification:
"Let isRegExp be ? IsRegExp(searchString). If isRegExp is true,
throw a TypeError exception."
2021-04-20 14:38:54 +02:00
Idan Horowitz b1e5330e64 LibJS: Stop early-returning on missing searchString in String.startsWith
A missing searchString is allowed by the specification and is treated
as js_undefined. ("undefined test".startsWith() => true)
2021-04-20 14:38:54 +02:00
Idan Horowitz 81d7d68416 LibWeb: Use correct event name for the onmousemove global event handler
The current event name was accidentally set for the onmousedown event.
2021-04-20 14:38:54 +02:00
Spencer Dixon 1206e9803f Userland: Add support for sending UDP to netcat. 2021-04-20 14:15:35 +02:00
Andreas Kling b092353e4d LibWeb: Add basic support for HTMLInputElement.form
HTMLInputElement now inherits from FormAssociatedElement, which will
be a common base for the handful of elements that need to track their
owner form (and register with it for the form.elements collection.)

At the moment, the owner form is assigned during DOM insertion/removal
of an HTMLInputElement. I didn't implement any of the legacy behaviors
defined by the HTML parsing spec yet.
2021-04-20 12:05:56 +02:00
Andreas Kling 00d8e3b02b LibWeb: Don't include "Wrapper" suffix in JS wrapper class_name()
The "Wrapper" suffix is not useful information to someone using the
JS console, so let's just drop it from the string returned when calling
class_name() on a JS binding wrapper.
2021-04-20 12:05:56 +02:00
Andreas Kling 4d35ffdf3c LibJS: Include the class name of objects in MarkupGenerator output
Add a little label before the "{ }" so you can see what kind of object
it is. This makes Browser's JS console significantly nicer to use. :^)
2021-04-20 12:05:56 +02:00
Idan Horowitz df84cd77b8 Meta: Actually check for draft PRs before sending discord notifications 2021-04-20 12:02:13 +02:00
Tobias Christiansen a8915ecd61 FileManager+FileOperation: Report Errors when doing an file operation
Report back errors from the FileOperation to the FileManager and
display them in the MessageBox
2021-04-20 12:02:01 +02:00
Tobias Christiansen 7d60164d93 FileManager: Don't crash on error in FileOperation
did_error() caused the program to crash since the DialogBox tried to
run its own Notifier with the same - now invalid because closed - fd.

In addition to setting the member that is the Notifier to nullptr we
also tell the Notifier that it is not enabled anymore.
2021-04-20 12:02:01 +02:00
Idan Horowitz 28b8a2ec7a LibIPC: Make Connection::send_sync return a NonnullOwnPtr
Since we VERIFY that we received a response, the response pointer is
always non-null.
2021-04-20 10:10:15 +02:00
Idan Horowitz a2b34b7e6b LibDesktop: Fail gracefully on allowlist failures instead of asserting
IPC::Connection::send_sync asserts that a response was received, so the
current gracefull fail check was useless, as LibIPC would always assert
before reaching it.
2021-04-20 10:10:15 +02:00
Linus Groh ac3e7ef791 LibJS: Fix crash in Object.{freeze,seal}() with indexed properties
This was failing to take two things into account:

- When constructing a PropertyName from a value, it won't automatically
  convert to Type::Number for something like string "0", even though
  that's how things work internally, since indexed properties are stored
  separately. This will be improved in a future patch, it's a footgun
  and should happen automatically.
- Those can't be looked up on the shape, we have to go through the
  indexed properties instead.

Additionally it now operates on the shape or indexed properties directly
as define_property() was overly strict and would throw if a property was
already non-configurable.

Fixes #6469.
2021-04-20 09:38:22 +02:00
Linus Groh 085816645f LibJS: Take PropertyName in Object::set_integrity_level() internal lambda
At least for IntegrityLevel::Frozen we already construct a PropertyName
from the key value, let's reuse that.
2021-04-20 09:38:22 +02:00
Leandro Pereira 29fd75f22f LibGUI: Make statusbar label flat when displaying override_text
Changing the statusbar appearance when overriding text makes it less
confusing as it's supposed to be something temporary, e.g.  only when
hovering over a toolbar or menu item.

This behavior is present on old Windows systems, although things work
slightly differently there (where only the overridden text is displayed
rather than all the segments).
2021-04-20 09:24:52 +02:00
Brian Gianforcaro 8f6a5a1c39 Meta: Add a rebuild-world command to serenity.sh
This was brought up as something that would be useful by
`RealKC` on the discord, and I happened to agree that it
would be useful. Especially given the abundance of Toolchain
changes recently.
2021-04-20 08:10:21 +02:00
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