Commit Graph

10 Commits

Author SHA1 Message Date
Annya
265c942698 LibWeb/CSS: Implement revert-layer
With the introduction of the cascade layer, the 5th CSS-wide keyword,
`revert-layer`, has been added.

(cherry picked from commit bea7eec5183a816a100d190e409a622f429d7405)
2024-10-31 21:51:50 -04:00
Nico Weber
6f09a68baf LibWeb: Parse stroke-{linejoin,miterlimit} attributes
Similar to LadybirdBrowser/ladybird#1714.

We don't implement the linejoin values `miter-clip` and `arcs`, because
according to the SVG 2 spec:

> The values miter-clip and arcs of the stroke-linejoin property are at
> risk. There are no known browser implementations. See issue Github
> issue w3c/svgwg#592.

Nothing uses this yet. The next step is to change
SVGPathPaintable::paint() to read `graphics_element.stroke_linejoin()`
and `graphics_element.stroke_miterlimit()` when painting.

(cherry picked from commit 421cf8d9bf276cff61acdc32dc55d978d37fb671;
amended to resolve conflict on `height:` in
getComputedStyle-print-all.txt)
2024-10-29 21:42:09 -04:00
Kostya Farber
0b90c18afb LibWeb: Parse the word-break css property
(cherry picked from commit 44b1c4f2b59563cf29f6af81bb86645f2fa89155)
2024-10-27 20:06:44 -04:00
Sam Atkins
f8a66c346e LibWeb/CSS: Parse and propagate font-feature-settings property
(cherry picked from commit 95c17dfab51fefdd5ca364652e8571827d9693b1)
2024-10-26 09:29:16 -04:00
Sam Atkins
85b5d7b93e LibWeb/CSS: Parse font-display descriptor
(cherry picked from commit 3eb6d510fd0c7d4b6b21b64ac36a06571ea1fd9f)
2024-10-21 09:36:47 -04:00
Sam Atkins
8b35708f83 LibWeb/CSS: Sort Keywords.json
(cherry picked from commit 19cb3d4c819ace6313ffc3b6bf93902a1886de12)
2024-10-21 09:36:47 -04:00
Nico Weber
052f35da64 LibWeb: Add stroke-linecap attribute and plumb it to SVGGraphicsElement
SVGGraphicsElement then goes ahead and does nothing with it for now.

(cherry picked from commit cc0cfd044b3a04c021f8810f7e96d98a05f7146a;
amended to fix minor conflict in getComputedStyle-print-all.txt)
2024-10-14 22:34:19 -04:00
Khaled Lakehal
cc4ba18bed LibWeb/CSS: Add support for unicode-bidi property
(cherry picked from commit 77761e123d61ff792efe78a06ca863925a1f5f98)
2024-10-11 09:27:42 -04:00
Sam Atkins
4a26c03240 LibWeb: Use CSSKeywordValue for CSS-wide keywords
We previously had 4 single-instance StyleValues for these keywords.
CSS-Typed-OM expects them keywords to be exposed as CSSKeywordValue, so
it's simpler to treat them the same. The single-instance behaviour is
kept by having StyleValue::create() use a cached instance for each of
these.

(cherry picked from commit f518811f73539b5ca6631084001d8f517ea292be)
2024-10-10 10:08:59 -04:00
Sam Atkins
0a3b33e6f6 LibWeb: Rename "identifier" and "ValueID" to "Keyword" where correct
For a long time, we've used two terms, inconsistently:
- "Identifier" is a spec term, but refers to a sequence of alphanumeric
  characters, which may or may not be a keyword. (Keywords are a
  subset of all identifiers.)
- "ValueID" is entirely non-spec, and is directly called a "keyword" in
  the CSS specs.

So to avoid confusion as much as possible, let's align with the spec
terminology. I've attempted to change variable names as well, but
obviously we use Keywords in a lot of places in LibWeb and so I may
have missed some.

One exception is that I've not renamed "valid-identifiers" in
Properties.json... I'd like to combine that and the "valid-types" array
together eventually, so there's no benefit to doing an extra rename
now.

(cherry picked from commit 6a74b0164423d63904cf5a5b594772b595f57600;
very minorly amended to fix conflict in GenerateCSSKeyword.cpp caused
by #22870, and in libweb_generators.cmake due to us not having
https://github.com/LadybirdBrowser/ladybird/pull/741)
2024-10-10 10:08:59 -04:00