diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index 8bb882f1577..b8f8efe1656 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -1276,11 +1276,11 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsPresContext* aPresContext, mComputedMargin.right = availMarginSpace - mComputedMargin.left; } else { // Just 'margin-left' is 'auto' - mComputedMargin.left = availMarginSpace - mComputedMargin.right; + mComputedMargin.left = availMarginSpace; } } else { // Just 'margin-right' is 'auto' - mComputedMargin.right = availMarginSpace - mComputedMargin.left; + mComputedMargin.right = availMarginSpace; } } diff --git a/mozilla/layout/reftests/box-properties/reftest.list b/mozilla/layout/reftests/box-properties/reftest.list index 49558c6eb4b..baa5e2075ca 100644 --- a/mozilla/layout/reftests/box-properties/reftest.list +++ b/mozilla/layout/reftests/box-properties/reftest.list @@ -16,5 +16,5 @@ == box-sizing-2.html box-sizing-2-ref.html == box-sizing-3.html box-sizing-1-ref.html == box-sizing-4.html box-sizing-4-ref.html -fails == abspos-non-replaced-width-offset-margin.html abspos-non-replaced-width-offset-margin-ref.html # bug 419060, bug 419072 -fails fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == abspos-replaced-width-offset-margin.html abspos-replaced-width-offset-margin-ref.html # bug 419060, bug 419072, bug 371316 or other image scaling issue +fails == abspos-non-replaced-width-offset-margin.html abspos-non-replaced-width-offset-margin-ref.html # bug 419072 +fails == abspos-replaced-width-offset-margin.html abspos-replaced-width-offset-margin-ref.html # bug 419072 diff --git a/mozilla/layout/reftests/bugs/419060-ref.html b/mozilla/layout/reftests/bugs/419060-ref.html new file mode 100644 index 00000000000..a18534ddad5 --- /dev/null +++ b/mozilla/layout/reftests/bugs/419060-ref.html @@ -0,0 +1,34 @@ + + + + Absolute positioning margin:auto regression + + + + + + +
+This div should be centered within its container: +
+
+ + + diff --git a/mozilla/layout/reftests/bugs/419060.html b/mozilla/layout/reftests/bugs/419060.html new file mode 100644 index 00000000000..8a339d09dd0 --- /dev/null +++ b/mozilla/layout/reftests/bugs/419060.html @@ -0,0 +1,38 @@ + + + + Absolute positioning margin:auto regression + + + + + + +
+This div should be centered within its container: +
+
+ + + diff --git a/mozilla/layout/reftests/bugs/reftest.list b/mozilla/layout/reftests/bugs/reftest.list index 2485551eaa4..30388af7fdc 100644 --- a/mozilla/layout/reftests/bugs/reftest.list +++ b/mozilla/layout/reftests/bugs/reftest.list @@ -733,3 +733,4 @@ random == 403134-1.html 403134-1-ref.html # bug 405377 == 414851-1.html 414851-1-ref.html == 416106-1.xhtml 416106-1-ref.xhtml == 417676.html 417676-ref.html +== 419060.html 419060-ref.html