Age | Commit message (Collapse) | Author |
|
|
|
This makes construction of Utf16String fallible in OOM conditions. The
immediate impact is that PrimitiveString must then be fallible as well,
as it may either transcode UTF-8 to UTF-16, or create a UTF-16 string
from ropes.
There are a couple of places where it is very non-trivial to propagate
the error further. A FIXME has been added to those locations.
|
|
This could fail to allocate the underlying storage needed to store the
UTF-8 data. Propagate this error.
|
|
These could fail to allocate the underlying storage needed to store the
UTF-16 data. Propagate these errors.
|
|
Move the macro to LibJS and change it to return a throw completion
instead of a WebIDL exception. This will let us use this macro within
LibJS to handle OOM conditions.
|
|
Otherwise, we invoke a non-trival copy. Caught by clangd.
|
|
It's only used as a template parameter, so let it be forward-declared.
Otherwise, we aren't able to include Completion.h in Utf16String.h, as
there would be a Utf16String -> Completion -> Value -> Utf16String
include cycle.
|
|
Instead of writing out "Vector<u16, 1>" everywhere, let's have a name
for it.
|
|
It currently uses the non-fallible `append` method to append each UTF-8
encoded byte of the code point.
|
|
There's a small, old-timey list of platforms in the spec, but as far
as I can tell nobody is using additional platforms on Linux or Android
or what. So let's try going with an enum class instead of the FourCC
machinery for now.
|
|
|
|
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53913
|
|
This also slightly improves error propagation in tar, unzip and zip.
|
|
|
|
|
|
This resolves a fixme requesting that we do not add duplicate menus
|
|
|
|
This overload use the `Core::Stream` API instead of the now deprecated
one `Core::File`.
|
|
Instead of using a clunky switch-case paradigm, we now have all drivers
being declaring two methods for their adapter class - create and probe.
These methods are linked in each PCIGraphicsDriverInitializer structure,
in a new s_initializers static list of them.
Then, when we probe for a PCI device, we use each probe method and if
there's a match, then the corresponding create method is called.
As a result of this change, it's much more easy to add more drivers and
the initialization code is more readable.
|
|
We try our best to ensure a DisplayConnector initialization succeeds,
and this makes the Intel driver to work again, because if we can't
allocate a Region for the whole PCI BAR mapped region, then we will try
to allocate a Region with 16 MiB window size, so it doesn't eat the
entire Kernel-allocated virtual memory space.
|
|
Instead of just returning nothing, let's return Error or nothing.
This would help later on with error propagation in case of failure
during this method.
This also makes us more paranoid about failure in this method, so when
initializing a DisplayConnector we safely tear down the internal members
of the object. This applies the same for a StorageDevice object, but its
after_inserting method is much smaller compared to the DisplayConnector
overriden method.
|
|
When calculating intrinsic heights of flex items, we should use the used
width if available.
This primarily matters for item cross sizing, since that happens after
we've determined the item's main size.
|
|
This will allow us to tell whether values have been assigned by the flex
layout algorithm yet.
|
|
Take the used main size of the item into account (as available size)
when doing inner or intrinsic layout to determine the cross size.
|
|
We were trying to take a shortcut by avoiding much of the flex layout
algorithm during intrinsic sizing. Unfortunately, this isn't good enough
since we may end up needing some of the flex item metrics for intrinsic
contribution calculations.
This means we do a bit more work for flexboxes, but intrinsic sizes are
correct in more cases.
|
|
|
|
Nobody tests this network card, and the driver has bugs (see the issue
https://github.com/SerenityOS/serenity/issues/10198 for more details),
so it's almost certain that this happened due to code being rotting when
there's simply no testing of it.
Essentially this has been determined to be dead-code so this is the most
important reason to drop this code. Another good reason to do so is
because the RTL8139 only supports Fast Ethernet connections (10/100
Megabits per second), and is considered obsolete even for bare metal
setups.
|
|
|
|
|
|
|
|
Implemention of following parts in CSS Tables 3 spec:
https://www.w3.org/TR/css-tables-3/#min-content-width-of-a-column-based-on-cells-of-span-up-to-n-n--1
https://www.w3.org/TR/css-tables-3/#max-content-width-of-a-column-based-on-cells-of-span-up-to-n-n--1
|
|
Unlike what the class comment says, it's actually valid to return int
from this operator and treat it like a "normal" C-like compare method.
|
|
This allows us to make all comparision operators on the class constexpr
without pulling in a bunch of boilerplate. We don't use the `<compare>`
header because it doesn't compile in the main serenity cross-build due
to the include paths to LibC being incompatible with how libc++ expects
them to be for clang builds.
|
|
No code was using these, so let's just delete them. They pollute the
lookup for every single comparison operator in the project.
|
|
We changed elapsed() to return i64 instead of int as that's what
AK::Time::to_milliseconds() returns, causing a bunch of implicit lossy
conversions in callers. Clean those up with a mix of type changes and
casts.
|
|
Integer seconds are cool, but the comparison is a lot easier to
understand when stored as an AK::Time, and converted from_seconds()
after parsing the timeout from the command line.
|
|
We don't need to be checking the current time unconditionally when we
only observe the results if we're going to dump the GC stats.
This saves two trips to clock_gettime at the cost of an extra branch.
|
|
Let's accumulate frame times in AK::Time and only convert to ms for
display.
|
|
Simplify a lot of uses of ElapsedTimer by converting the callers to
elapsed_time from elapsed, as the AK::Time returned is better for unit
conversions and comparisons against constants.
|
|
This removes the direct dependency on sys/time.h from ElapsedTimer, and
makes the code a lot cleaner by using the helpers from AK::Time for
time math and getting the current timestamp.
|
|
We have a nice utility for doing exactly what this code is using, so
let's use it :^)
|
|
We can use these to simplify Time constants throughout the codebase,
turning Time::from_milliseconds(10) into 10_ms, for example.
|
|
|
|
Namely:
- preferred CMM type
- device manufacturer
- device model
- profile creator
These all have in common that they can take arbitrary values, so I added
a FourCC class to deal with them, instead of using an enum class.
I made distinct types for each of them, so that they aren't accidentally
mixed up.
|
|
|
|
It's the only one, so the `try` prefix is unnecessary now.
|
|
|
|
MOAR FIXMES! ;^)
|
|
|
|
This is marked as virtual, but the super-method isn't, and also, the
super-method already returns the correct value, so this isn't needed.
|