Commit graph

29543 commits

Author SHA1 Message Date
Linus Groh
232f54cd9b LibCore: Fix off-by-one in DateTime::{create,set_time} day default arg
Just like month, the day value here is one-based. This resulted in the
following situation, which is obviously unexpected:

    Core::DateTime::create(1970); // 1970-01-00 -> 1969-12-31
2021-10-30 10:15:49 +02:00
Daniel Bertalan
e9f0ebd4bd LibHTTP: Fix logic error leading to buffer over-read
When we receive HTTP payloads, we have to ensure that the number of
bytes read is *at most* the value specified in the Content-Length
header.

However, we did not use the correct value when calculating the truncated
size of the last payload. `m_buffered_size` does not store the total
number of bytes received, but rather the number of bytes that haven't
been read from us.

This means that if some data has already been read from us,
`m_buffered_size` is smaller than `m_received_size`. Because of this, we
ended up resizing the `payload` ByteBuffer to a larger size than its
contents. This garbage data was then read by consumers, producing this
warning when executing scripts:

> Extension byte 0xdc in 1 position after first byte 0xdc doesn't make
> sense.
2021-10-30 00:54:34 +03:30
Andreas Kling
47b8d80864 Meta: Add note about abandoned PR's to CONTRIBUTING.md 2021-10-29 22:59:44 +02:00
Marco Cutecchia
3428e2a76c HackStudio: Add 'Show Dotfiles' option 2021-10-29 22:40:11 +02:00
Timothy Flynn
ef62118c8b LibWeb: Render any specified list-style-image for list items 2021-10-29 22:06:49 +02:00
Timothy Flynn
eb0fb38cac LibWeb: Support parsing some data: URLs in CSS
For now, data URLs are explicitly limited to expected MIME types. For
example, image-related styles accept image MIME types.
2021-10-29 22:06:49 +02:00
Timothy Flynn
1e6afa9fd5 Base: Add tests for data: URLs and large list-style-image to lists.html 2021-10-29 22:06:49 +02:00
Timothy Flynn
2fadbe176e LibWeb: Remove extraneous semi-colon 2021-10-29 22:06:49 +02:00
Musab Kılıç
39afbceb53 Minesweeper: Set time label to a fixed width
This ensures the label width doesn't sporadically change as time elapses
2021-10-29 23:02:24 +03:00
thislooksfun
7eaac7d2c1 CI: Notify Discord on all new PRs, even drafts 2021-10-29 22:37:48 +03:00
Rodrigo Tobar
f356c4ab91 wc: Count last line even if it doesn't end in newline 2021-10-29 22:37:34 +03:00
Idan Horowitz
040e29c7b9 LibJS: Convert ShadowRealmPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
658056233e LibJS: Convert GeneratorObjectPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
7b5ccbc5ed LibJS: Convert ProxyConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
92bd64cb56 LibJS: Convert the ProxyCreate AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
84681788c4 LibJS: Convert FinalizationRegistryPrototype funcs to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
909e13c5e6 LibJS: Convert WeakSetPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
56e14ba09f LibJS: Convert WeakMapPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
f1e215ea3e LibJS: Convert MapIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
dab0a92c19 LibJS: Convert MapPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
8ff152ec5c LibJS: Convert MapConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
23ea1f1a3e LibJS: Convert MathObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
b184e872e4 LibJS: Convert ReflectObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
4c3ea0bb91 LibJS: Convert StringIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
720bb21ee2 LibJS: Convert ArrayBufferPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
ffa58184d2 LibJS: Convert ArrayBufferConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
70cbd43718 LibJS: Convert DataViewPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
9d3348d8da LibJS: Convert the SetViewValue AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
fca05f835f LibJS: Convert the GetViewValue AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
7f3fa7d7e0 LibJS: Convert NumberPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
2c6955462e LibJS: Convert NumberConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
08fb31087b LibJS: Convert BooleanPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
2a0c51149d LibJS: Convert FunctionPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
c0bb456fd2 LibJS: Convert the CreateDynamicFunction AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
47f762ab42 LibJS: Convert ErrorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
c815519a65 LibJS: Convert WeakRefPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
719d1b48ac LibJS: Convert ArrayIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
d1d4ee699b LibJS: Convert ConsoleObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
e7a134a346 LibJS: Convert JSONObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
6b954b9e76 LibJS: Convert SetIteratorPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
d46d8c9016 LibJS: Convert SetPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
c2e0753d8a LibJS: Convert SetConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
7c96ed8cf3 LibJS: Convert SymbolPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
294f244745 LibJS: Convert SymbolConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
87ff51fa67 LibJS: Convert BigIntPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
4128f95903 LibJS: Convert BigIntConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Ali Mohammad Pur
ac856cb965 LibRegex: Don't ignore empty alternatives in append_alternation()
Doing so would cause patterns like `(a|)` to not match the empty string.
2021-10-29 15:57:59 +02:00
thislooksfun
7ee409ef98 CI: Rewrite the lintcommits workflow using an inline script
tim-actions/commit-message-checker-with-regex@v0.3.1 only uses the
keys 'sha' and 'commit.message'. Passing more information than that
is unnecessary and can lead to CI failures like this one:
https://github.com/SerenityOS/serenity/runs/4029269017?check_suite_focus=true#step:4:7

Instead of trying to pass data between workflow steps, we can instead
just do it all at once (plus this gives us more control over
formatting, which has also been improved).
2021-10-29 16:51:22 +03:00
Luke Wilde
6088011c4b LibWeb: Add Element.webkitMatchesSelector
This is an alias of Element.matches for web compatibility.
https://dom.spec.whatwg.org/#dom-element-webkitmatchesselector

Used by particularly old versions of Sizzle, such as 1.10.2:
16b079b164/jquery.js (L1644)

This particular version is used by DuckDuckGo.
2021-10-28 21:43:36 +02:00
Andreas Kling
49916f494d LibWeb: Don't try to layout list-item markers in BFC
Marker boxes are laid out by the corresponding ListItemBox. BFC should
just leave them alone. This fixes a jiggling issue on welcome.html :^)
2021-10-28 19:44:21 +02:00