Przeglądaj źródła

LibWeb: Add UsedValues::set_has_definite_width/height()

These will be used to explicitly mark some box geometry as definite
at various stages of layout. It's gonna get finicky.
Andreas Kling 1 rok temu
rodzic
commit
5a995e95e3
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      Userland/Libraries/LibWeb/Layout/LayoutState.h

+ 3 - 0
Userland/Libraries/LibWeb/Layout/LayoutState.h

@@ -55,6 +55,9 @@ struct LayoutState {
         void set_indefinite_content_width();
         void set_indefinite_content_height();
 
+        void set_has_definite_width(bool has_definite_width) { m_has_definite_width = has_definite_width; }
+        void set_has_definite_height(bool has_definite_height) { m_has_definite_height = has_definite_height; }
+
         // NOTE: These are used by FlexFormattingContext to assign a temporary main size to items
         //       early on, so that descendants have something to resolve percentages against.
         void set_temporary_content_width(CSSPixels);