瀏覽代碼

LibWeb: Implement TransformationStyleValue::to_string()

Sam Atkins 3 年之前
父節點
當前提交
181d1e2dd6
共有 1 個文件被更改,包括 15 次插入1 次删除
  1. 15 1
      Userland/Libraries/LibWeb/CSS/StyleValue.cpp

+ 15 - 1
Userland/Libraries/LibWeb/CSS/StyleValue.cpp

@@ -582,7 +582,21 @@ String TextDecorationStyleValue::to_string() const
 
 String TransformationStyleValue::to_string() const
 {
-    return "TransformationStyleValue";
+    StringBuilder builder;
+
+    switch (m_transform_function) {
+    case TransformFunction::TranslateY:
+        builder.append("translateY");
+        break;
+    default:
+        VERIFY_NOT_REACHED();
+    }
+
+    builder.append('(');
+    builder.join(", ", m_values);
+    builder.append(')');
+
+    return builder.to_string();
 }
 
 String UnresolvedStyleValue::to_string() const