[LFC] The static position for an out-of-flow box should include the previous sibling...
[WebKit-https.git] / Source / WebCore / layout / displaytree / DisplayBox.cpp
index dc1f31b..b020c1e 100644 (file)
@@ -62,19 +62,17 @@ Box::Rect Box::marginBox() const
     return marginBox;
 }
 
-#ifndef NDEBUG
 Box::Rect Box::nonCollapsedMarginBox() const
 {
     auto borderBox = this->borderBox();
 
     Rect marginBox;
-    marginBox.setTop(borderBox.top() - m_nonCollapsedVertivalMargin.top);
+    marginBox.setTop(borderBox.top() - nonCollapsedMarginTop());
     marginBox.setLeft(borderBox.left() - marginLeft());
-    marginBox.setHeight(borderBox.height() + m_nonCollapsedVertivalMargin.top + m_nonCollapsedVertivalMargin.bottom);
+    marginBox.setHeight(borderBox.height() + nonCollapsedMarginTop() + nonCollapsedMarginBottom());
     marginBox.setWidth(borderBox.width() + marginLeft() + marginRight());
     return marginBox;
 }
-#endif
 
 Box::Rect Box::borderBox() const
 {