mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Implement StyleComponentValueRule::to_string()
This commit is contained in:
parent
cf07da082e
commit
933a271a78
Notes:
sideshowbarker
2024-07-18 00:42:22 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/933a271a789 Pull-request: https://github.com/SerenityOS/serenity/pull/11060
@ -52,6 +52,7 @@ public:
|
||||
Token const& token() const { return m_token; }
|
||||
operator Token() const { return m_token; }
|
||||
|
||||
String to_string() const;
|
||||
String to_debug_string() const;
|
||||
|
||||
private:
|
||||
|
@ -133,6 +133,25 @@ String StyleBlockRule::to_string() const
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
String StyleComponentValueRule::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
||||
switch (m_type) {
|
||||
case StyleComponentValueRule::ComponentType::Token:
|
||||
builder.append(m_token.to_string());
|
||||
break;
|
||||
case StyleComponentValueRule::ComponentType::Function:
|
||||
builder.append(m_function->to_string());
|
||||
break;
|
||||
case StyleComponentValueRule::ComponentType::Block:
|
||||
builder.append(m_block->to_string());
|
||||
break;
|
||||
}
|
||||
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
String StyleComponentValueRule::to_debug_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
Loading…
Reference in New Issue
Block a user