Tom Finet
a7db718ffb
Kernel/Net: Send RST packet when socket receives in closed state
...
RFC9293 states that a closed socket should reply to all non-RST
packets with an RST. This change implements this behaviour as
specified in section 3.5.2 in bullet point 1.
2024-02-24 15:49:46 -07:00
Fabian Dellwing
29ef508b4e
tail: Collapse repeated error handling into statement expression
...
Co-authored-by: Timothy Flynn <trflynn89@pm.me>
2024-02-24 15:48:36 -07:00
Fabian Dellwing
e40aca2d77
tail: Handle truncation in follow mode
2024-02-24 15:48:36 -07:00
Fabian Dellwing
5180e41918
Kernel: Call did_modify_contents()
after truncate()
...
Truncating a file should absolutly mark it as modified. With this
change our `tail` implementation can correctly handle it.
2024-02-24 15:48:36 -07:00
Sönke Holz
525555181e
LibELF: Add riscv64 PLT trampoline
...
This code is based on the aarch64 implementation.
2024-02-24 15:41:23 -07:00
Julian Offenhäuser
bf9240c7a9
Ports: Update OpenRCT2 to version 0.4.8
2024-02-24 23:26:26 +01:00
Dan Klishch
8ac0e3f0e5
AK+LibJS: Remove null state from DeprecatedFlyString :^)
2024-02-24 15:06:52 -07:00
Dan Klishch
026c1caba0
LibJS: Don't use null DFS for binding_name parameters in ClassExpression
2024-02-24 15:06:52 -07:00
Dan Klishch
d558468d03
LibJS: Don't differentiate between empty and null DFS in CatchClause
2024-02-24 15:06:52 -07:00
Dan Klishch
fb2c929310
LibJS: Don't use null DFS in {Import,Export}Entry
2024-02-24 15:06:52 -07:00
Dan Klishch
78491204d9
LibJS: Don't use null DFS for break/continue statements without a label
2024-02-24 15:06:52 -07:00
Dan Klishch
761d16141d
LibJS: Store DFS instead of opaque StringImpl inside StringOrSymbol
...
Additionally, use the second bit (instead of the first) to differentiate
between strings and symbols there. This will allow transparent
conversion of DFS to StringBase in the future.
2024-02-24 15:06:52 -07:00
Dan Klishch
a53911717f
LibJS: Remove DeprecatedFlyString::impl use in PrimitiveString
2024-02-24 15:06:52 -07:00
Dan Klishch
061f902f95
AK+Userland: Introduce ByteString::create_and_overwrite
...
And replace two users of raw StringImpl with it.
2024-02-24 15:06:52 -07:00
Dan Klishch
f7c952f842
JSSpecCompiler: Ignore notes in algorithm steps
2024-02-24 15:03:08 -07:00
Dan Klishch
ba61b61d67
JSSpecCompiler: Parse "NewTarget" in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
4d8f74c149
JSSpecCompiler: Parse method headers
2024-02-24 15:03:08 -07:00
Dan Klishch
a35a751f9e
JSSpecCompiler: Parse optional arguments groups
2024-02-24 15:03:08 -07:00
Dan Klishch
3e6a07154b
JSSpecCompiler: Parse "the *this* value" in expressions
2024-02-24 15:03:08 -07:00
Dan Klishch
ddf26a768c
JSSpecCompiler: Parse "Perform <expression>." steps
2024-02-24 15:03:08 -07:00
Dan Klishch
d1fc84c638
JSSpecCompiler: Parse accessor property headers
2024-02-24 15:03:08 -07:00
Dan Klishch
a9f3a14a13
JSSpecCompiler: Simplify value handling in TextParser::parse_expression
2024-02-24 15:03:08 -07:00
Dan Klishch
e1a1f4ed1a
JSSpecCompiler: Parse lists in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
d14bb7e91e
JSSpecCompiler: Make function arguments parsing much simpler
...
In a nutshell, when we understand that the expression is a function
call (this happens at '(' after an expression), stop parsing expression
and start parsing function arguments. This makes
`FunctionCallCanonicalizationPass` and the workaround for zero argument
function calls obsolete.
2024-02-24 15:03:08 -07:00
Dan Klishch
990e30f458
JSSpecCompiler: Parse enumerators in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
3d365326af
JSSpecCompiler: Parse '?' before function calls in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
b800276347
JSSpecCompiler: Parse true, false, this, undefined, and null
2024-02-24 15:03:08 -07:00
Dan Klishch
86d54a8684
JSSpecCompiler: Parse arbitrarily large rational numbers in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
2a2e31f2ed
LibCrypto: Avoid UB in BigFraction::to_byte_string for 0/x fractions
2024-02-24 15:03:08 -07:00
Dan Klishch
bd26e5dce9
JSSpecCompiler: Parse <sup> as raising a number to a power in xspec mode
2024-02-24 15:03:08 -07:00
Dan Klishch
394c9b7006
JSSpecCompiler: Sort token types and operators alphabetically
2024-02-24 15:03:08 -07:00
Tim Ledbetter
1d825f17c0
LibWeb: Remove first rule if no argument is given for remove_rule()
...
While this isn't explicitly mentioned in the specification, there is a
WPT test that checks for this behavior.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
3ea318ca8b
LibWeb: Implement CSSStyleSheet.addRule()
...
This is a legacy method that has been superseded by `insertRule()`,
although it is supported by all modern browser engines.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
87b52a1816
LibWeb: Implement CSSStyleSheet.replaceSync()
...
This method behaves the same as `CSSStyleSheet.replace()` but the
operation is performed synchronously.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
81c67d34eb
LibWeb: Implement CSSStyleSheet.replace()
...
This method asynchronously replaces the content of the given stylesheet
with the content passed to it.
An exception is thrown if this method is used by a stylesheet not
created with the `CSSStyleSheet()` constructor.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
d209d5a84f
LibWeb: Ensure CSSStyleSheet::css_rules() always returns the same object
...
Instead of having a method that replaces the stylesheet's CSSRuleList,
we now have a method on CSSRuleList to modify it's underlying CSSRules.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
811033ec19
LibWeb: Disallow inserting @import rules into a constructed stylesheet
2024-02-24 21:59:28 +01:00
Tim Ledbetter
b0f57a2785
LibWeb: Add CSSStyleSheet constructor binding
2024-02-24 21:59:28 +01:00
Tim Ledbetter
f303905875
LibWeb: Add the CSSStyleSheet.rules
alias for CSSStyleSheet.cssRules
2024-02-24 21:59:28 +01:00
Tim Ledbetter
9b1ea4e2fc
LibWeb: Add CSSStyleSheet.ownerRule
attribute
...
This returns the `CSSImportRule` corresponding to the `@import` at-rule
that imported the stylesheet into the document. If the stylesheet
wasn't imported then this property is null.
2024-02-24 21:59:28 +01:00
Tim Ledbetter
588a031e2d
LibWeb: Clamp calculated border width values to zero
...
Previously, a calculated CSS border-width property with a resolved
value of less than zero pixels would cause a crash.
2024-02-24 21:57:24 +01:00
Andreas Kling
8addfc14af
LibWeb: Implement IntersectionObserver "intersection roots" per spec
...
In particular, get the implicit root correctly for intersection
observers that don't have an explicit root specified.
This makes it possible to load the Terminal app on https://puter.com/
2024-02-24 19:56:08 +01:00
Andreas Kling
8586897928
headless-browser: Don't choke on subframe load completions
...
This didn't break any existing tests, but I have to do this for an
upcoming test to not bring everything down.
2024-02-24 19:56:08 +01:00
Andreas Kling
9759f44faf
LibWeb: Allow SVGDecodedImageData to cache bitmaps at different sizes
...
This avoids constantly re-rendering the same SVG image over and over
during painting when it's being used at a couple of different sizes
(for example when used as a CSS background).
2024-02-24 19:56:08 +01:00
Andreas Kling
2484324f9a
LibGfx: Add hash traits for the Size family
2024-02-24 19:56:08 +01:00
Andreas Kling
11b4216e65
LibWeb: Run IntersectionObserver steps only when needed
...
Instead of updating IOs in every iteration of the HTML event loop,
we now only do it after a relayout, or after the viewport changes.
2024-02-24 19:56:08 +01:00
Aliaksandr Kalenik
d3f8d24abb
LibWeb+WebContent: Remove PageClient::page_did_invalidate()
...
...and schedule repainting directly from Navigable::set_needs_display()
bypassing PageClient.
2024-02-24 16:54:55 +01:00
Aliaksandr Kalenik
c3f5dbb101
LibWeb: Paint page only if something that requires repaint happened
...
Resolves a performance regression from
8ba18dfd40
, where moving paint scheduling
to `EventLoop::process()` led to unnecessary repaints.
This update introduces a flag to trigger repaints only when necessary,
addressing the issue where repaints previously occurred with each event
loop process, irrespective of actual changes.
2024-02-24 16:54:55 +01:00
Aliaksandr Kalenik
906ac71eca
LibWeb: Fix crashing after input into empty contenteditable
...
Change `EventHandler::handle_keydown()` to no longer assume the cursor
position's node is always a `DOM::Text`. While this assumption holds
for `HTMLInputElement` that has a shadow DOM with a text node, an empty
`contenteditable` might not have any children. With this change,
`handle_keydown()` creates a new text node if the cursor position's
node is not a text node.
2024-02-24 08:09:01 +01:00
Aliaksandr Kalenik
5d76fa72e9
LibWeb: Add HTMLElement::did_receive_focus()
2024-02-24 08:09:01 +01:00