summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Angle.h
AgeCommit message (Collapse)Author
2023-04-13LibWeb: Expose type and raw values of basic CSS typesSam Atkins
This makes it possible to do arithmetic on them without having to resolve to their canonical unit, which often requires context information that is not available until the last minute. For example, a Length cannot be resolved to px without knowing the font size, parent element's size, etc. Only Length currently requires such context, but treating all these types the same means that code that manipulates them does not need to know or care if a new unit gets added that does require contextual information.
2023-03-30LibWeb: Remove CalculatedStyleValue from AngleSam Atkins
...and replace it with AngleOrCalculated. This has the nice bonus effect of actually handling `calc()` for angles in a transform function. :^) (Previously we just would have asserted.)
2023-01-09LibWeb+WebContent: Use new String class in CSS::StyleValuemartinfalisse
Converts uses of DeprecatedString to String in StyleValue, and patches surrounding files that depend on these functions.
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
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-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
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-11-06Everywhere: Remove redundant inequality comparison operatorsDaniel Bertalan
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-07-27LibWeb: Ensure PercentageOr<T>::resolved() returns a concrete TSam Atkins
Which is to say, a T where `is_calculated()` is false. As is becoming a repeating theme with CSS types, we have two states for a FooPercentage that is a `calc()` expression: Either the FooPercentage holds the CalculatedStyleValue directly, or it holds a Foo which itself holds the CalculatedStyleValue. The first case was already handled to return Foo, and with this patch, the second is too. :^)
2022-07-27LibWeb: Add missing Formatters for CSS dimension typesSam Atkins
2022-02-24LibWeb: Implement CSS Angle classSam Atkins
This corresponds to `<angle>` in the grammar.