This is the initial port of Lagom to win32. This will enable developers
to use Lagom as an alternative to vanilla STL/StandardC++Library - which
gives a much richer environment (think QtCore - but modern).
My main incentive - is to have a native Windows Ladybird working.
I am starting with AK, which does not yet fully compile (on mingw). When
AK is compiling (currently fails building StringBuffer.cpp) - I will
continue to LibCore and then the rest of the user space libraries
(excluding the GUI, which will be another different effort).
Most of the code is happily stollen from Andrew Kaster's fork - he
deserves the credit.
Co-authored-by: Andrew Kaster <akaster@serenityos.org>
Previously, changing the time format caused Taskbar to crash.
This commit also simplifies TaskbarWindow::config_string_did_change()
so that it is in line with the changes made to
Calendar::config_string_did_change().
Fixes#15384
New actions in the Layer Menu allows for the creation of a new layer
from the current selection. Layers can be made by copying the
selection or cutting it from the current layer. The new layer will be
sized to the bounding box of the selection. The newly produced layer
will be added to the layer stack.
URL had properly named replacements for protocol(), set_protocol() and
create_with_file_protocol() already. This patch removes these function
and updates all call sites to use the functions named according to the
specification.
See https://url.spec.whatwg.org/#concept-url-scheme
This inserts some CSS and JS to make images in Markdown documents which
are wider than the viewport, become shrink-to-fit. Clicking on these
toggles them between shrink-to-fit and full size.
Anyone who displays Markdown documents using LibWeb gets this
functionality for free! That's Browser, Help, and Welcome's README
display.
The tzname array stores the abbreviated names of the current time zone
when in standard and daylight time. These abbreviations are ambiguous;
a single abbreviation often maps to multiple time zones. For example,
EST is used by America/New_York and America/Detroit, and CST could be
the abbreviation of Central Standard Time or China Standard Time.
Instead, we mimic a subset of how both ICU and Howard Hinnant's "date"
library determines the current time zone. First, we try to parse the TZ
environment variable. If that fails, or isn't set, we try to resolve the
/etc/localtime symbolic link. On most Linux systems and on macOS, this
is a link to the current TZDB file in use.
If all of the above fails, we fall back to UTC.
Some time zones, like "Asia/Shanghai", use a set of DST rules that end
before present day. In these cases, we should fall back to last possible
RULE entry from the TZDB. The time zone compiler published by IANA (zic)
performs the same fallback starting with version 2 of the time zone file
format.
In addition to changing the uid, the method also changes the gid and
properly sets groups. So this patch will also mitigate the security
issue of `pls`.
This option, often used with only a lonely dash, allows to "simulate a
login". For now, it just changes the current directory to the home of
the new user.
This is needed to eventually share a header list between a Request or
Response object's internal infra request/response and the object's
exposed Header object.
This makes it possible to propagate exceptions from a function that
returns JS::ThrowCompletionOr via TRY() in another function that returns
WebIDL::ExceptionOr.
IDL dictionary members are nullable by default (unless marked as
`required`) and should not get any value assigned unless one was
provided by the userland code that isn't undefined, or if the member has
a default value.
This is so that we can use Optional<T> in the internal representation
and check for "is present" via Optional::has_value().
The SourceGenerator's @else@ mapping is only set in the second iteration
of the loop, causing the generated return for unrecognized values to not
be guarded by an else statement.
We can simply use a hardcoded 'else' here, @else@ is only to create the
first comparison as a plain 'if' and subsequent ones as 'else if'.
A Request/Response instance should always be heap-allocated and have
clear ownership, so let's also wrap it in a NonnullOwnPtr instead of
putting them on the stack.
This still needs a project-wide cleanup to remove handles captured in
lambdas, which is now longer required.
For now, this will be used in the next commit implementing promise AOs
from Web IDL, which make heavy use of deferred callbacks.