Commit graph

52082 commits

Author SHA1 Message Date
kleines Filmröllchen a3f6236bec LibC: Convert semaphore and termcap to String 2023-07-06 10:15:37 +01:00
kleines Filmröllchen bd13cc0732 GamesSettings+LibCards: Get rid of DeprecatedString 2023-07-06 10:15:37 +01:00
kleines Filmröllchen afaea38be2 Base: Expand "See Also" sections of many manpages
This commit focuses on the CLI utilities.
2023-07-06 10:03:48 +01:00
Andi Gallo f544132fe8 LibWeb: Some improvements for painting of collapsed table borders
Follow the specification in making the borders centered on the grid
lines. This avoids visual bugs due to double-rendering of borders on
either side of an edge and paves the way for a full implementation of
the harmonization algorithm for collapsed borders.

Currently, this still lacks complete handling of row and column spans.
Also, the box model for cells still considers the full width of the
internal borders instead of just half, as the specification requires.
Some additional handling of rounding issues will be needed to avoid very
subtle visual bugs.

Despite these limitations, this improves the appearance of all the
tables with collapsed borders I've tried while limiting the amount of
change to something reasonable.
2023-07-06 10:31:51 +02:00
Andi Gallo f6d2a21d27 LibWeb: Store table cell indices and spans in PaintableBox
The adjacency information is required to position borders correctly
between columns and rows.
2023-07-06 10:31:51 +02:00
Andi Gallo 98c5efc385 LibWeb: Move collapsed table border painting to a separate function
Move painting of cell borders to a separated function since doing it
correctly has to consider the entire grid as a whole for the collapsed
borders case.
2023-07-06 10:31:51 +02:00
Andi Gallo f489d85edd LibWeb: Separate comparator for cell border specificity
Add a cell border specificity comparator which preserves the winning
border logic according to specification and makes it possible to sort
borders by specificity. This will be important for handling the style of
table cell corners in a way consistent with other browsers.
2023-07-06 10:31:51 +02:00
Andi Gallo 85c1b93eb7 LibWeb: Resolve table border conflicts at edge level
This better conforms to specification, which describes border conflict
resolution by edge, not by element.
2023-07-06 10:31:51 +02:00
Daniel Bertalan b39d8af5a6 LibJS/Bytecode: Remove redundant property uniqueness check
This invariant is enforced by virtue of `items` being a HashTable.
2023-07-06 10:30:42 +02:00
Daniel Bertalan d0dce5c60f LibJS/Bytecode: Handle shadowed non-enumerable properties in for-in
Invariants 5 and 6 of the `EnumerateObjectProperties` AO mean that we
must not include an enumerate property if there is a non-enumerable
property higher up the prototype chain with the same name. The previous
implementation did not adhere to this, as `EnumerableOwnPropertyNames`
does not carry information about present but non-enumerable properties.
2023-07-06 10:30:42 +02:00
Sam Atkins f21a30e45f LibWeb: Use CSSNumericType for CalculatedStyleValue resolved type 2023-07-06 09:28:16 +02:00
Sam Atkins 4d84080fdc LibWeb: Implement "Determine the type of a calculation" algorithm
This is sitting alongside our old implementation for the moment.
2023-07-06 09:28:16 +02:00
Sam Atkins 38f954cba5 LibWeb: Generate function for what properties resolve percentages to
This is required by "determine the type of a calculation".
https://www.w3.org/TR/css-values-4/#determine-the-type-of-a-calculation
2023-07-06 09:28:16 +02:00
Sam Atkins be7093ab0d LibWeb: Implement CSSNumericType
This represents the type of a calculation, which may involve multiplying
or dividing the various numeric types together (eg, length*length, or
length/time, or whatever).

For now, I've made "Return failure" in each algorithm return an empty
Optional. This may or may not be a good solution but we'll see. :^)
2023-07-06 09:28:16 +02:00
Sam Atkins 434bac3c67 LibWeb: Return true for is_operator_node() for math-function nodes 2023-07-06 09:28:16 +02:00
Andreas Kling 3372a691da LibWeb: Don't let items flex to infinite size in column layout
When sizing under a max-content constraint, we allow flex lines to have
an infinite amount of "remaining space", but we shouldn't let infinity
leak into the geometry of items. So treat it as zero in arithmetic.

This fixes an issue where inline SVGs with natural aspect ratio (from
viewBox) but no natural width or height could get an infinite size as
flex items.
2023-07-06 09:25:48 +02:00
Timothy Flynn 00d8e221f3 Meta: Support enabling compile-time format string checking on Lagom 2023-07-06 08:55:11 +02:00
Timothy Flynn eed0c32357 IPCMagicLinter: Add missing format parameter to an error log 2023-07-06 08:55:11 +02:00
Luke Wilde 442ca4f9b4 LibJS: Avoid RequireObjectCoercible when creating super references
This is part of an old normative change that happened soon after
Andreas made `super` closer to spec in 1270df2.
See https://github.com/tc39/ecma262/pull/2267/

This was introduced into bytecode by virtue of copy and paste :^)

Bytecode results:
Summary:
    Diff Tests:
        +2     -2 
2023-07-06 08:54:46 +02:00
Luke Wilde b271d9a6bf LibJS/Bytecode: Use proper this for receiver in get/set for super expr
Summary:
    Diff Tests:
        +14     -2     -12 📝
2023-07-06 08:54:46 +02:00
Andi Gallo b7d23162cc LibWeb: Set the definite width flag in set_max_content_width
It was setting the definite flag for height.
2023-07-06 08:54:28 +02:00
Shannon Booth 0f040456a7 LibWeb: Add ReadableStreamGetReaderOptions to ReadableStream.getReader
Co-Authored-By: Matthew Olsson <mattco@serenityos.org>
2023-07-05 23:33:20 +01:00
Shannon Booth 729f4838c2 LibWeb: Implement the Streams AcquireReadableStreamBYOBReader AO
Co-Authored-By: Matthew Olsson <mattco@serenityos.org>
2023-07-05 23:33:20 +01:00
Shannon Booth 9ccadf61a2 LibWeb: Implement the Streams SetUpReadableStreamBYOBReader AO
Co-Authored-By: Matthew Olsson <mattco@serenityos.org>
2023-07-05 23:33:20 +01:00
Lucas CHOLLET aff38ae80f Tests: Add a test for grayscale JPEGs with an App14 segment
See af14ed6b2e for more details.

This test has been created by artificially adding an App14 segment to an
existing grayscale image.
2023-07-05 20:58:25 +01:00
Aliaksandr Kalenik 01910bca39 LibJS: Null check current scope pusher before register_identifier call
This fixes crashing when current scope pusher is null during identifier
parsing.
2023-07-05 21:21:09 +02:00
Aliaksandr Kalenik ae3a7fd4b8 LibJS: Update bytecode generator to use local variables
- Update ECMAScriptFunctionObject::function_declaration_instantiation
  to initialize local variables
- Introduce GetLocal, SetLocal, TypeofLocal that will be used to
  operate on local variables.
- Update bytecode generator to emit instructions for local variables
2023-07-05 21:03:01 +02:00
Aliaksandr Kalenik 0daff637e2 LibJS: Add vector of local variables in ExecutionContext
Now ExecutionContext has vector of values that will represent values
of local variables.

This vector is initialized in ECMAScriptFunctionObject::internal_call()
or ECMAScriptFunctionObject::internal_const() using number of local
variables provided to ECMAScriptFunctionObject by the parser.
2023-07-05 21:03:01 +02:00
Aliaksandr Kalenik 7765ebb5f2 LibJS+LibWeb: Plumb local variables names to ECMAScriptFunctionObject
Saving vector of local variables names in ECMAScriptFunctionObject
will allow to get a name by index in case message of ReferenceError
needs to contain a variable name.
2023-07-05 21:03:01 +02:00
Aliaksandr Kalenik 401d97c45c LibJS: Add ScopeNode::for_each_var_declared_identifier()
The same as for_each_var_declared_name but for identifiers.
2023-07-05 21:03:01 +02:00
Aliaksandr Kalenik 7f0074ac23 LibJS: Add for_each_bound_identifier for AST::Declaration
The same as for_each_bound_name but for identifiers.
2023-07-05 21:03:01 +02:00
Aliaksandr Kalenik a6cdb1655b LibJS: Use Identifier to represent name of FunctionNode 2023-07-05 21:03:01 +02:00
Aliaksandr Kalenik 380abddf3c LibJS: Update parser to detect if identifier refer a "local" variable
This modification enables the parser to determine whether an identifier
used within a function refers to a local variable or not. In this
context, a local identifier means that it is not captured by any nested
function declaration which means it modified only from inside a
function.

The information about whether identifier is local is stored inside
Identifier AST node and also contains information about the index of
local variable inside a function and information about total number
of local variables used by a function is stored in function nodes.
2023-07-05 21:03:01 +02:00
Aliaksandr Kalenik c734f2b5e6 LibJS: Use Identifier to represent name of ClassExpression
By using Identifier class to represent the name of a class expression,
it becomes possible to consistently store information within the
identifier object, indicating whether the name refers to a local
variable or not.
2023-07-05 21:03:01 +02:00
Fabian Dellwing 4a83fb1b12 Ports: Drop Python bindings for Boost
Building Boost failed in at least 2 cases using Python 3.11. Since
there is currently no known usage of Boost's Python binding by ports,
we drop the dependency to make the port install successfully again.
2023-07-05 20:08:53 +02:00
Nico Weber 93357a8b70 LibPDF: Fix a typo in a function name
...and while here, a comment typo too.
2023-07-05 18:42:39 +01:00
Andreas Kling 1177308afb LibWeb: Support justify-content: space-evenly in flex layouts
Aligns the cookie banner correctly on https://twitter.com/ :^)
2023-07-05 19:03:20 +02:00
Andreas Kling 4474aa0ae5 LibWeb: Resolve flex item auto cross sizes through aspect ratio
Makes the bird logo show up on https://twitter.com/ :^)
2023-07-05 19:03:20 +02:00
Timothy Flynn d6a3a50ec9 CI: Show comparison of test262 AST results to bytecode results
Just for convenience to more easily see what is not working in bytecode.
2023-07-05 18:55:00 +02:00
Lucas CHOLLET 3d2e4ba482 Tests: Add a test for JPEGs with an empty ICC profile
No encoder should declare an ICC profile with a size of zero, but some
does. This image has one of these dummy declaration.
2023-07-05 17:41:17 +01:00
Lucas CHOLLET 243e91f5de LibGfx/JPEG: Don't return an error on empty icc profiles
An empty icc profile shouldn't stop our brave decoder.
2023-07-05 17:41:17 +01:00
Jelle Raaijmakers 7551666a80 Ports: Do not perform slow curl check if download already exists
Even if the file was already downloaded, we were trying to perform a
relatively slow HTTPS-call.
2023-07-05 16:17:35 +01:00
kleines Filmröllchen d7a2b5e65b markdown-check: Allow generating a manpage link graph
Using the cross-page links, we can generate a directed graph showing the
topology of which pages refer to other pages. This is not just for fun:
the links show how often a page is linked (since links are not
deduplicated on purpose), which pairs of pages only have links in one
direction (where a link in the other direction may be useful), which
groups of closely-interlinked pages exist, and which pages have few or
no links to other pages.

The EXTRA_MARKDOWN_CHECK_ARGS argument to the check-markdown script can
be used to inject the -g flag for generating the graph on all manpages.
2023-07-05 16:15:42 +01:00
kleines Filmröllchen f53aa959df LibManual: Compare nodes by path
This makes them suited for hash map usage.
2023-07-05 16:15:42 +01:00
kleines Filmröllchen a9053618a8 LibManual: Allow directly obtaining any page's main section number
This has previously been incorrectly handled in a variety of
applications, e.g. subsections were not accounted for.
2023-07-05 16:15:42 +01:00
kleines Filmröllchen b1eacf8801 LibManual: Trim page name correctly when full path is provided
We would previously add an extra "/" at the beginning, since the section
name end points exactly at the found "/".
2023-07-05 16:15:42 +01:00
Andreas Kling dfd0942e41 LibJS/Bytecode: Clear accumulator before entering for body
2 new passes on test262. :^)
2023-07-05 15:39:25 +02:00
Andreas Kling 24b815d4a0 LibJS/Bytecode: Clear accumulator before entering while body
2 new passes on test262. :^)
2023-07-05 15:39:25 +02:00
Andreas Kling b14032bbfa LibJS/Bytecode: Leave for in and for of with right completion value
14 new passes on test262. :^)
2023-07-05 15:39:25 +02:00
Andreas Kling 7430dee5cf LibJS/Bytecode: Make ClassDeclaration not clobber the accumulator
2 new passes on test262. :^)
2023-07-05 15:39:25 +02:00