summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS
AgeCommit message (Collapse)Author
2023-02-20LibWeb: Replace `RefPtr` with `ValueComparingRefPtr` in StyleValueMacDue
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-19LibTextCodec+Everywhere: Port Decoders to new StringsSam Atkins
2023-02-19LibTextCodec+Everywhere: Return Optional<Decoder&> from `decoder_for()`Sam Atkins
2023-02-19LibWeb: Port StyleComputer to new StringsSam Atkins
2023-02-19LibWeb: Port FontCache to new StringsSam Atkins
2023-02-19LibWeb: Store stylesheet sources as StringViewsSam Atkins
2023-02-19LibWeb: Port Selector to new StringsSam Atkins
Also use `Infra::is_ascii_case_insensitive_match()` in some appropriate places, after checking the specs.
2023-02-19LibWeb: Port FontFace to new StringsSam Atkins
2023-02-19LibWeb: Port GeneralEnclosed to new StringsSam Atkins
2023-02-19LibWeb: Use is_ascii_case_insensitive_match() where the spec says toSam Atkins
2023-02-18LibWeb: Make factory method of CSS::ResolvedCSSStyleDeclaration fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::StyleSheetList fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::Screen fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::MediaQueryListEvent fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::CSSSupportsRule fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::MediaQueryList fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::MediaList fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::CSSStyleSheet fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::CSSStyleRule fallibleKenneth Myhra
2023-02-18LibWeb: Make factory methods of CSS::CSSStyleDeclaration fallibleKenneth Myhra
2023-02-18LibWeb: Make factory methods of CSS::CSSRuleList fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::CSSMediaRule fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::CSSImportRule fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of CSS::CSSFontFaceRule fallibleKenneth Myhra
2023-02-17LibWeb: Always move (Nonnull)RefPtr parameters into StyleValuesMacDue
This is done for consistency rather than any performance concerns.
2023-02-17LibWeb: Use default equality operators for StyleValuesMacDue
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-17LibWeb: Use default equality operators for StyleValue helper structsMacDue
Co-authored-by: kleines Filmröllchen <filmroellchen@serenityos.org>
2023-02-17AK+LibWeb: Implement Variant equality operatorkleines Filmröllchen
And make use of it for CSS StyleValues.
2023-02-15LibWeb: Port CSS/Serialize.{h,cpp} to new Strings, and propagate errorsSam Atkins
2023-02-15LibWeb: Port CSS::MediaQuery to new StringsSam Atkins
2023-02-15LibWeb: Port CSS::Supports to new StringsSam Atkins
2023-02-15LibWeb: Port CSS::UnicodeRange to new StringsSam Atkins
2023-02-15LibWeb: Use StringView in CSS::PreferredColorSchemeSam Atkins
This doesn't need to hold the string data.
2023-02-15LibWeb: Port CSS::Display to new StringsSam Atkins
2023-02-15LibWeb: Port CSS::Parser::Rule to new StringsSam Atkins
`Rule::to_deprecated_string()` and `DeclarationOrAtRule::to_deprecated_string()` are not used anywhere, so we can just delete them.
2023-02-15LibWeb: Port CSS::Parser::Declaration to new StringsSam Atkins
2023-02-15LibWeb: Port CSS::Parser::ComponentValue to new StringsSam Atkins
2023-02-15LibWeb: Port CSS::Parser::Function to new StringsSam Atkins
2023-02-15LibWeb: Port CSS::Parser::Block to new StringsSam Atkins
2023-02-15LibWeb: Port ComputedValues to new StringsSam Atkins
2023-02-15LibWeb: Remove unused includes for DeprecatedStringSam Atkins
Missed these before, oops.
2023-02-15LibWeb: Port CSS Tokenizer to new StringsSam Atkins
Specifically, this uses FlyString, because the data gets held long-term as a FlyString anyway.
2023-02-15AK+Tests+LibWeb: Make `URL::complete_url()` take a StringViewSam Atkins
All it does is pass this to `URLParser::parse()` which takes a StringView, so we might as well take one here too.
2023-02-15LibWeb: Construct CSS Tokenizer and Parser with a StringView encodingSam Atkins
This doesn't need to be a full (Deprecated)String, so let's not force it to be.
2023-02-13LibWeb: Convert CSS Token::to_debug_string() to ::to_string() :^)Sam Atkins
Using from_utf8_short_string() for all cases that are <= 3 bytes long. Which is almost all of the static ones.
2023-02-13LibWeb: Convert CSS Token/ComponentValue::to_debug_string() to StringSam Atkins
These are only used for debugging, so I've decided that logging the ErrorOr<String> itself is fine instead of trying to handle that error more gracefully in those cases. If you're getting OOM trying to debug log things, you have bigger problems.
2023-02-13LibWeb: Convert CSS Token value to new FlyStringSam Atkins
2023-02-13LibWeb: Return StringViews from CSS Token bracket-string gettersSam Atkins
These don't need to be full Strings, so let's be lightweight.
2023-02-12LibWeb: Re-implement checkbox painting using the UA stylesheetLinus Groh
The checkbox provided by ClassicStylePainter is not scaling-aware and generally unflexible, instead use the UA default stylesheet with a handful of properties, the same way we already style buttons and text inputs. Thanks to Xexxa for the nice checkmark image! Co-Authored-By: Xexxa <93391300+Xexxa@users.noreply.github.com>
2023-02-08Everywhere: Use ReadonlySpan<T> instead of Span<T const>MacDue