Преглед изворни кода

LibWeb: Add CSS::FlexBasisData::is_definite()

This will allow some more expressive code in FlexFormattingContext.
Andreas Kling пре 3 година
родитељ
комит
1e832dd91a
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      Userland/Libraries/LibWeb/CSS/ComputedValues.h

+ 2 - 0
Userland/Libraries/LibWeb/CSS/ComputedValues.h

@@ -51,6 +51,8 @@ struct Transformation {
 struct FlexBasisData {
     CSS::FlexBasis type { CSS::FlexBasis::Auto };
     CSS::Length length {};
+
+    bool is_definite() const { return type == CSS::FlexBasis::Length; }
 };
 
 struct BoxShadowData {