From fb564353f2f8e9b4ba01e814c06bb29828099268 Mon Sep 17 00:00:00 2001 From: win7-7 Date: Tue, 2 Jun 2020 11:55:46 +0300 Subject: issue #1575 - Fix the wrong position when we calculate the position for position:absolute child and add reftests Use |GetUsedBorder| instead of |GetComputedBorder| when we calculate the position for position:absolute child. --- layout/generic/nsAbsoluteContainingBlock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layout/generic') diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index f444757e8..326468c07 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -658,8 +658,8 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat // Get the border values WritingMode outerWM = aReflowInput.GetWritingMode(); - const LogicalMargin border(outerWM, - aReflowInput.mStyleBorder->GetComputedBorder()); + const LogicalMargin border(outerWM, aDelegatingFrame->GetUsedBorder()); + LogicalMargin margin = kidReflowInput.ComputedLogicalMargin().ConvertTo(outerWM, wm); -- cgit v1.2.3