Aliaksandr Kalenik
3c6fdde466
LibWeb: Fix hit testing for fixed position nodes
...
Subtract the scroll offset translation from the position when checking
for intersection between boxes within fixed position nodes.
2023-07-15 19:57:17 +01:00
Shannon Booth
2b46e6f664
Everywhere: Update copyrights with my new serenityos.org e-mail :^)
2023-07-15 16:21:29 +02:00
Andreas Kling
2887976ce9
LibWeb: Fully resolve max-width values on inline-block elements
...
This fixes an issue where `max-width: fit-content` (and other
layout-dependent values) were treated as 0 on inline-blocks.
2023-07-15 12:30:07 +02:00
Kenneth Myhra
d4f729a6d3
LibWeb: Implement TransforStream's constructor
2023-07-15 11:59:39 +02:00
Kenneth Myhra
7117cb7a35
LibWeb: Add set_up_transform_stream_default_controller_from_transformer
2023-07-15 11:59:39 +02:00
Kenneth Myhra
f7c532d093
LibWeb: Add AO set_up_transform_stream_default_controller()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
86455bbb74
LibWeb: Add AO initialize_transform_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
a52f9970bc
LibWeb: Add AO create_readable_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
8e6b386ff7
LibWeb: Add AO initialize_readable_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
f91c150cfc
LibWeb: Add AO transform_stream_default_source_pull_algorithm()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
894f1e9d62
LibWeb: Add AO create_writable_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
7d8f24c227
LibWeb: Add AO initialize_writable_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
641b9edd89
LibWeb: Add AO transform_stream_default_sink_close_algorithm()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
48921add86
LibWeb: Add AO transform_stream_default_sink_abort_algorithm()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
18aa588968
LibWeb: Add AO transform_stream_default_sink_write_algorithm()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
11c0600729
LibWeb: Add AO transform_stream_default_controller_perform_transform()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
4d4fc53f5c
LibWeb: Implement TransformStreamDefaultController::terminate()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
e1740938fc
LibWeb: Add AO transform_stream_default_controller_terminate()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
4ae82983a4
LibWeb: Implement TransformStreamDefaultController::enqueue()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
e028918a64
LibWeb: Add AO transform_stream_default_controller_enqueue()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
d2236e5ca5
LibWeb: Add AO readable_stream_default_controller_has_backpressure()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
2d0a2756b4
LibWeb: Implement TransformStreamDefaultController::error()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
9efcc01387
LibWeb: Add AO transform_stream_default_controller_error()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
69fb6f15f9
LibWeb: Add AO transform_stream_error()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
ad73c03ea3
LibWeb: Add AO transform_stream_error_writable_and_unblock_write()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
91f58eb220
LibWeb: Add AO transform_stream_set_backpressure()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
d8d0e8a6ea
LibWeb: Add AO transform_stream_default_controller_clear_algorithms()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
0091a60448
LibWeb: Add TransformStreamDefaultController scaffolding
...
This adds the scaffolding of TransformStreamDefaultController so we can
start implementing the necessary abstract operations for it.
2023-07-15 11:59:39 +02:00
Kenneth Myhra
f1d69d789b
LibWeb: Add TransformStream scaffolding
...
This adds the scaffolding of TransformStream so we can start
implementing the necessary abstract operations for it.
2023-07-15 11:59:39 +02:00
Kenneth Myhra
12ff48047f
LibWeb: Add Transformer API
...
This adds the Transformer API which the TransformStream() constructor
accepts as its first argument.
2023-07-15 11:59:39 +02:00
Andreas Kling
3ec9fd0aae
LibWeb: Resolve calc() values in CSS transform
...
There are two parts to this fix:
- First, StyleProperties::transformations() would previously omit calc()
values entirely when returning the list of transformations. This was
very confusing to StackingContext which then tried to index into the
list based on faulty assumptions. Fix this by emitting calc values.
- Second, StackingContext::get_transformation_matrix() now always calls
resolve() on length-percentages. This takes care of actually resolving
calc() values. If no reference value for percentages is provided, we
default to 0px.
This stops LibWeb from asserting on websites with calc() in transform
values, such as https://qt.io/ :^)
2023-07-15 11:35:16 +02:00
Sam Atkins
8fc545992d
LibWeb: Use generated math-function-parsing code
2023-07-15 10:23:33 +02:00
Sam Atkins
618c0402a7
LibWeb: Generate parsing code for CSS math functions
2023-07-15 10:23:33 +02:00
Sam Atkins
780998b3d5
LibWeb: Add CSSNumericType::matches_dimension()
...
This isn't a spec algorithm, but is useful when type-checking parameters
to math functions.
2023-07-15 10:23:33 +02:00
Sam Atkins
136dc7a1c3
LibWeb: Extract CalculationNode::constant_type_from_string() function
...
This is needed by some upcoming generated code. Renamed "PI" member to
"Pi" while I was at it.
2023-07-15 10:23:33 +02:00
Sam Atkins
e4a2bd7a44
LibWeb: Move RoundingMode to Enums.json
...
In the spec this is a `<rounding-strategy>`, so let's use that name.
This also fixes a bug where we were serializing `to-zero` as
`toward-zero`.
2023-07-15 10:23:33 +02:00
Andreas Kling
3194f10ad0
LibWeb: Explicitly instantiate a CSS parser template function
...
We're gonna call parse_a_comma_separated_list_of_component_values from
another cpp file soon, so let's prepare for that by instantiating the
specific version we need.
2023-07-15 10:23:33 +02:00
Shannon Booth
5625ca5cb9
AK: Rename URLParser::parse to URLParser::basic_parse
...
To make it more clear that this function implements
'concept-basic-url-parser' instead of 'concept-url-parser'.
2023-07-15 09:45:16 +02:00
Shannon Booth
6fecd8cc44
LibWeb: Add interface for 'concept-url-parser'
...
This does not implement extra functionality on top of the basic parser,
but allows multiple places in LibWeb to call the 'correct' interface for
when it is fully implemented.
2023-07-15 09:45:16 +02:00
Andreas Kling
2d6c1bbf88
LibWeb: Paint relatively positioned inline-level elements
...
Since we deliberately skip positioned elements in paint_descendants(),
we have to make sure we actually paint them in the subsequent
paint_internal() pass.
Before this change, we were only painting positioned elements whose
paintable was a PaintableBox, neglecting inline-level relpos elements.
2023-07-15 07:10:34 +02:00
Andreas Kling
268492413a
LibWeb: Add Paintable::stacking_context_rooted_here()
...
This is a convenience helper that lets you get the stacking context
rooted at a given paintable, without checking that the paintable is a
box first.
2023-07-15 07:10:34 +02:00
Aliaksandr Kalenik
2138c164c9
LibWeb: Respect justify-items property of grid container
2023-07-15 05:50:51 +02:00
Aliaksandr Kalenik
f060f89220
LibWeb: Add support for justify-items property in CSS parser
2023-07-15 05:50:51 +02:00
Aliaksandr Kalenik
e4e1208050
LibWeb: Respect justify-self property of grid items
2023-07-14 15:48:58 +02:00
Aliaksandr Kalenik
fedbb39e9e
LibWeb: Add support for justify-self property in CSS parser
2023-07-14 15:48:58 +02:00
Aliaksandr Kalenik
6b191ab73d
LibJS+LibWeb: Add fast_is<DOM::Node> for JS::Object
...
Solves problem that is<DOM::Node, JS::Object>() is quite hot in
profiles while loading https://www.postgresql.org/about/featurematrix/ .
2023-07-14 05:55:41 +02:00
Andreas Kling
1470e60800
LibWeb: Add logical CSS properties for insets
...
This patch adds the following properties:
- inset-inline
- inset-inline-start
- inset-inline-end
- inset-block
- inset-block-start
- inset-block-end
2023-07-14 05:55:32 +02:00
Aliaksandr Kalenik
cf47e130ae
LibWeb: Print FIXME instead of crashing if fill is url() in svg text
2023-07-13 18:43:21 +02:00
Aliaksandr Kalenik
ca50da63e4
LibWeb: Do not crash if "fill: none" is specified for svg text
2023-07-13 18:43:21 +02:00
Aliaksandr Kalenik
e2c5e31292
LibWeb: Adjust grid columns size to fit spanning items
...
This change implements following paragraph from placement algorithm in
the spec:
"If the largest column span among all the items without a definite
column position is larger than the width of the implicit grid, add
columns to the end of the implicit grid to accommodate that column
span."
There were places in the grid implementation code with copies of this
text, but those were completely unrelated to the code where they were
being pasted so I removed them.
2023-07-13 16:54:53 +02:00