diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp index 4ff8e4f1e21..0531e191f9e 100644 --- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp @@ -327,6 +327,11 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext, ("nsHTMLContainerFrame::CreateViewForFrame: frame=%p relatively positioned", aFrame)); aForce = PR_TRUE; + + // Get the z-index to use + if (position->mZIndex.GetUnit() == eStyleUnit_Integer) { + zIndex = position->mZIndex.GetIntValue(); + } } else if (position->IsAbsolutelyPositioned()) { NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, @@ -334,7 +339,7 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext, aFrame)); aForce = PR_TRUE; - // Get the z-index to use. This only applies to positioned elements + // Get the z-index to use if (position->mZIndex.GetUnit() == eStyleUnit_Integer) { zIndex = position->mZIndex.GetIntValue(); } diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp index 4ff8e4f1e21..0531e191f9e 100644 --- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp @@ -327,6 +327,11 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext, ("nsHTMLContainerFrame::CreateViewForFrame: frame=%p relatively positioned", aFrame)); aForce = PR_TRUE; + + // Get the z-index to use + if (position->mZIndex.GetUnit() == eStyleUnit_Integer) { + zIndex = position->mZIndex.GetIntValue(); + } } else if (position->IsAbsolutelyPositioned()) { NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, @@ -334,7 +339,7 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext, aFrame)); aForce = PR_TRUE; - // Get the z-index to use. This only applies to positioned elements + // Get the z-index to use if (position->mZIndex.GetUnit() == eStyleUnit_Integer) { zIndex = position->mZIndex.GetIntValue(); }