Sam Atkins
486ef3df7f
LibWeb: Split GridTrackPlacementStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
402845fe00
LibWeb: Split GridTrackPlacementShorthandStyleValue out of StyleValue
2023-03-25 16:56:04 +00:00
Sam Atkins
675cb3b9da
LibWeb: Split GridAreaShorthandStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
4dc99e49a1
LibWeb: Split GridTemplateAreaStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
015885f068
LibWeb: Split FrequencyStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
87f920a299
LibWeb: Split FontStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
e24679f870
LibWeb: Split FlexFlowStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
273b9b4ca1
LibWeb: Split FlexStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
89ed8e59f9
LibWeb: Split FilterValueListStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
9436b7de83
LibWeb: Split ContentStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
77b2826402
LibWeb: Split ColorStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
66bc816284
LibWeb: Split BorderRadiusStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
25114c159d
LibWeb: Split BorderRadiusShorthandStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
1c03bc7a6f
LibWeb: Split BorderStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
9d5296889f
LibWeb: Split BackgroundSizeStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
52cd0b2f47
LibWeb: Split BackgroundRepeatStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
92a0d4c0af
LibWeb: Split BackgroundStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Sam Atkins
777d3e73f9
LibWeb: Split AngleStyleValue out of StyleValue.{h,cpp}
2023-03-25 16:56:04 +00:00
Simon Wanner
554c4af90f
LibWeb: Add support for the lh and rlh length units
...
Resolving these units is somewhat tricky because of their interaction
with both font-size and line-height, but this implementation seems to
work as tested in http://wpt.live/css/css-values/lh-unit-001.html and
http://wpt.live/css/css-values/lh-unit-002.html
2023-03-18 20:14:52 +01:00
Andreas Kling
21db2b7b90
Everywhere: Remove NonnullOwnPtr.h includes
2023-03-06 23:46:35 +01:00
Andreas Kling
359d6e7b0b
Everywhere: Stop using NonnullOwnPtrVector
...
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
2023-03-06 23:46:35 +01:00
Andreas Kling
689ca370d4
Everywhere: Remove NonnullRefPtr.h includes
2023-03-06 23:46:35 +01:00
Andreas Kling
4c75d4af28
LibWeb: Stop using NonnullRefPtrVector for StyleValueVector
2023-03-06 23:46:35 +01:00
Linus Groh
09d40bfbb2
Everywhere: Use _{short_,}string to create Strings from literals
2023-02-25 20:51:49 +01:00
Andreas Kling
f11899f885
LibWeb+LibIDL: Fix (or paper over) various const-correctness issues
...
There's definitely stuff to iterate on here, but this takes care of
making the libraries compile with stricter RP and NNRP.
2023-02-21 00:54:04 +01:00
MacDue
3676f5085e
LibWeb: Replace RefPtr
with ValueComparingRefPtr
in StyleValue
...
Like the name suggests this pointer type compares its pointees by value
rather than just by the pointer. This is needed for the defaulted
struct Properties equality operator.
This commit also contains a few changes to StyleValue such as replacing
the operator==()s with a .equals() again. This is done to avoid the new
reversed operator==()s ambiguity in C++20.
2023-02-20 10:50:20 +01:00
MacDue
e2691fcdf2
LibWeb: Always move (Nonnull)RefPtr parameters into StyleValues
...
This is done for consistency rather than any performance concerns.
2023-02-17 16:22:56 +00:00
MacDue
ac3af6624b
LibWeb: Use default equality operators for StyleValues
...
This removes a load of manually implemented equality operators. This
is done with a little pattern where all properties of a StyleValue are
placed inside a Properties member struct, with a defaulted equality
operator. This is then used to do the actual StyleValue compare.
There is also a CTRP class to avoid manually implementing the virtual
operator==()s for all StyleValues.
2023-02-17 16:22:56 +00:00
MacDue
9337892ce0
LibWeb: Use default equality operators for StyleValue helper structs
...
Co-authored-by: kleines Filmröllchen <filmroellchen@serenityos.org>
2023-02-17 16:22:56 +00:00
Aliaksandr Kalenik
ab99e95549
LibWeb: Parse font-stretch CSS property
2023-02-03 12:49:13 +00:00
Sam Atkins
7891ad2a28
LibWeb: Remove declarations for non-existent methods
2023-01-27 20:33:18 +00:00
martinfalisse
9bc001f410
LibWeb: Parse grid-area
CSS property
2023-01-21 14:35:00 +01:00
martinfalisse
a6548c4d80
LibWeb: Parse grid-template-areas
CSS property
2023-01-21 14:35:00 +01:00
MacDue
0c688fa117
LibWeb: Remove some unnecessary .release_value()s in StyleValue
...
And instead propagate these errors.
Also while here add my copyright (I've touched these files a lot)
2023-01-14 12:37:00 +01:00
martinfalisse
ce0f41b9fb
LibWeb+WebContent: Use new String class in CSS::StyleValue
...
Converts uses of DeprecatedString to String in StyleValue, and patches
surrounding files that depend on these functions.
2023-01-09 11:09:31 +01:00
Sam Atkins
4084c66ad2
LibWeb: Use CSS Pixels for viewport rects
2023-01-05 17:42:31 +01:00
Sam Atkins
7d40e3eb0d
LibWeb: Replace all px Length creation with Length::make_px(CSSPixels)
2023-01-05 17:42:31 +01:00
Sam Atkins
13b1952929
LibWeb: Convert AbstractImageStyleValue to new pixel units
2023-01-05 17:42:31 +01:00
Nico Weber
0a3cc10bb6
Everywhere: Remove some redundant inline
keywords
...
Functions defined inside class bodies (including static functions)
are implicitly inline, no need to type it out.
2023-01-04 20:04:57 +01:00
MacDue
1574f2c3f6
Meta+Userland: Pass Gfx::FloatSize by value
...
Just two floats like Gfx::FloatPoint.
2022-12-07 11:48:27 +01:00
MacDue
bbc149ebb9
Meta+Userland: Pass Gfx::Color by value
...
Gfx::Color is always 4 bytes (it's just a wrapper over u32) it's less
work just to pass the color directly.
This also updates IPCCompiler to prevent from generating
Gfx::Color const &, which makes replacement easier.
2022-12-07 11:48:27 +01:00
Linus Groh
57dc179b1f
Everywhere: Rename to_{string => deprecated_string}() where applicable
...
This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.
One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
2022-12-06 08:54:33 +01:00
Linus Groh
6e19ab2bbc
AK+Everywhere: Rename String to DeprecatedString
...
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
MacDue
28028be2fc
LibWeb: Support repeating-radial-gradient()
s
2022-12-03 09:06:51 -05:00
MacDue
476acae04f
LibWeb: Paint radial-gradient()
s
...
This almost looks too easy now :^), but it's just another way to sample
the gradient line.
2022-11-30 14:24:04 +00:00
MacDue
040dac558e
LibWeb: Implement RadialGradientStyleValue
...
Adds a style value for `radial-gradient()`s and implements some helpers
for resolving their properties.
2022-11-30 14:24:04 +00:00
Moustafa Raafat
6ff9a88c3b
LibWeb: Support animated backgrounds
2022-11-13 16:53:22 -07:00
MacDue
2c2b9fb1d7
LibWeb: Parse repeating-conic-gradient()
s
2022-11-07 13:13:22 +00:00
Daniel Bertalan
4296425bd8
Everywhere: Remove redundant inequality comparison operators
...
C++20 can automatically synthesize `operator!=` from `operator==`, so
there is no point in writing such functions by hand if all they do is
call through to `operator==`.
This fixes a compile error with compilers that implement P2468 (Clang
16 currently). This paper restores the C++17 behavior that if both
`T::operator==(U)` and `T::operator!=(U)` exist, `U == T` won't be
rewritten in reverse to call `T::operator==(U)`. Removing `!=` operators
makes the rewriting possible again.
See https://reviews.llvm.org/D134529#3853062
2022-11-06 10:25:08 -07:00
MacDue
fdcc73d4b1
LibWeb: Paint conic-gradient()
s
...
This is a first pass at painting conic-gradient()s, I've yet to try to
optimize this much, but I feel like you could do better than atan2
in a loop.
2022-11-01 23:07:05 +00:00