Ver Fonte

LibWeb: Add Layout::Box::margin_box_height()

Andreas Kling há 4 anos atrás
pai
commit
3e8873b63e
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      Userland/Libraries/LibWeb/Layout/Box.h

+ 6 - 0
Userland/Libraries/LibWeb/Layout/Box.h

@@ -58,6 +58,12 @@ public:
         return width() + margin_box.left + margin_box.right;
     }
 
+    float margin_box_height() const
+    {
+        auto margin_box = box_model().margin_box();
+        return height() + margin_box.top + margin_box.bottom;
+    }
+
     float border_box_width() const
     {
         auto border_box = box_model().border_box();