Commit graph

18535 commits

Author SHA1 Message Date
Andreas Kling
6d9b777c5c Meta: Rename ReadMe.md -> README.md 2021-04-11 10:33:23 +02:00
Gunnar Beutner
9c8ba58029 Ports: Fix building diffutils 2021-04-11 09:51:20 +02:00
Gunnar Beutner
64740a0214 LibC: getopt() and getopt_long() shouldn't modify argv 2021-04-11 09:51:20 +02:00
Gunnar Beutner
6e51ea1e2e Ports: Fix building the git port
Because libiconv is now buildable the configure script fails when
libiconv was installed.
2021-04-11 09:51:20 +02:00
Gunnar Beutner
8ca5b8c065 LibC: Move S_* defines into <fcntl.h>
According to the Single UNIX Specification, Version 2 that's where
those macros should be defined. This fixes the libiconv port.

This also fixes some (but not all) build errors for the diffutils and nano ports.
2021-04-11 09:51:20 +02:00
Gunnar Beutner
be4b20c14d LibC: Make <limits.h> compatible with GCC so that it doesn't install a fixed header
GCC installs a fixed version of the <limits.h> header as per https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html.
The fixed header doesn't include the target's <limits.h> which in turn means that some definitions (such as PATH_MAX)
aren't available. This change requires rebuilding the toolchain (Toolchain/BuildIt.sh).

This fixes the flatbuffers port.

The commit also removes some non-standard defines (U*_MIN) which don't appear to be used
anywhere. By definition they're always 0 though so they're not strictly necessary.
2021-04-11 09:51:20 +02:00
Gunnar Beutner
dc446920e0 Ports: Fix building the libexpat port 2021-04-11 09:51:20 +02:00
Gunnar Beutner
6f514b6803 Ports: Fix building the nesalizer port when SDL2 isn't installed on the host 2021-04-11 09:51:20 +02:00
Gunnar Beutner
468be9292e Ports: Fix building the dropbear port 2021-04-11 09:51:20 +02:00
Gunnar Beutner
5ae64035a6 Ports: Fix install actions for the dmidecode port when re-installing the port
When re-installing the port the symlink already exists which causes
'ln -s' to fail.
2021-04-11 09:51:20 +02:00
Gunnar Beutner
184fea5fc1 Ports: Fix building the frotz port 2021-04-11 09:51:20 +02:00
Brian Gianforcaro
988c23fff0 LibWeb: Add implementation of Node.compareDocumentPosition()
While looking into getting Duck Duck Go loading further in the
Browser, I noticed that it was complaining about the missing
method Node.compareDocumentPosition.

This change implements as much of the DOM spec as possible
with the current implementation of the DOM to date. The
implementation is validated by new tests in the Node.js.
2021-04-11 09:40:06 +02:00
Brian Gianforcaro
0f8932d7ab LibWeb: Connect existing implementation of Node::is_connected to JS.
I was looking at implementing something else, and saw this was low
hanging fruit, that brings the browser closer to standards conformance.

Add a basic test as well to validate it's implementation.
2021-04-11 09:40:06 +02:00
Gunnar Beutner
437a214085 Ports: Remove config opts for dash 2021-04-11 01:18:02 +02:00
Gunnar Beutner
03ffdeb43a LibC: Provide macros for the <ctype.h> functions
These are required for the 'tr' port.
2021-04-11 01:18:02 +02:00
Gunnar Beutner
fe8b1a732e LibC: Include additional headers in <arpa/inet.h>
According to the Single UNIX Specification, Version 2 the <arpa/inet.h>
header may optionally include <netinet/in.h> and <inttypes.h>. This
helps with porting software like c-ray that expects this to be the case.
2021-04-11 01:18:02 +02:00
Gunnar Beutner
f43f4a16e7 Ports: Fix install actions for the bash port when re-installing the port
When re-installing the port the symlink already exists which causes
'ln -s' to fail.
2021-04-11 01:18:02 +02:00
thankyouverycool
07627b3742 FontEditor: Add 'New Font' wizard to editor
Take a comfy guided tour through new font creation.
2021-04-11 01:16:34 +02:00
thankyouverycool
cdfa2614b9 FontEditor: Move menu bar into editor and tweak several widgets
Actions are now shared between menu bar and toolbar. Adds an edit
menu to complement toolbar actions. Glyphs are now passed as ints
instead of u8s; fixes Latin Extended+ glyphs failing to update in
real time on map. Converts weight and type to more human-readable
combo box lists. Selected glyph now scrolls into view on load.
2021-04-11 01:16:34 +02:00
thankyouverycool
c283429196 LibGfx: Add a count to FontTypes and a helper to return type names 2021-04-11 01:16:34 +02:00
thankyouverycool
25bd4b33a7 LibGUI: Move FontPickerWeightModel and helpers to their own header
Avoids maintaining multiple weight-name lists
2021-04-11 01:16:34 +02:00
Dan MacDonald
535331c75f Documentation: Add Dell Inspiron mini 10 to the hardware compatibility list 2021-04-11 01:16:24 +02:00
Andreas Kling
d4d8d9ea0b LibGfx: Make sure draw_ui_text() paints underlines with text color
We shouldn't hard-code black here, then we won't respect the system
theme colors. :^)
2021-04-11 01:11:56 +02:00
Andreas Kling
a4992b5ece LibGUI+LibGfx: Collapse the '&' from Alt shortcuts in tooltip texts
Also resolve a FIXME about using GUI::Label auto-sizing since we're
changing this code and it simplifies what we're doing.

Fixes #6219.
2021-04-11 01:11:09 +02:00
Andreas Kling
f27352dfdc Kernel: Use more if-with-initializer in VFS 2021-04-11 00:40:38 +02:00
Andreas Kling
acebc9beaf Ext2FS: Use if-with-initializer a lot more
This pattern felt really cluttery:

auto result = something();
if (result.is_error())
    return result;

Since it leaves "result" lying around in the no-error case.
Let's use some C++17 if initializer expressions to improve this:

if (auto result = something(); result.is_error())
    return result;

Now the "result" goes out of scope if we don't need it anymore.
This is doubly nice since we're also free to reuse the "result"
name later in the same function.
2021-04-11 00:33:16 +02:00
Luke
ccd21614a3 LibJS: Replace Vector with MarkedValueList in RegExpPrototype::symbol_replace
Otherwise the GC won't be able to keep track of the stored values
and they may suddenly disappear from underneath us, thinking
they're not in use.

Fixes a crash when going to the Bootstrap website, where the first
replace call in jQuery caused a jump to a bogus address.
2021-04-11 00:32:59 +02:00
Idan Horowitz
6c5bb9a18f Meta: Add discord notifications for pushes and pull requests
These are similar to the existing irc notifications.
2021-04-11 00:09:36 +02:00
Andreas Kling
2146d22432 LibCore: Save errno before it gets clobbered in Core::IODevice::write() 2021-04-10 22:31:29 +02:00
Jelle Raaijmakers
06353077b7 LibGUI/ScrollBar: Only paint buttons as pressed when also hovered
Fixes #6185
2021-04-10 22:28:00 +02:00
Brendan Coles
1d7bec0fe7 Ports: Download GNU port archives and signatures using HTTPS 2021-04-10 21:05:20 +02:00
Jelle Raaijmakers
f733b85957 LibTLS: Remove excessive CloseNotify logging 2021-04-10 21:05:00 +02:00
AnotherTest
a6e4482080 AK+Everywhere: Make StdLibExtras templates less wrapper-y
This commit makes the user-facing StdLibExtras templates and utilities
arguably more nice-looking by removing the need to reach into the
wrapper structs generated by them to get the value/type needed.
The C++ standard library had to invent `_v` and `_t` variants (likely
because of backwards compat), but we don't need to cater to any codebase
except our own, so might as well have good things for free. :^)
2021-04-10 21:01:31 +02:00
Linus Groh
d8d16dea95 LibWeb: Add a basic implementation of Document.createEvent()
This is a legacy function providing a way of constructing events without
using their constructors exposed on the global object.
We don't have many of the events it supports yet, nor can we throw a
DOMException from it, so that's two FIXMEs for later.
2021-04-10 21:00:04 +02:00
Linus Groh
9d2635d94b LibWeb: Support nullable EventListener parameters in WrapperGenerator
The internal C++ function will now receive a RefPtr<EventListener> for
'EventListener?' and a NonnullRefPtr<EventListener> for 'EventListener'.

Examples of this are addEventListener() and removeEventListener(), which
both have nullable callback parameters.
2021-04-10 21:00:04 +02:00
Linus Groh
2172e51246 LibJS: Implicitly break for..in loop if the RHS result is nullish
This implements the missing step 6a of 14.7.5.6 ForIn/OfHeadEvaluation:

    a. If exprValue is undefined or null, then
        i. Return Completion { [[Type]]: break, [[Value]]: empty, [[Target]]: empty }.

In other words, this should just do nothing instead of throwing during
the undefined to object coercion:

    for (const x in undefined);
2021-04-10 21:00:04 +02:00
Linus Groh
9cd010167a LibJS: Implement Object.create() 2021-04-10 21:00:04 +02:00
Linus Groh
da8a35a79e LibJS: Implement Object.defineProperties() 2021-04-10 21:00:04 +02:00
Linus Groh
275da6fcc9 LibJS: Update Object::define_accessor() to take both getter and setter
This replaces the current 'function plus boolean indicating the type'
API, which makes it easier to set both getter and setter at once.
This was already possible before but required two calls of this
function, which wasn't intuitive:

    define_accessor(name, getter, true, ...);
    define_accessor(name, setter, false, ...);

Which now becomes:

    define_accessor(name, getter, setter, ...);
2021-04-10 21:00:04 +02:00
Linus Groh
ec62783af9 LibJS: Let Object::delete_property() return a bool, not Value
Just like the various define_property functions, this should return a
bool directly and let the caller deal with wrapping it in a Value, if
necessary.
2021-04-10 21:00:04 +02:00
Linus Groh
4788c94d34 LibJS: Remove superfluous exception check from get_own_property_descriptor()
Accessing elements of the storage Vector can't throw.
2021-04-10 21:00:04 +02:00
Andreas Kling
d0813be65a LibGUI: Ignore right-clicks on HeaderViews
This prevents right-clicking a column header from making it appear
depressed right before the context menu is shown.
2021-04-10 16:50:43 +02:00
Andreas Kling
6f5f9e6567 Calendar: Alt shortcuts and book title capitalization in menus 2021-04-10 16:11:48 +02:00
Andreas Kling
5d609e408b Calculator: Alt shortcuts and book title capitalization in menus 2021-04-10 16:09:23 +02:00
Andreas Kling
8e74c9dbb6 Calculator: Add a separator line between the menu and the main UI 2021-04-10 16:08:14 +02:00
Andreas Kling
3bca395190 Profiler: Alt shortcuts and book title capitalization in menus 2021-04-10 15:55:34 +02:00
Andreas Kling
ff52a0f90b Profiler: Don't change window title based on last enabled option
This behavior was bizarre and only highlighted whichever setting
was the last one to be activated.
2021-04-10 15:54:12 +02:00
Andreas Kling
53ed30a9f5 QuickShow: Alt shortcuts and book title capitalization in menus 2021-04-10 14:58:48 +02:00
Andreas Kling
9288e64179 PixelPaint: Add icon and keyboard shortcut for the "New Image" action 2021-04-10 14:58:48 +02:00
Andreas Kling
4e56e9fa2a PixelPaint: Alt shortcuts and book title capitalization in menus 2021-04-10 14:58:48 +02:00