[LFC] Adjust static position with containing block's content box top/left
[WebKit-https.git] / Source / WebCore / layout / displaytree / DisplayBox.cpp
index 505da27b9f6d35b526dbb6d397a2a6d4d83509c5..2bcc6f4aece7712b9a54ea94ede50a3f3fa61019 100644 (file)
@@ -84,13 +84,11 @@ Box::Rect Box::paddingBox() const
 
 Box::Rect Box::contentBox() const
 {
-    auto paddingBox = this->paddingBox();
-
     Rect contentBox;
-    contentBox.setTop(paddingBox.top() + paddingTop());
-    contentBox.setLeft(paddingBox.left() + paddingLeft());
-    contentBox.setWidth(m_contentWidth);
-    contentBox.setHeight(m_contentHeight);
+    contentBox.setTop(contentBoxTop());
+    contentBox.setLeft(contentBoxLeft());
+    contentBox.setWidth(contentBoxWidth());
+    contentBox.setHeight(contentBoxHeight());
     return contentBox;
 }