Commit graph

3447 commits

Author SHA1 Message Date
Tim Ledbetter
64577ad704 LibWeb: Allow multiple values for the transition-duration property 2025-04-23 21:02:59 +01:00
Tim Ledbetter
1ca9f2a44d LibWeb: Allow multiple values for the transition-delay property 2025-04-23 21:02:59 +01:00
Tim Ledbetter
c5f1f36119 LibWeb: Allow multiple values for transition-timing-function property 2025-04-23 21:02:59 +01:00
Tim Ledbetter
7a391f419a LibWeb: Handle single value properties when normalizing transition lists
Previously, if a transition property was not wrapped in a list, it
would be replaced with the default value in
`StyleComputer::compute_transitioned_properties`.
2025-04-23 21:02:59 +01:00
Tim Ledbetter
1f8f3804a3 LibWeb: Allow transition-property with multiple values 2025-04-23 21:02:59 +01:00
stelar7
5d48652890 LibWeb/IDB: Implement IDBObjectStore::put 2025-04-23 12:31:14 -06:00
stelar7
ca1e94f9ea LibWeb/IDB: Implement IDBObjectStore::add 2025-04-23 12:31:14 -06:00
stelar7
a06cec7a3c LibWeb/IDB: Implement IDBObjectStore::add_or_put 2025-04-23 12:31:14 -06:00
stelar7
fb17dae42b LibWeb/IDB: Implement store_a_record_into_an_object_store 2025-04-23 12:31:14 -06:00
stelar7
afe7951af4 LibWeb/IDB: Implement delete_records_from_an_object_store 2025-04-23 12:31:14 -06:00
stelar7
7fa3bd00b5 LibWeb/IDB: Implement inject_a_key_into_a_value_using_a_key_path 2025-04-23 12:31:14 -06:00
stelar7
1bdf519b60 LibWeb/IDB: Implement possibly_update_the_key_generator 2025-04-23 12:31:14 -06:00
stelar7
dbe0db0cab LibWeb/IDB: Implement generate_a_key 2025-04-23 12:31:14 -06:00
stelar7
f8b09148be LibWeb/IDB: Implement asynchronously_execute_a_request 2025-04-23 12:31:14 -06:00
stelar7
551969de30 LibWeb/IDB: Implement more of IDBCursor 2025-04-23 12:31:14 -06:00
stelar7
abb11a26a8 LibWeb/IDB: Implement fire_a_success_event 2025-04-23 12:31:14 -06:00
stelar7
5c814e1a62 LibWeb/IDB: Implement fire_an_error_event 2025-04-23 12:31:14 -06:00
stelar7
d801d25c82 LibWeb/IDB: Change return type of IDBRequest::error() 2025-04-23 12:31:14 -06:00
stelar7
1d97b0d18e LibWeb/IDB: Implement check_that_a_key_could_be_injected_into_a_value 2025-04-23 12:31:14 -06:00
stelar7
eab7a2bb05 LibWeb/IDB: Implement extract_a_key_from_a_value_using_a_key_path 2025-04-23 12:31:14 -06:00
stelar7
84ea78eb4d LibWeb/IDB: Implement evaluate_key_path_on_a_value 2025-04-23 12:31:14 -06:00
stelar7
f36c4d88ff LibWeb/IDB: Implement convert_a_value_to_a_multi_entry_key 2025-04-23 12:31:14 -06:00
stelar7
8bfbcf6d9b LibWeb/IDB: Adjust return type of convert_a_value_to_a_key 2025-04-23 12:31:14 -06:00
stelar7
499548c3d0 LibWeb/IDB: Implement clone_in_realm 2025-04-23 12:31:14 -06:00
Ali Mohammad Pur
eea81738cd AK+Everywhere: Recognise that surrogates in utf16 aren't all that common
For the slight cost of counting code points when converting between
encodings and a teeny bit of memory, this commit adds a fast path for
all-happy utf-16 substrings and code point operations.

This seems to be a significant chunk of time spent in many regex
benchmarks.
2025-04-23 07:56:02 -06:00
Jelle Raaijmakers
79352ad725 LibWeb: Remove application of vertical float clearance to BFC Y offset
In 15103d172c we applied any remaining vertical float clearance to the
BFC's current Y offset for the next block to layout, because a `<br
style="clear: left">` could introduce clearance that would otherwise be
ignored. However, a `<div>` that floats _and_ clears `right` also
introduces this clearance and it is obvious that this should not push
down any subsequent blocks to layout in the current BFC.

Turns out, we don't need this change anymore. Some other later change
also fixed the underlying issue, and by getting rid of the original fix
we can now render https://en.wikipedia.org/wiki/SerenityOS correctly
again.

Fixes #4418.
2025-04-23 13:24:58 +02:00
Jelle Raaijmakers
1731389bfe LibWeb: Return early in clear_floating_boxes()
Get rid of an indentation level. No functional changes.
2025-04-23 13:24:58 +02:00
Jelle Raaijmakers
47ed39a790 LibWeb: Reuse floating box' margin box rect for clear: ...
We already store the resulting margin box rect for floating boxes
relative to their root coordinate space, so don't calculate them again.
No functional changes.
2025-04-23 13:24:58 +02:00
Timothy Flynn
8417ade552 LibWeb: Update the media display when the hovered component changes
This allows the media paintable to be redrawn when the media element is
paused. We change the color of some components on hover, but if the
media was paused, that would not be rendered. This wasn't an issue while
the media is playing because the update to the timeline would take care
of redrawing the paintable.
2025-04-23 13:22:56 +02:00
Timothy Flynn
7b0e62cae7 LibWeb: Use branded colors for the painted media controls 2025-04-23 13:22:56 +02:00
Sam Atkins
658569b533 LibWeb/CSS: Use CSSRule's context to parse new child rules
Keep track of which CSSRule owns a CSSRuleList, and then use that to
produce a stack of RuleContexts for the CSS Parser to use.

There are certainly other places we should do this!
2025-04-23 10:55:45 +01:00
Sam Atkins
763b1b0ee2 LibWeb/CSS: Move RuleContext type out of Parser.h
This was previously internal to the Parser, but we'd like to pass it in
from outside.
2025-04-23 10:55:45 +01:00
Sam Atkins
9465492edf LibWeb/CSS: Combine the CSSRuleList constructors 2025-04-23 10:55:45 +01:00
Sam Atkins
3d1665cc80 LibWeb/CSS: Parse nested declarations in insert_a_css_rule()
The spec algorithm changed at some point to support nested declarations,
but I only just noticed. The subtest regression is one we were passing
incorrectly.
2025-04-23 10:55:45 +01:00
Sam Atkins
fa8bbfa6a5 LibWeb/CSS: Align declaration block parsing with the spec
We have two different code paths that implement the "parse a CSS
declaration block" algorithm, for properties and descriptors. COmbining
them isn't straightforward, and doesn't seem especially useful.
2025-04-23 10:55:45 +01:00
Tim Ledbetter
8a20899382 LibWeb: Canonicalize color space when parsing color-mix() function
This amounts to replacing the "xyz" color space with "xyz-d65".
2025-04-23 11:26:27 +02:00
Gingeh
7b8af4d84c LibWeb: Remove a popover AD-HOC comment after spec update
See https://github.com/whatwg/html/pull/11197
2025-04-23 10:13:29 +01:00
Tim Ledbetter
04d7228c51 LibWeb: Implement interpolation of repeatable lists 2025-04-23 09:13:45 +01:00
Tim Ledbetter
0beb22f19e LibWeb: Implement interpolation of edge values 2025-04-23 09:13:45 +01:00
Shannon Booth
f1d79483b7 LibWeb/HTML: Only trim single '#' on Location.hash setter 2025-04-23 08:24:29 +01:00
Shannon Booth
d01ee20b67 LibWeb/HTML: Update spec comments for location hash setter
Corresponds to open merge request in HTML spec of whatwg/html#11245
and a WPT test change of web-platform-tests/wpt#52085.
2025-04-23 08:24:29 +01:00
Shannon Booth
03c487eb56 LibWeb/HTML: Implement remaining Location setters 2025-04-23 08:24:29 +01:00
Shannon Booth
8ba6c7330d LibWeb/HTML: Adjust some comments in Location implementation
To closer resemble the style of other places in the code base.
2025-04-23 08:24:29 +01:00
Glenn Skrzypczak
d4076ec9fa LibWeb/HTML: Signal a type change
Type changes are now signaled to radio buttons. This causes other radio
buttons in the group to be unchecked if the input element is a checked
radio button after the type change.
2025-04-23 07:20:02 +01:00
Glenn Skrzypczak
5f75558646 LibWeb/HTML: Correctly reset selection on type change
The selection now gets reset to the beginning of the control if the
type changes from an unselectable type to a selectable type.
2025-04-23 07:20:02 +01:00
Jonne Ransijn
e5d89c72a6 LibWeb: Remove unuses variable in PaintableBox.cpp 2025-04-22 21:19:31 -06:00
Andreas Kling
42f72bbdce Revert "LibWeb: Turn Window.scroll(0, 0) into a no-op when possible"
This reverts commit 9840a8c750.

Regressed a number of CSS transitions tests in WPT.
2025-04-22 19:28:06 +02:00
Shannon Booth
e124ef52ee LibJS+LibWeb: Set [[CanBlock]] false to Agent for window agent
similar-origin window agents have the [[CanBlock]] flag set to false.
Achieve this by hooking up JS's concept with an agent to HTML::Agent.
For now, this is only hooked up to the similar-origin window agent
case but should be extended to the other agent types in the future.
2025-04-22 11:50:35 -04:00
Timothy Flynn
4cd186f3f5 LibWeb: Adjust the scroll offset when the scrollbar gutter is clicked
This allows clicking on the scrollbar gutter to scroll to the offset
indicated by the mouse position.
2025-04-22 11:29:06 -04:00
Timothy Flynn
a135ce528e LibWeb: Move adjustmust of scrollbar offset into compute_scrollbar_data
Currently, compute_scrollbar_data does not adjust the position of the
scrollbar thumb based on the actual scroll offset. This is because we
perform this offset in most cases inside the display list executor, in
order to allow us to avoid recomputing the display list.

However, there are cases where we do want the thumb rect with an offset
inside PaintableBox. We currently use scroll_thumb_rect to perform that
computation.

In an upcoming patch, we will need both this offset thumb rect and the
scrollbar gutter rect. So this patch moves the computation of the offset
to compute_scrollbar_data, performed behind an optional parameter.
2025-04-22 11:29:06 -04:00