Bug 893962 - Refactor the application of relative positioning. r=dbaron

This commit is contained in:
Corey Ford
2013-07-15 17:28:09 -07:00
parent 1a6fa27edf
commit 1113bd3173
6 changed files with 33 additions and 27 deletions

View File

@@ -838,6 +838,16 @@ nsHTMLReflowState::ComputeRelativeOffsets(uint8_t aCBDirection,
}
}
/* static */ void
nsHTMLReflowState::ApplyRelativePositioning(const nsStyleDisplay* aDisplay,
const nsMargin &aComputedOffsets,
nsPoint* aPosition)
{
if (NS_STYLE_POSITION_RELATIVE == aDisplay->mPosition) {
*aPosition += nsPoint(aComputedOffsets.left, aComputedOffsets.top);
}
}
nsIFrame*
nsHTMLReflowState::GetHypotheticalBoxContainer(nsIFrame* aFrame,
nscoord& aCBLeftEdge,