diff --git a/layout/generic/nsHTMLReflowState.cpp b/layout/generic/nsHTMLReflowState.cpp
index 76acc897d460..22e61832e498 100644
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -981,9 +981,7 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext* aPresContext,
mComputedOffsets.right);
}
- // When the CSS2 spec refers to direction it means the containing block's
- // direction and not the direction of the absolutely positioned element itself
- PRUint8 direction = cbrs->mStyleVisibility->mDirection;
+ PRUint8 direction = mStyleVisibility->mDirection;
// Initialize the 'width' computed value
nsStyleUnit widthUnit = mStylePosition->mWidth.GetUnit();
diff --git a/layout/html/base/src/nsHTMLReflowState.cpp b/layout/html/base/src/nsHTMLReflowState.cpp
index 76acc897d460..22e61832e498 100644
--- a/layout/html/base/src/nsHTMLReflowState.cpp
+++ b/layout/html/base/src/nsHTMLReflowState.cpp
@@ -981,9 +981,7 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext* aPresContext,
mComputedOffsets.right);
}
- // When the CSS2 spec refers to direction it means the containing block's
- // direction and not the direction of the absolutely positioned element itself
- PRUint8 direction = cbrs->mStyleVisibility->mDirection;
+ PRUint8 direction = mStyleVisibility->mDirection;
// Initialize the 'width' computed value
nsStyleUnit widthUnit = mStylePosition->mWidth.GetUnit();