mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibWeb/CSS: Clarify types of image-parsing methods
parse_image_value() always returns some kind of AbstractImageStyleValue.
This commit is contained in:
parent
09d2c5eb9b
commit
c77456a508
Notes:
github-actions[bot]
2025-02-28 12:52:02 +00:00
Author: https://github.com/AtkinsSJ
Commit: c77456a508
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3644
3 changed files with 11 additions and 8 deletions
|
@ -128,7 +128,7 @@ Optional<Vector<AngularColorStopListElement>> Parser::parse_angular_color_stop_l
|
|||
[&](auto& it) { return parse_angle_percentage(it); });
|
||||
}
|
||||
|
||||
RefPtr<CSSStyleValue> Parser::parse_linear_gradient_function(TokenStream<ComponentValue>& outer_tokens)
|
||||
RefPtr<LinearGradientStyleValue> Parser::parse_linear_gradient_function(TokenStream<ComponentValue>& outer_tokens)
|
||||
{
|
||||
using GradientType = LinearGradientStyleValue::GradientType;
|
||||
|
||||
|
@ -262,7 +262,7 @@ RefPtr<CSSStyleValue> Parser::parse_linear_gradient_function(TokenStream<Compone
|
|||
return LinearGradientStyleValue::create(gradient_direction, move(*color_stops), gradient_type, repeating_gradient);
|
||||
}
|
||||
|
||||
RefPtr<CSSStyleValue> Parser::parse_conic_gradient_function(TokenStream<ComponentValue>& outer_tokens)
|
||||
RefPtr<ConicGradientStyleValue> Parser::parse_conic_gradient_function(TokenStream<ComponentValue>& outer_tokens)
|
||||
{
|
||||
auto transaction = outer_tokens.begin_transaction();
|
||||
auto& component_value = outer_tokens.consume_a_token();
|
||||
|
@ -367,7 +367,7 @@ RefPtr<CSSStyleValue> Parser::parse_conic_gradient_function(TokenStream<Componen
|
|||
return ConicGradientStyleValue::create(from_angle, at_position.release_nonnull(), move(*color_stops), repeating_gradient);
|
||||
}
|
||||
|
||||
RefPtr<CSSStyleValue> Parser::parse_radial_gradient_function(TokenStream<ComponentValue>& outer_tokens)
|
||||
RefPtr<RadialGradientStyleValue> Parser::parse_radial_gradient_function(TokenStream<ComponentValue>& outer_tokens)
|
||||
{
|
||||
using EndingShape = RadialGradientStyleValue::EndingShape;
|
||||
using Extent = RadialGradientStyleValue::Extent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue