Sam Atkins
2db168acc1
LibTextCodec+Everywhere: Port Decoders to new Strings
2023-02-19 17:15:47 +01:00
Sam Atkins
f2a9426885
LibTextCodec+Everywhere: Return Optional<Decoder&> from decoder_for()
2023-02-19 17:15:47 +01:00
Sam Atkins
6cc5e09c71
LibWeb: Port StyleComputer to new Strings
2023-02-19 00:51:16 +01:00
Sam Atkins
1c77867c78
LibWeb: Port FontCache to new Strings
2023-02-19 00:51:16 +01:00
Sam Atkins
faab2fe101
LibWeb: Store stylesheet sources as StringViews
2023-02-19 00:51:16 +01:00
Sam Atkins
13d2111b74
LibWeb: Port Selector to new Strings
...
Also use `Infra::is_ascii_case_insensitive_match()` in some appropriate
places, after checking the specs.
2023-02-19 00:51:16 +01:00
Sam Atkins
c2f0b20d6b
LibWeb: Port FontFace to new Strings
2023-02-19 00:51:16 +01:00
Sam Atkins
33e9c4e1b2
LibWeb: Port GeneralEnclosed to new Strings
2023-02-19 00:51:16 +01:00
Sam Atkins
2026ea557e
LibWeb: Use is_ascii_case_insensitive_match() where the spec says to
2023-02-19 00:46:47 +01:00
Kenneth Myhra
8fbd43cb27
LibWeb: Make factory method of CSS::ResolvedCSSStyleDeclaration fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
719839b882
LibWeb: Make factory method of CSS::StyleSheetList fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
57c34e6325
LibWeb: Make factory method of CSS::Screen fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
1e24126004
LibWeb: Make factory method of CSS::MediaQueryListEvent fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
64e4d3fd94
LibWeb: Make factory method of CSS::CSSSupportsRule fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
bc02686ae9
LibWeb: Make factory method of CSS::MediaQueryList fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
5d9bc378c3
LibWeb: Make factory method of CSS::MediaList fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
a49ea467ad
LibWeb: Make factory method of CSS::CSSStyleSheet fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
4f4a908e5f
LibWeb: Make factory method of CSS::CSSStyleRule fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
c950d1904a
LibWeb: Make factory methods of CSS::CSSStyleDeclaration fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
48872cd190
LibWeb: Make factory methods of CSS::CSSRuleList fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
5601f439f9
LibWeb: Make factory method of CSS::CSSMediaRule fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
d53d8cacec
LibWeb: Make factory method of CSS::CSSImportRule fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
ff8495de35
LibWeb: Make factory method of CSS::CSSFontFaceRule fallible
2023-02-18 00:52:47 +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
kleines Filmröllchen
d00a6ca11f
AK+LibWeb: Implement Variant equality operator
...
And make use of it for CSS StyleValues.
2023-02-17 16:22:56 +00:00
Sam Atkins
85f3de6331
LibWeb: Port CSS/Serialize.{h,cpp} to new Strings, and propagate errors
2023-02-15 12:48:26 -05:00
Sam Atkins
a0b1eddc56
LibWeb: Port CSS::MediaQuery to new Strings
2023-02-15 12:48:26 -05:00
Sam Atkins
a381ce9519
LibWeb: Port CSS::Supports to new Strings
2023-02-15 12:48:26 -05:00
Sam Atkins
fc3540c4b1
LibWeb: Port CSS::UnicodeRange to new Strings
2023-02-15 12:48:26 -05:00
Sam Atkins
316092d185
LibWeb: Use StringView in CSS::PreferredColorScheme
...
This doesn't need to hold the string data.
2023-02-15 12:48:26 -05:00
Sam Atkins
dca19b764b
LibWeb: Port CSS::Display to new Strings
2023-02-15 12:48:26 -05:00
Sam Atkins
41c4cc95e4
LibWeb: Port CSS::Parser::Rule to new Strings
...
`Rule::to_deprecated_string()` and
`DeclarationOrAtRule::to_deprecated_string()` are not used anywhere, so
we can just delete them.
2023-02-15 12:48:26 -05:00
Sam Atkins
bee32b6cd2
LibWeb: Port CSS::Parser::Declaration to new Strings
2023-02-15 12:48:26 -05:00
Sam Atkins
a168cda4a7
LibWeb: Port CSS::Parser::ComponentValue to new Strings
2023-02-15 12:48:26 -05:00
Sam Atkins
05c1b09621
LibWeb: Port CSS::Parser::Function to new Strings
2023-02-15 12:48:26 -05:00
Sam Atkins
86d23c63a4
LibWeb: Port CSS::Parser::Block to new Strings
2023-02-15 12:48:26 -05:00
Sam Atkins
e338ef4914
LibWeb: Port ComputedValues to new Strings
2023-02-15 12:48:26 -05:00
Sam Atkins
9e735cc02e
LibWeb: Remove unused includes for DeprecatedString
...
Missed these before, oops.
2023-02-15 12:48:26 -05:00
Sam Atkins
3685a8813a
LibWeb: Port CSS Tokenizer to new Strings
...
Specifically, this uses FlyString, because the data gets held long-term
as a FlyString anyway.
2023-02-15 12:48:26 -05:00
Sam Atkins
abc01cc9fe
AK+Tests+LibWeb: Make URL::complete_url()
take a StringView
...
All it does is pass this to `URLParser::parse()` which takes a
StringView, so we might as well take one here too.
2023-02-15 12:48:26 -05:00
Sam Atkins
8af65108e4
LibWeb: Construct CSS Tokenizer and Parser with a StringView encoding
...
This doesn't need to be a full (Deprecated)String, so let's not force it
to be.
2023-02-15 12:48:26 -05:00
Sam Atkins
476ec563bc
LibWeb: Convert CSS Token::to_debug_string() to ::to_string() :^)
...
Using from_utf8_short_string() for all cases that are <= 3 bytes long.
Which is almost all of the static ones.
2023-02-13 14:35:40 +00:00
Sam Atkins
2368e6c5f2
LibWeb: Convert CSS Token/ComponentValue::to_debug_string() to String
...
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-13 14:35:40 +00:00
Sam Atkins
7fc72d3838
LibWeb: Convert CSS Token value to new FlyString
2023-02-13 14:35:40 +00:00
Sam Atkins
09f7682feb
LibWeb: Return StringViews from CSS Token bracket-string getters
...
These don't need to be full Strings, so let's be lightweight.
2023-02-13 14:35:40 +00:00
Linus Groh
2ad9c1fd6c
LibWeb: Re-implement checkbox painting using the UA stylesheet
...
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-12 00:15:52 +00:00
MacDue
63b11030f0
Everywhere: Use ReadonlySpan<T> instead of Span<T const>
2023-02-08 19:15:45 +00:00
Aliaksandr Kalenik
f58668031d
LibWeb: Respect font-stretch
in StyleComputer::compute_font
2023-02-05 08:06:06 +00:00