Commit graph

23 commits

Author SHA1 Message Date
huwdp
ec43f7a2b0 LibWeb: Add initial version of pointer-events CSS property 2021-10-09 14:48:30 +01:00
Andreas Kling
85a0772147 LibWeb: Start work towards modern CSS "display" values
Until now, we've internally thought of the CSS "display" property as a
single-value property. In practice, "display" is a much more complex
property that comes in a number of configurations.

The most interesting one is the two-part format that describes the
outside and inside behavior of a box. Switching our own internal
representation towards this model will allow for much cleaner
abstractions around layout and the various formatting contexts.

Note that we don't *parse* two-part "display" yet, this is only about
changing the internal representation of the property.

Spec: https://drafts.csswg.org/css-display
2021-10-06 19:12:52 +02:00
Sam Atkins
fc7af21c7c LibWeb: Make things aware of box-sizing
Of course, we don't actually *use* the box-sizing property yet, but the
value is applied and shows up in the computed style.
2021-10-05 18:49:47 +02:00
Tobias Christiansen
9ebfafafbe LibWeb: Add transform property to the system
This patch adds parsing support as well as all the needed stuctures all
over LibWeb to pass Transformations around.
2021-09-18 21:53:37 +02:00
Andreas Kling
e2e6c12ea0 LibWeb: Make ComputedValues return larger items by const reference 2021-09-17 13:20:18 +02:00
Tobias Christiansen
f8ea730f29 LibWeb: Flexbox: Add default value for AlignItems
Previously there was no default value and wrapping broke when the
container didn't have a align-items specified.
2021-09-16 22:51:15 +02:00
Sam Atkins
3964b81d2b LibWeb: Add for CSS fill/stroke/stroke-color properties for SVG
In the spec, `fill` and `stroke` are supposed to be a shorthands for
various properties. But since the spec is still a working draft, and
neither Firefox or Chrome support the `fill-color` or `stroke-color`
properties, we'll stick with `fill` and `stroke` as simple colors for
now.

Also, note that SVG expects things in "user units", and we are assuming
that 1px = 1 user unit for now.
2021-09-16 22:30:33 +02:00
Tobias Christiansen
307f90b675 LibWeb: Add proper parsing of the AlignItems property
This teaches all the relevant places about 'align-items'.
2021-09-15 22:28:28 +02:00
Tobias Christiansen
833936f3ec LibWeb: Add auto as a recognized argument of flex-basis
There isn't actually any special treatment of this over 'content' in
the FlexFormattingContext, for now both are treated the same.
This fixes #9225
2021-08-07 15:21:34 +02:00
Tobias Christiansen
f1bdaafcf6 LibWeb: Make box-shadow known throughout the CSS subsystem
This patch spreads box-shadows around:
- The Values important to box-shadows are stored in a BoxShadowData
  struct
- StyleProperties knows how to construct such a struct from a
  BoxShadowStyleValue and a Node knows how to ask for it
- CalculatedValues contain BoxShadowData and expose them
2021-07-24 22:16:48 +02:00
Egor Ananyin
0e6ba6e1d3 LibWeb: Parse and store the opacity property 2021-07-24 22:02:28 +04:30
Tobias Christiansen
80a44c3891 LibWeb: Add parsing for the justify-content property 2021-07-19 18:47:09 +04:30
Tobias Christiansen
ae61e9ded2 LibWeb: Add flex-grow and flex-shrink
They get parsed and are available to the programmer of Layouts :^)
2021-06-06 01:46:06 +04:30
Tobias Christiansen
ae3e6510d6 LibWeb: Parse flex-basis
Flex-basis accepts either 'content' or a Length.
2021-06-06 01:46:06 +04:30
Tobias Christiansen
e6545d5259 LibWeb: Add parsing for flex-wrap property 2021-06-06 01:46:06 +04:30
Tobias Christiansen
499934a848 LibWeb: Make border-radius attibutes accessible 2021-05-20 22:08:02 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Timothy Flynn
5de0e0068c LibWeb: Support two-value background-repeat
The background-repeat value may be specified as either one- or two-value
identifiers (to be interpreted as horizontal and vertical repeat). This
adds two pseudo-properties, background-repeat-x and background-repeat-y,
to handle this. One-value identifiers are mapped to two-value in
accordance with the spec.
2021-04-05 18:49:04 +02:00
Timothy Flynn
bd5a91269f LibWeb: Store computed CSS value of background-repeat 2021-04-03 11:24:33 +02:00
Adam Hodgen
e169e24104 LibWeb: Parese the CSS "cursor" property 2021-02-28 18:19:52 +01:00
Andreas Kling
21371bf6ee LibWeb: Add parsing and application of CSS "overflow" property
We don't actually do anything with the values yet, but now they are
available for layout nodes once we are ready to implement them.
2021-02-22 15:21:42 +01:00
Andreas Kling
149f10b0b9 LibWeb: Parse the CSS "flex-direction" property 2021-01-18 20:20:16 +01:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Renamed from Libraries/LibWeb/CSS/ComputedValues.h (Browse further)