Bug 1277703: Mark nsHTMLReflowState::ComputeContainingBlockRectangle as 'const'. r?mats draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 02 Jun 2016 15:24:00 -0700
changeset 374867 6d0149e50bfff4adf66fe60be8a8beeef2412a28
parent 374638 7916d8bb58d701fa5b315d2f4794a7b243eebeef
child 522701 c5fe6990118ea5c7dc0f12912e0646d70327c90b
push id20097
push userdholbert@mozilla.com
push dateThu, 02 Jun 2016 22:24:12 +0000
reviewersmats
bugs1277703
milestone49.0a1
Bug 1277703: Mark nsHTMLReflowState::ComputeContainingBlockRectangle as 'const'. r?mats MozReview-Commit-ID: HuSDz3rgtQY
layout/generic/nsHTMLReflowState.cpp
layout/generic/nsHTMLReflowState.h
--- 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());