mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 11:06:10 +00:00
LibWeb: Rename CSSColorValue::create() to create_from_color()
Soon, CSSColorValue will be an abstract class, and we'll instead create a CSSRGB, CSSHSL, or other specific color type from the Typed-OM spec. However, it's still useful to have an easy "just give me a style value for this color" method. So change the name to distinguish this from the usual StyleValue::create() methods.
This commit is contained in:
parent
4e48afd9a7
commit
37ea4e3b5f
Notes:
github-actions[bot]
2024-08-21 09:53:06 +00:00
Author: https://github.com/AtkinsSJ
Commit: 37ea4e3b5f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1091
11 changed files with 24 additions and 24 deletions
|
@ -12,7 +12,7 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
ValueComparingNonnullRefPtr<CSSColorValue> CSSColorValue::create(Color color)
|
||||
ValueComparingNonnullRefPtr<CSSColorValue> CSSColorValue::create_from_color(Color color)
|
||||
{
|
||||
if (color.value() == 0) {
|
||||
static auto transparent = adopt_ref(*new (nothrow) CSSColorValue(color));
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Web::CSS {
|
|||
// https://drafts.css-houdini.org/css-typed-om-1/#csscolorvalue
|
||||
class CSSColorValue : public StyleValueWithDefaultOperators<CSSColorValue> {
|
||||
public:
|
||||
static ValueComparingNonnullRefPtr<CSSColorValue> create(Color color);
|
||||
static ValueComparingNonnullRefPtr<CSSColorValue> create_from_color(Color color);
|
||||
virtual ~CSSColorValue() override = default;
|
||||
|
||||
Color color() const { return m_color; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue