Age | Commit message (Collapse) | Author |
|
This patch replaces ad-hoc generation of file URL strings with using
URL::create_with_file_scheme().
|
|
This percent encodes/decodes the request URI when creating or parsing
raw HTTP requests. This is necessary because AK::URL now contains
percent decoded data, meaning we have to re-encode it for creating
raw requests.
|
|
This replaces a call to URL::set_path() with URL::set_paths(), as
set_path() will be deprecated and removed.
|
|
This replaces a call to URL::set_path() with URL::set_paths(), as
set_path() will be deprecated and removed.
|
|
This removes URLParser, because its two exposed functions, urlencode()
and urldecode(), have been superseded by URL::percent_encode() and
URL::percent_decode(). This is in preparation for the introduction of a
new URL parser.
|
|
This replaces all occurrences of those functions with the newly
implemented functions URL::percent_encode() and URL::percent_decode().
The old functions will be removed in a further commit.
|
|
This looks a little nicer with a single outln() invocation. :^)
|
|
Allow passing an optional suffix argument to `basename` which is then
stripped from the resulting basename (unless the resulting basename is
identical to the suffix.)
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/basename.html
|
|
These allow you to get StringView wrappers around on-stack string
arguments, which seems pretty nice. :^)
|
|
Previously the function did not sort the hand at all which means we
wouldn't necessarily pick the card with the highest value.
|
|
Previously we'd prefer to pass high points cards. Instead we should
prefer to pass high value cards first.
|
|
When we don't have a matching card for the lead card rather than
always preferring to play hearts we should try to get rid of our
high value cards first if no other player has hearts cards higher
than what we have.
|
|
When building Hearts with HEARTS_DEBUG we highlight the card the AI
would have picked. This makes comparing AI and human decisions easier.
|
|
When we're the third player in a trick and we don't have a lower value
card we would previously pick a slightly higher value card. Instead
we should pick the highest value card unless there are points in the
current trick or the lead card is spades and the higher value card
we would've picked is higher than the queen and another player still
has the queen.
The rationale is that we have to take the trick anyway so we might as
well get rid of our highest value card. If the trailing player has a
lower value card of the same type we take the trick but don't gain
any points. If they don't have a card of the same type it doesn't
matter whether we play a high value or low value card.
|
|
Previously the AI would prefer playing a lead card for which no other
player had a card with a higher value even though it also had a card
for which a higher value card was still in play.
|
|
|
|
|
|
Previously we didn't check that the selection's row index is in a valid
range before attempting to access its data via the model.
This could cause an out-of-bounds access to the model's Vector of
suggestions.
I think this should fix #7404, but I can't verify it does because
I wasn't able to reproduce it on my machine.
|
|
When collapsing a tree that contains the current selection, the parent
node becomes selected instead.
|
|
Based on https://tc39.es/ecma262/#sec-numeric-types-bigint-leftShift
(This commit also includes the matching tests)
|
|
|
|
|
|
As reported by CLion.
|
|
JsonValue::as_object() returns a reference.
|
|
|
|
|
|
This is an applet, so we're not going to see its stderr anyway.
|
|
|
|
|
|
|
|
|
|
|
|
The debug console seems more appropriate than stdout here.
|
|
|
|
|
|
|
|
JPGLoader used to store component information in a HashTable, indexed
by the ID assigned by the JPEG file. This was fine for most purposes,
however after f89e8fb7 this was revealed to be a flawed implementation
which causes non-deterministic iteration over components.
This issue was previously masked by a perfect storm of int_hash being
stable for the integer values 0, 1 and 2; and AK::HashTable having just
the right amount of buckets for the components to be ordered correctly
after being hashed with int_hash. However, after f89e8fb7,
malloc_good_size was used for determining the amount of space for
allocation; this caused the ordering of the components to change, and
images started showing up with the red and blue channels reversed. The
issue was finally determined to be inconsistent ordering after randomly
changing the order of the components caused Huffman decoding to fail.
This was the result of about 10 hours of hair-pulling and repeatedly
doing full rebuilds due to bisecting between commits that touched AK.
Gunnar, I like you, but please don't make me go through this again. :^)
Credits to Andrew Kaster, bgianf, CxByte and Gunnar for the debugging
help.
|
|
With the renaming of "Frame" to "BrowsingContext", this changes
"FrameHostElement" to "BrowsingContextContainer" to further
match the spec.
https://html.spec.whatwg.org/#browsing-context-container
|
|
The Context and Software Rasterizer now gets the array of texture units
instead of a single texture object. _Technically_, we now support some
primitive form of multi-texturing, though I'm not entirely sure how well
it will work in its current state.
|
|
|
|
These are merely a way to hold the different texture target bind
points that a texture can be bound to.
|
|
|
|
When using BIND_NOW (e.g. via -Wl,-z,now) we would fail to load ELF
images while doing relocations when we encounter a weak symbol. Instead
we should just patch the PLT entry with a null pointer.
This can be reproduced with:
$ cat test.cpp
int main()
{
std::cout << "Hello World!" << std::endl;
}
$ g++ -o test -Wl,-z,now test.cpp
$ ./test
did not find symbol while doing relocations for library test: _ITM_RU1
|
|
This removes the public trim() method because it is no longer
necessary. Callers can instead use resize().
|
|
Previously ByteBuffer::grow() behaved like Vector<T>::resize().
However the function name was somewhat ambiguous - and so this patch
updates ByteBuffer to behave more like Vector<T> by replacing grow()
with resize() and adding an ensure_capacity() method.
This also lets the user change the buffer's capacity without affecting
the size which was not previously possible.
Additionally this patch makes the capacity() method public (again).
|
|
We were asserting that it exists, but the spec says to return null in
this case.
Top: https://html.spec.whatwg.org/multipage/browsers.html#dom-top
Parent: https://html.spec.whatwg.org/multipage/browsers.html#dom-parent
|
|
Avoid promotion of static strings to AK::String, instead use
AK::StringView and operator ""sv, to force string view's instead
which avoids allocation of String. This code path isn't hot enough
that it makes a huge difference, but every bit counts.
|
|
|
|
Since this program is setuid-root, it should be as simple as possible.
To that end, remove `/etc/plsusers` and use filesystem permissions to
achieve the same thing. `/bin/pls` is now only executable by `root` or
members of the `wheel` group.
Also remove all the logic that went to great lengths to `unveil()` a
minimal set of filesystem paths that may be used for the command.
The complexity-to-benefit ratio did not seem justified, and I think
we're better off keeping this simple.
Finally, remove pledge promises the moment they are no longer needed.
|
|
This only affects malformed RSA keys. Instead of accepting and
continuing with potentially broken pointers (and in ASAN, crashing), we
now consider bitmaps malformed, and stop parsing.
Found by OSS Fuzz: #31698, long-standing-bug:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31698
Fun fact: The "if" only exists because of OSS Fuzz.
8cc279ed74dc0b16a187052d2454c26c8c6ecaf2
|