Bug 1277703: Mark nsHTMLReflowState::ComputeContainingBlockRectangle as 'const'. r?mats
MozReview-Commit-ID: HuSDz3rgtQY
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -1997,17 +1997,17 @@ CalcQuirkContainingBlockHeight(const nsH
return std::max(result, 0);
}
// Called by InitConstraints() to compute the containing block rectangle for
// the element. Handles the special logic for absolutely positioned elements
LogicalSize
nsHTMLReflowState::ComputeContainingBlockRectangle(
nsPresContext* aPresContext,
- const nsHTMLReflowState* aContainingBlockRS)
+ const nsHTMLReflowState* aContainingBlockRS) const
{
// Unless the element is absolutely positioned, the containing block is
// formed by the content edge of the nearest block-level ancestor
LogicalSize cbSize = aContainingBlockRS->ComputedSize();
WritingMode wm = aContainingBlockRS->GetWritingMode();
// mFrameType for abs-pos tables is NS_CSS_FRAME_TYPE_BLOCK, so we need to
--- a/layout/generic/nsHTMLReflowState.h
+++ b/layout/generic/nsHTMLReflowState.h
@@ -731,18 +731,18 @@ public:
*/
static nscoord CalcLineHeight(nsIContent* aContent,
nsStyleContext* aStyleContext,
nscoord aBlockBSize,
float aFontSizeInflation);
mozilla::LogicalSize ComputeContainingBlockRectangle(
- nsPresContext* aPresContext,
- const nsHTMLReflowState* aContainingBlockRS);
+ nsPresContext* aPresContext,
+ const nsHTMLReflowState* aContainingBlockRS) const;
/**
* Apply the mComputed(Min/Max)Width constraints to the content
* size computed so far.
*/
nscoord ApplyMinMaxWidth(nscoord aWidth) const {
if (NS_UNCONSTRAINEDSIZE != ComputedMaxWidth()) {
aWidth = std::min(aWidth, ComputedMaxWidth());