summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-23LibJS: Make Parser::Error a standalone ParserError classAndreas Kling
This allows us to forward declare it and reduce the number of things that need to include Parser.h.
2022-11-23LibJS: Move {Import,Export}Entry out of {Import,Export}StatementAndreas Kling
By making these be standalone instead of nested structs, we can forward declare them. This will allow us to stop including AST.h in some places.
2022-11-23LibJS: Make CyclicModule.h not include AST.hAndreas Kling
2022-11-23LibJS: Make Interpreter.h not include AST.hAndreas Kling
2022-11-23LibJS: Make RegExpObject.h not include AST.hAndreas Kling
2022-11-23LibJS: Make DeclarativeEnvironment not include AST.hAndreas Kling
2022-11-23LibJS: Make AsyncGenerator not include AsyncGeneratorRequest.hAndreas Kling
2022-11-23LibJS: Make CyclicModule.h not include PromiseCapability.hAndreas Kling
2022-11-23LibJS: Move JobCallback functions out-of-lineAndreas Kling
This allows JobCallback.h to not include Runtime/AbstractOperations.h and FunctionObject.h.
2022-11-23Ports/SDL2: Rename LibGUI Window function in accordance with 5d56756kleines Filmröllchen
2022-11-23LibWeb: Try to place out-of-flow blocks only in anonymous blocksAliaksandr Kalenik
This change makes out-of-flow blocks to be considered for joining only to anonymous blocks that have inline children. It finally solved the problem that out-of-flow break anonymous blocks into chunks causing wrong layout without regressing Acid2.
2022-11-23LibArchive: Do not assert if the provided stream cannot be discardedimplicitfield
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52498
2022-11-23LibArchive: Simplify error handlingimplicitfield
2022-11-22LibJS: Shrink Identifier's environment coordinate cacheAndreas Kling
This patch does two things: - We now use u32 instead of size_t for the hops and index fields in EnvironmentCoordinate. This means we're limited to an environment nesting level and variable count of 4Gs respectively. - Instead of wrapping it in an Optional, EnvironmentCoordinate now has a custom valid/invalid state using a magic marker value. These two changes reduce the size of Identifier by 16 bytes. :^)
2022-11-22LibJS: Remove unused "lexical argument index" metadata from IdentifierAndreas Kling
This shrinks Identifier by 16 bytes. :^)
2022-11-22LibJS: Reduce AST memory usage by shrink-wrapping source range infoAndreas Kling
Before this change, each AST node had a 64-byte SourceRange member. This SourceRange had the following layout: filename: StringView (16 bytes) start: Position (24 bytes) end: Position (24 bytes) The Position structs have { line, column, offset }, all members size_t. To reduce memory consumption, AST nodes now only store the following: source_code: NonnullRefPtr<SourceCode> (8 bytes) start_offset: u32 (4 bytes) end_offset: u32 (4 bytes) SourceCode is a new ref-counted data structure that keeps the filename and original parsed source code in a single location, and all AST nodes have a pointer to it. The start_offset and end_offset can be turned into (line, column) when necessary by calling SourceCode::range_from_offsets(). This will walk the source code string and compute line/column numbers on the fly, so it's not necessarily fast, but it should be rare since this information is primarily used for diagnostics and exception stack traces. With this, ASTNode shrinks from 80 bytes to 32 bytes. This gives us a ~23% reduction in memory usage when loading twitter.com/awesomekling (330 MiB before, 253 MiB after!) :^)
2022-11-22LibWeb: Do not try to join floats into anonymous blockAliaksandr Kalenik
Making floats to join anonymous block caused regressions in Acid2 Test so let's leave it to be only absolute blocks who might be joined into anonymous block when possible.
2022-11-22LibWeb: Support box-sizing in BFCAliaksandr Kalenik
Add support for box-sizing in block formatting context, support for Flex Formatting Context and Grid Formatting Context is missing
2022-11-223DFileViewer: Propagate key events to the windowNames4Noobs
Before this, shortcuts would not work due to key events not being propagated to the window.
2022-11-21Base: Add test for multiple line names in CSS Gridmartinfalisse
2022-11-21LibWeb: Handle multiple line names in the CSS Gridmartinfalisse
Prevent crashing when multiple line names are declared in the grid-template-* CSS properties by skipping over the character separating each line name.
2022-11-21LibJS+LibWeb: Make JS::ExecutionContext protect its Web::HTML::ESO ownerAndreas Kling
We can't be nuking the ESO while its owned execution context is still on the VM's execution context stack, as that may lead to a use-after-free. This patch solves this by adding a `context_owner` field to each context and treating it as a GC root.
2022-11-21WebContent: Implement WebDriver's implicit timeout for finding elementsTimothy Flynn
2022-11-21WebContent: Don't assume start nodes for finding elements remain validTimothy Flynn
When timeouts are implemented, the start node used to find elements may not remain valid for the entire duration of the timeout. For example, the active document element may change, or the start node may be removed from the DOM. To handle this, we will need to re-evaluate the start node on each iteration of the find() operation. This patch wraps the steps to do so in a lambda to be executed on each iteration.
2022-11-21AK: Define a convenience alias for a Function's return typeTimothy Flynn
This is nice when the return type is long and needs to be specified as a lambda's return type many times to resolve ambiguity.
2022-11-21LibWeb: Remove unused should_invalidate_styles_on_attribute_changes()Baitinq
This getter and setter were previously labelled as a "hack" and used to disable style invalidation on attribute changes during the HTML parsing phase (as it caused big sites's loading to be slow). These functions are currently not used, so they can be removed:^)
2022-11-21LibWeb: Don't implement bogus assertion in prepare-the-script-elementAndreas Kling
The HTML spec is asking us to make a possibly-bogus assertion, so let's disable it for now. Spec bug: https://github.com/whatwg/html/issues/8534
2022-11-21LibWeb: Update the HTML parser part that deals with text in <script>Andreas Kling
This commit adds inline spec comments to the part of the parser that ends up calling HTMLScriptElement::prepare(). The code is tweaked to match the spec more closely.
2022-11-21LibWeb: Update HTMLScriptElement prepare and execute to latest HTML specAndreas Kling
The net result is some nice simplification of the prepare algorithm and a bit of initial scaffolding for import maps support.
2022-11-21LibWeb: Rename HTMLScriptElement "non-blocking" to "force async"Andreas Kling
This has been renamed in the spec, so let's do it here too.
2022-11-21LibWeb: Add spec links to HTMLScriptElement member variablesAndreas Kling
This makes it much easier to see which members represent something in the spec, and which ones are LibWeb implementation details.
2022-11-21AK: Fix memory corruption due to BumpAllocator mmap reuseAndreas Kling
There was a subtle mismatch between the obviously expected behavior of BumpAllocator::for_each_chunk() and its actual implementation. You'd think it would invoke the callback with the address of each chunk, but actually it also took the liberty of adding sizeof(ChunkHeader) to this address. UniformBumpAllocator::destroy_all() relied on this to get the right address for objects to delete. The bug happened in BumpAllocator::deallocate_all(), where we use for_each_chunk() to walk the list of chunks and munmap() them. To avoid memory mapping churn, we keep a global cache of 1 chunk around. Since we were being called with the offset chunk address, it meant that the cached chunk shifted 16 bytes away from its real address every time we re-added it to the cache. Eventually the cached chunk address would leave its memory region entirely, and at that point, any attempt to allocate from it would yield an address outside the region, causing memory corruption.
2022-11-20LibWeb: Return content box position from calculate_static_positionAliaksandr Kalenik
This change makes calculate_static_position to return content box for both x and y (at least for the case when children are not inline). It makes it possible to be consistent about x and y when calculating box offset inside layout_absolutely_positioned_element.
2022-11-20LibJS/Temporal: Unroll the loop in to_temporal_time_recordJonah
This is an editorial change in the Temporal spec. See: tc39/proposal-temporal@8e80575
2022-11-20LibJS/Temporal: Unroll the loop in to_temporal_duration_recordJonah
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/8e80575
2022-11-20LibJS/Temporal: Unroll the loop in to_temporal_partial_dictation_recordJonah
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/8e80575
2022-11-20LibJS/Temporal: Rename ToIntegerWithRounding to ToIntegerIfIntegralJonah
This is an editorial change to the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/1dceb57
2022-11-20LibJS/Temporal: Reorder Tables by Order of MagnitudeJonah
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/f2d5642 and https://github.com/tc39/proposal-temporal/commit/07673d3
2022-11-20LibVT/LibLine: Delete words when pressing Ctrl+Backspace in TerminalZaggy1024
2022-11-19LibJS: Fix UTF-16 corruption in String.prototype.replace()Andreas Kling
We were mistakenly trying to append UTF-16 code units to a StringBuilder via the append(char) API. This patch fixes that by accumulating the result in a Vector<u16> instead. This'll be a bit worse for performance, since we're now doing additional UTF-16 string conversions, but we're going for correctness at this stage and can worry about performance later.
2022-11-19cksum: Manually count file size instead of using stat()Sam Atkins
`stat()` doesn't work for stdin, but this does.
2022-11-19xml: Port to Core::StreamSam Atkins
2022-11-19Utilities/w: Port to Core::StreamSam Atkins
2022-11-19utmpupdate: Port to Core::StreamSam Atkins
2022-11-19test-fuzz: Port to Core::StreamSam Atkins
2022-11-19sysctl: Port to Core::StreamSam Atkins
2022-11-19strace: Port to Core::StreamSam Atkins
2022-11-19sql: Port to Core::StreamSam Atkins
2022-11-19shot: Port to Core::StreamSam Atkins
2022-11-19route: Port to Core::StreamSam Atkins