mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:18:11 +00:00
LibWeb: Allow any valid <color>
in CSS gradients
We now keep the color value as a StyleValue up until we go to paint the gradient, which makes `currentColor` work, along with any other color values that can't be immediately converted into a `Gfx::Color` while parsing.
This commit is contained in:
parent
2971ae59d8
commit
631a988a57
13 changed files with 53 additions and 28 deletions
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
|
||||
#include "ConicGradientStyleValue.h"
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
@ -34,7 +35,7 @@ ErrorOr<String> ConicGradientStyleValue::to_string() const
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
void ConicGradientStyleValue::resolve_for_size(Layout::Node const& node, CSSPixelSize size) const
|
||||
void ConicGradientStyleValue::resolve_for_size(Layout::NodeWithStyleAndBoxModelMetrics const& node, CSSPixelSize size) const
|
||||
{
|
||||
if (!m_resolved.has_value())
|
||||
m_resolved = ResolvedData { Painting::resolve_conic_gradient_data(node, *this), {} };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue