Commit graph

50812 commits

Author SHA1 Message Date
Aliaksandr Kalenik
7cc20f4cb5 LibWeb: Reset margin collapsing state only if box indeed add clearance
This fixes the issue when margin collapsing state was always reset if
a box has clear property not equal to none even if it does not actually
introduce clearance.
2023-05-26 18:11:35 +02:00
Sam Atkins
b0a43404b9 LibWeb: Avoid nullptr dereference when parsing grid sizes 2023-05-26 17:53:11 +02:00
Andreas Kling
0d4c7fa392 LibJS/Bytecode: Make for..in iterate property names as string
Makes 107 new tests pass in test262. :^)
2023-05-26 17:52:51 +02:00
Caoimhe
360b8b166f Kernel/aarch64: Use the correct MMIO base address in the MMU 2023-05-26 08:29:26 -06:00
Caoimhe
b0eff23a46 Documentation: Add note about testing UART on the Raspberry Pi 4B 2023-05-26 08:29:26 -06:00
Cameron Youell
0afdde0eef LibWeb: Consume sign in SVG::parse_elliptical_arg_argument
This was crashing on google.com with the linux chrome user agent,
interestingly it seems like this behavior may have been accidental as
only two of the three `parse_number()` were changed in f7dbcb6
2023-05-26 14:54:00 +02:00
Andi Gallo
5cec517153 LibWeb: Get reference height from closest non-anonymous ancestor
Ignore anonymous block boxes when resolving percentage weights that
would refer to them, per the CSS 2 visual formatting model
specification. This fixes the case when we create an anonymous block
between an image which uses a percentage height relative to a parent
which specifies a definite height.

Fixes #19052.
2023-05-26 14:53:53 +02:00
Timothy Flynn
706a20c4d4 LibJS: Disallow creating ArrayBuffers larger than 2^53 - 1
This is a normative change in the ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/25f9744
2023-05-26 05:23:55 +02:00
Timothy Flynn
d31b780760 LibJS: Update spec numbers for the Well-Formed Unicode Strings proposal
This proposal has been merged into the main ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/d95f42d
2023-05-26 05:23:55 +02:00
PrestonLTaylor
5d3b7a5ecc LibWeb: Return DOMException instead of crashing when setting attributes 2023-05-26 05:23:09 +02:00
Aliaksandr Kalenik
6891676fce LibGfx: Fix glyph render to create implied points in start/end of path
Implied point = point created by two subsequent "off curve" points.

Fixes following issues in function that builds glyph path from points:
- If first point is "off curve" it was wrongly treated as "on curve"
  which caused wrong first point position in the path.
- If both first and last points in the path are "off curve" implied
  point was not created between them which caused wrong path shape in
  the end of the path.
2023-05-26 05:21:08 +02:00
sec05
6a886e4aac Browser: Download Widget file and directory text changes
fixes #18678

This is because the "From:" URL regularly overflows the line, leading
to an unreadable mess. Make sure that the labels for the widget
don't wrap as well, as the widget is fixed height and width.
2023-05-25 17:45:16 -06:00
Andreas Kling
624f43c12b LibWeb: Do the CORS cross-origin workaround to find MIME type for images
This makes cross-origin image loads actually see the MIME type the
server tells us. :^)
2023-05-25 12:53:41 -07:00
Andreas Kling
aeffa0d988 LibWeb: Make Fetch::Infrastructure::HeaderList::is_empty() public 2023-05-25 12:53:41 -07:00
Daniel Bertalan
906abbdf53 Kernel/aarch64: Fix build after #17842 2023-05-25 08:26:07 -07:00
Andreas Kling
475bac89e1 LibWeb: Don't crash on unimplemented CSS display type
If some page throws "display: ruby-text" or some such at us, let's just
complain and carry on.
2023-05-25 16:49:34 +02:00
Andreas Kling
9c8da4374d LibWeb: Try failed font lookups again without weight and slope
If CSS requests a font that we have loaded, but we didn't associate it
with a specific weight and/or slope, let's still use it if it matches
the family name.

This is a hack until we implement proper CSS font selection.
2023-05-25 16:49:34 +02:00
Sam Atkins
f6fae315e3 LibWeb: Add CustomIdentStyleValue, along with parsing for it
This corresponds to the `<custom-ident>` type in CSS grammar.
2023-05-25 15:31:20 +01:00
Jelle Raaijmakers
b76219f702 Meta: Add myself to CODEOWNERS for LibSQL 2023-05-25 06:19:16 -07:00
Jelle Raaijmakers
69e09fed39 LibSQL: Free heap storage when deleting rows 2023-05-25 06:19:16 -07:00
Jelle Raaijmakers
c58c87d7ef LibSQL: Implement freeing heap storage
This allows us to free entire chains of blocks in one go.
2023-05-25 06:19:16 -07:00
Jelle Raaijmakers
d7bbb8d64a LibSQL: Find free blocks when opening a database file
The free block list now gets populated on opening a database file.
Ideally we persist this list inside the heap itself, but for now this
prevents excessive heap growth.
2023-05-25 06:19:16 -07:00
Jelle Raaijmakers
a6abc1697f LibSQL: Keep track of free heap blocks when trimming storage
When overwriting existing heap storage that requires fewer blocks, make
sure to free all remaining blocks so they can be reused in the future.
2023-05-25 06:19:16 -07:00
Jelle Raaijmakers
c5ebc4bb40 LibSQL: Reuse heap blocks when overwriting storage
Previously, only the first block in a chain of blocks would be
overwritten while all subsequent blocks would be appended to the heap.
Now we make sure to reuse all existing blocks in the chain.
2023-05-25 06:19:16 -07:00
Jelle Raaijmakers
2d2911e1a3 LibSQL: Test SQL::Heap separately
Move the long storage test from TestSqlStatementExecution into a new
test unit called TestSqlHeap. Split it up into a flushed and non-flushed
variant so we test the write-ahead log as well.
2023-05-25 06:19:16 -07:00
Jelle Raaijmakers
d5df832318 LibSQL: Clean up TestSqlDatabase
Missing imports, make methods static. No functional changes.
2023-05-25 06:19:16 -07:00
0GreenClover0
b4c6cddd96 LibWeb: Handle invalid UTF-8 in Fetch's Body#text() 2023-05-25 06:03:40 -07:00
Andreas Kling
7d24c13d8b LibWeb: Make input element placeholders look better
We now create a flex container inside the input element's UA shadow tree
and add the placeholder and non-placeholder text as flex items (wrapped
in elements whose style we can manipulate).

This fixes the visual glitch where the placeholder would appear below
the bounding box of the input element. It also allows us to align the
text vertically inside the input element (like we're supposed to).

In order to achieve this, I had to make two small architectural changes
to layout tree building:

- Elements can now report that they represent a given pseudo element.
  This allows us to instantiate the ::placeholder pseudo element as an
  actual DOM element inside the input element's UA shadow tree.

- We no longer create a separate layout node for the shadow root itself.
  Instead, children of the shadow root are treated as if they were
  children of the DOM element itself for the purpose of layout tree
  building.
2023-05-25 14:42:24 +02:00
Andreas Kling
6fb661e781 LibWeb: Make HTMLDivElement not "final"
This is to prepare for making some custom internal divs inside the input
element UA shadow tree.
2023-05-25 14:42:24 +02:00
kuchikuu
ce764c340a Documentation: Add Qt6 SVG module to Ladybird build deps on Arch
Qt6 SVG is required to successfully compile Ladybird.

Without this package, a compilation error occurs:
Failed to find required Qt component "Svg".
2023-05-25 04:52:36 -06:00
Xexxa
8f16d37f00 Ladybird: Add shortcut to "Close Current Tab" 2023-05-25 09:04:11 +01:00
Xexxa
850b713889 Ladybird: Move "Settings" from "File" to "Edit" 2023-05-25 09:04:11 +01:00
Xexxa
689954dfc1 Ladybird: Add missing icons 2023-05-25 09:04:11 +01:00
Sam Atkins
6b8f484114 LibWeb: Stop generating now-unused property_accepts_value() function 2023-05-25 06:36:10 +02:00
Sam Atkins
c0e61f92c0 LibWeb: Remove now-unused parse_css_value(ComponentValue) method
:^)
2023-05-25 06:36:10 +02:00
Sam Atkins
7e8ed996c9 LibWeb: Use new StyleValue parsing for transform-origin 2023-05-25 06:36:10 +02:00
Sam Atkins
f759a16087 LibWeb: Use new StyleValue parsing for text-decoration 2023-05-25 06:36:10 +02:00
Sam Atkins
a473f6074d LibWeb: Use new StyleValue parsing for text-decoration-line 2023-05-25 06:36:10 +02:00
Sam Atkins
a7a61c4cd9 LibWeb: Use new StyleValue parsing for overflow 2023-05-25 06:36:10 +02:00
Sam Atkins
2da15f987f LibWeb: Use new StyleValue parsing for list-style 2023-05-25 06:36:10 +02:00
Sam Atkins
7386ed7cfb LibWeb: Use new StyleValue parsing for content 2023-05-25 06:36:10 +02:00
Sam Atkins
c8626f2294 LibWeb: Use new StyleValue parsing for font and font-family 2023-05-25 06:36:10 +02:00
Sam Atkins
100adffdfb LibWeb: Use new StyleValue parsing for flex-flow 2023-05-25 06:36:10 +02:00
Sam Atkins
5d8b01ad04 LibWeb: Use new StyleValue parsing for border and its sided versions 2023-05-25 06:36:10 +02:00
Sam Atkins
91c9d10a78 LibWeb: Use new StyleValue parsing for flex
To make this work, we also add `none` as a valid identifier for `flex`.
(This is correct, we just didn't need it before.)
2023-05-25 06:36:10 +02:00
Sam Atkins
021fd15434 LibWeb: Use new StyleValue parsing for background-size 2023-05-25 06:36:10 +02:00
Sam Atkins
8e34bdc123 LibWeb: Use new StyleValue parsing for background-repeat 2023-05-25 06:36:10 +02:00
Sam Atkins
a0ec05ef81 LibWeb: Use new StyleValue parsing for background-position[-x,-y] 2023-05-25 06:36:10 +02:00
Sam Atkins
b0fe07cba3 LibWeb: Use new StyleValue parsing for background 2023-05-25 06:36:10 +02:00
Sam Atkins
d90ad19201 LibWeb: Use new StyleValue parsing for "simple" properties
That is, properties that don't have a bespoke parsing function.
2023-05-25 06:36:10 +02:00