Jamie Mansfield
be08abbf8a
LibWeb: Remove is_media_feature_name function
...
This was made redundant in GH-12971 (SerenityOS), and removing it drops
a FIXME :^)
See:
- https://github.com/SerenityOS/serenity/pull/12971
2024-06-22 14:57:47 +02:00
Ali Mohammad Pur
8c9d3b30cf
LibWeb/CSS: Avoid capturing structured binding in generic lambda
...
Apple Clang doesn't like this, rather than waiting for their version of
random-clang-commit-to-call-a-release to catch up with llvm trunk, just
work around the issue.
Fixes #186 .
2024-06-19 12:46:27 +02:00
Luke Warlow
099b77d60f
LibWeb: Add motion preference
...
This adds a motion preference to the browser UI similar to the existing
ones for color scheme and contrast.
Both AppKit UI and Qt UI has this new preference.
The auto value is currently the same as NoPreference, follow-ups can
address wiring that up to the actual preference for the OS.
2024-06-18 10:31:54 -04:00
Timothy Flynn
06ed0dfcc1
LibWeb: Run clang-format
...
We mistakenly did not add the clang-format linter to the new repo's CI,
and some unformatted code made its way into the repo.
2024-06-16 15:30:28 -04:00
Daniel Bertalan
bf1f631f25
Everywhere: Write dtors for types with incomplete members out-of-line
...
These are rejected by Clang (19) trunk as a result of
https://github.com/llvm/llvm-project/pull/77753 .
2024-06-16 07:19:56 -04:00
Matthew Olsson
7950992fc2
LibWeb: Remove TimingFunction in favor of EasingStyleValue::Function
...
Now that EasingStyleValue is a lot nicer to use, there isn't much reason
to keep TimingFunction around.
2024-06-16 07:12:46 +02:00
Matthew Olsson
667e313731
LibWeb: Parse easing values manually
...
The values aren't that complex, so it doesn't make much sense to have a
dedicated generator for them. Parsing them manually also allows us to
have much more control over the produced values, so as a result of this
change, EasingStyleValue becomes much more ergonomic.
2024-06-16 07:12:46 +02:00
Andreas Kling
f7a83e5755
LibWeb: Improve FIXME message about getComputedStyle() properties
...
Let's log which property we're trying to look up, since that's the most
interesting part!
2024-06-14 20:45:37 +02:00
Andreas Kling
4c94202e97
LibWeb: Remove unnecessary FIXME marker for CSSStyleDeclaration.cssFloat
2024-06-14 20:45:37 +02:00
Andreas Kling
19fa630fa7
LibWeb: Make CSSKeyframeRule.parentRule actually point to parent rule
2024-06-14 20:45:37 +02:00
Andreas Kling
7f2c833a39
LibWeb: Implement CSSKeyframesRule.cssRuleList
...
To make this straightforward, CSSKeyframesRule now uses a CSSRuleList
for internal storage.
2024-06-14 20:45:37 +02:00
Andreas Kling
a12d28fd30
LibWeb: Implement CSSStyleDeclaration.parentRule
...
This readonly attribute returns the containing CSS rule, or null (in the
case of element inline style).
2024-06-14 20:45:37 +02:00
Luke Warlow
ee64684565
LibWeb: Add Contrast preference
2024-06-13 11:18:38 +02:00
Jamie Mansfield
bbd82265e1
LibWeb/CSS: Implement FontFaceSet.onloadingerror
2024-06-07 19:30:35 +02:00
Jamie Mansfield
e56e09b820
LibWeb/CSS: Implement FontFaceSet.onloadingdone
2024-06-07 19:30:35 +02:00
Jamie Mansfield
4210586730
LibWeb/CSS: Implement FontFaceSet.onloading
2024-06-07 19:30:35 +02:00
Jamie Mansfield
c6a6a7c4f0
LibWeb/CSS: FontFaceSet extends EventTarget
2024-06-07 19:30:35 +02:00
Jamie Mansfield
839dc01280
LibWeb/CSS: Stub FontFaceSet.check
2024-06-07 19:30:35 +02:00
Andreas Kling
254d040ff4
LibGfx: Move Gfx::Painter::ScalingMode => Gfx::ScalingMode
...
This will allow users to avoid including Painter.h
2024-06-05 15:37:05 +02:00
Andreas Kling
d86f54da30
LibGfx: Remove Font::presentation_size()
...
This was a legacy version of point_size() that returned a u8.
2024-06-04 18:45:30 +02:00
Andreas Kling
1a2a34fa43
LibGfx: Remove Bitmap::glyph_spacing()
...
This was only ever non-zero for SerenityOS bitmap fonts.
2024-06-04 18:45:30 +02:00
Andreas Kling
04a6e2f83d
LibWeb: Remove Gfx::BitmapFont
...
This class supported the binary bitmap font file format in SerenityOS,
and isn't something we need in Ladybird.
2024-06-04 18:45:30 +02:00
Andreas Kling
fac126bce9
Ladybird+LibWeb: Stop using Gfx::FontDatabase default fonts
...
This closes the window at WebContent process startup where we were
relying on Gfx::FontDatabase having some resolvable value in its default
font query.
2024-06-04 18:45:30 +02:00
Matthew Olsson
e2cb25e35c
LibWeb: Support interpolation of mixed percentage dimension units
2024-06-02 15:12:17 +02:00
Tim Ledbetter
0b0ad5c9db
LibWeb: Calculate width property resolved value correctly
...
This means that relative width values are now correctly resolved when
calling `getComputedStyle()`.
2024-05-28 08:08:31 +02:00
Shannon Booth
97bf9e7953
LibWeb: Stub out Window-Management proposal extensions to Screen API
...
As defined in https://w3c.github.io/window-management
2024-05-27 17:24:51 -06:00
MacDue
517379ff80
LibWeb: Resolve basic-shape
clip-paths
...
These will be ignored within SVGs (for now SVGs only support <clipPath>
elements), but will allow clipping standard HTML elements.
2024-05-26 07:55:50 +02:00
MacDue
0135af6e60
Meta: Add basic-shape
as a CSS property value type
2024-05-26 07:55:50 +02:00
MacDue
120915048c
LibWeb: Parse the polygon()
basic shape function
2024-05-26 07:55:50 +02:00
MacDue
5f17d9b34a
LibWeb: Add BasicShapeStyleValue
to represent CSS basic shapes
...
See: https://www.w3.org/TR/css-shapes-1/#basic-shape-functions
This patch only implements the `polygon()` basic shape (with the rest
left as FIXMEs).
2024-05-26 07:55:50 +02:00
Matthew Olsson
a8ef84f8c3
LibWeb: Use LengthPercentage for calc values in Transformation matrix
2024-05-25 22:19:47 +02:00
Andrew Kaster
bab546472e
LibWeb: Mark FontFaceSet as a setlike IDL interface
...
And implement more of the constructor logic.
2024-05-23 10:57:34 +02:00
Matthew Olsson
a98ad191c7
Userland: Add ESCAPING annotations to a bunch of places
...
This isn't comprehensive; just a result of a simple grep search.
2024-05-22 21:55:34 -06:00
Tim Ledbetter
68a1a78a1a
LibWeb: Use FIXME extended attribute where possible
2024-05-19 17:35:25 +02:00
Shannon Booth
4fe0cbcf85
LibWeb: Use 'FIXME' extended attribute where possible
...
This improves the debuggability of many live web pages :^)
2024-05-19 16:24:11 +02:00
Andrew Kaster
28f728dfdb
LibWeb: Implement FontFace.load() for url() based font sources
2024-05-16 08:02:43 +02:00
Andrew Kaster
b7526a39b0
LibWeb: Expose StyleComputer's FontLoader class publicly
...
We'll want to explicitly load fonts from FontFace and other Web APIs
in the future. A future refactor should also move this completely away
from StyleComputer and call it something like 'FontCache'.
2024-05-16 08:02:43 +02:00
Andrew Kaster
d76167b8a4
LibWeb: Add CSS ParsingContext constructor with a realm and URL
...
This is useful for when we want to parse paths relative to the current
ESO's api base url when there isn't a document, such as in a Worker
context.
2024-05-16 08:02:43 +02:00
MacDue
99579f1f5e
LibWeb: Use "valid-types" to define fill-rule
in Properties.json
...
No behaviour change.
2024-05-14 23:01:18 +01:00
MacDue
6c9069fa5d
LibWeb: Implement the SVG clip-rule
attribute
...
This controls the fill rule used when rasterizing `<clipPath>` elements.
2024-05-14 23:01:18 +01:00
Andrew Kaster
60b3436ea3
LibWeb: Support loading FontFaces constructed with binary data
2024-05-14 12:31:10 -06:00
Andrew Kaster
bd4f516e64
LibWeb: Stub out FontFaceSet.status and .ready attributes
...
WPT wants to check these properties before running ref tests.
This fixes a ton of crashes in our CI WPT runs.
2024-05-13 20:20:39 +00:00
Andrew Kaster
2bc51f08d9
LibWeb: Implement or stub FontFace interface's attribute getters/setters
...
We only support parsing half of these, so the ones we don't recognize
get a friendly exception thrown.
2024-05-11 07:30:29 +01:00
Andrew Kaster
de98c122d1
LibWeb: Move CSS unicode-ranges parsing code into a common helper
2024-05-11 07:30:29 +01:00
Andrew Kaster
e10721f1b5
LibWeb: Add stub implementation of FontFaceSet and Document.fonts
...
This is now enough for duolingo to load and use its fallback fonts.
2024-05-08 10:39:16 +02:00
Andrew Kaster
2c31d7dddc
LibWeb: Add stub implementation of CSS FontFace Web API
2024-05-08 10:39:16 +02:00
Andrew Kaster
3a5eabc43b
LibWeb: Rename CSS::FontFace to CSS::ParsedFontFace
...
This implementation detail of CSSFontFaceRule is hogging the name of a
Web API from CSS Font Loading Module Level 3.
2024-05-08 10:39:16 +02:00
Timothy Flynn
464d7d5858
LibGfx+LibWeb: Allow inexact size lookups when requesting scaled fonts
...
For bitmap fonts, we will often not have an exact match for requested
sizes. Return the closest match instead of a nullptr.
LibWeb is currently the only user of this API. If it needs to be
configurable in the future to only allow exact matches, we can add a
parameter or another method at that time.
2024-05-06 23:26:42 +00:00
Andreas Kling
493a04d5fe
LibJS: Add PropertyLookupPhase enum to distinguish Object [[Get]] calls
...
We can now tell the difference between an own property access and a
subsequent (automatic) prototype chain access.
This will be used to implement caching of prototype chain accesses.
2024-05-04 21:42:59 +02:00
Andreas Kling
3945e1a82a
LibJS: Make JS::Cell a Weakable
...
This makes things easier downstream of Cell, and is preparation for
using weak pointers in prototype chain property caches.
2024-05-04 21:42:59 +02:00