Commit graph

52012 commits

Author SHA1 Message Date
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
Andreas Kling
e87d84f883 LibJS/Bytecode: Support in binary operator for private fields
11 new passes on test262. :^)
2023-07-05 15:39:25 +02:00
gloof11
e4b6c402cb Ports: Cave Story (Aeon Genesis Translation) 2023-07-05 13:38:57 +02:00
Nicolas Ramz
4805447c22 LibWeb: Support cellspacing attribute on table elements 2023-07-05 12:31:54 +01:00
Daniel
4314ed72e6 FlappyBug: Replace usage of DeprecatedString 2023-07-05 12:13:44 +01:00
Lucas CHOLLET
0ef61ab895 LibGfx/JPEG: Convert some west-consts to east-consts 2023-07-05 12:10:56 +01:00
Lucas CHOLLET
af14ed6b2e LibGfx/JPEG: Accept grayscale images with an App14 segment
The adobe specification doesn't even consider JPEG images with a single
component. So let's not consider the content of the App14 segment for
grayscale images.
2023-07-05 12:10:56 +01:00
kleines Filmröllchen
8df714ff1e Meta/Fuzzers: Extract common audio fuzzing code
Apart from the class used audio fuzzers have identical behavior: Create
a memory stream from the fuzzer input and pass this to the loader, then
try to load audio until an error occurs. Since the loader plugins need
to have the same static create() function anyways for LibAudio itself,
we can unify the fuzzer implementations and reduce code duplication.
2023-07-05 11:58:50 +01:00
Andreas Kling
088cc4ea73 LibWeb: Parse CSS :host selector
Let's at least parse it, even if we don't implement matching for it yet.
2023-07-05 12:42:02 +02:00
Shannon Booth
6acce60393 AK: Fix typo in URL basic parse authority state
We weren't actually ever iterating over the buffer, and only what we
were intending to append to (which is empty!).
2023-07-05 11:41:10 +02:00
Shannon Booth
16b43ed03e AK: Correct faulty logic for host state in basic URL parse
The '[' and ']' code points were not being appended to the buffer for
this case.
2023-07-05 11:41:10 +02:00
Shannon Booth
dc27d19b21 AK: Remove superfluous check for file state in URL basic parse
The spec does not mention any of the other checks we were doing.
2023-07-05 11:41:10 +02:00
Shannon Booth
b76972ff32 AK: Correct faulty logic in file slash state in basic URL parsing
We were not correctly decrementing the pointer in the case that either
the base URL was non-null or the base URL's scheme was not a file.
2023-07-05 11:41:10 +02:00
Shannon Booth
a809d1634f AK: Add missing spec assert in relative state basic URL parsing 2023-07-05 11:41:10 +02:00
Shannon Booth
4dd4ff68d3 AK: Correct logic in file state decrementing a path in URL basic parsing 2023-07-05 11:41:10 +02:00
Shannon Booth
983441b67f AK: Check for state override in more places for basic URL parsing 2023-07-05 11:41:10 +02:00
Shannon Booth
c6c424e982 AK: Add spec comments for 'basic URL parser'
By golly, this is a lot more spec comments than I originally thought
I would need to do! This has exposed some bugs in the implementation,
as well as a whole lot of things which we are yet to implement.

No functional changes intended in this commit (already pretty large
as is!).
2023-07-05 11:41:10 +02:00
Karol Kosek
bd853de716 Mail: Fix crash caused by migration from NonnullRefPtrVector
When we moved from NonnullRefPtrVector<T> to Vector<NonnullRefPtr<T>>
in commit 8a48246ed1, the `at()` function
started returning a NonnullRefPtr<T>& instead of T&.

The code calling create_index() was not then updated and ended up taking
a pointer to a temporary NonnullRefPtr<>, instead of an actual object,
leading to a crash after logging in.
2023-07-05 11:39:27 +02:00
Shannon Booth
dfcd5ffaba Base: Update diff(1) man page to latest set of options
Describe how to use the two new context and unified format options in
the diff utility. Also change the example comparison of two files so
they contain more lines as that is much more interesting (and useful).
2023-07-05 10:26:48 +01:00
Shannon Booth
c57658fffa diff: Allow configurable context for unified and context diffs
Add the options '-C','--context' and '-U','--unified', which can be used
to ask diff to write a diff in that format with a given number of
context lines surrounding the diff.
2023-07-05 10:26:48 +01:00
Nicolas Ramz
876ad69ea3 LibWeb: Support bgcolor attribute on tr elements 2023-07-05 08:19:55 +01:00