diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index a498bab9ee40..0b4a600c97e1 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -4106,11 +4106,11 @@ nsLayoutUtils::GetFirstNonAnonymousFrame(nsIFrame* aFrame) } struct BoxToRect : public nsLayoutUtils::BoxCallback { - nsIFrame* mRelativeTo; + const nsIFrame* mRelativeTo; nsLayoutUtils::RectCallback* mCallback; uint32_t mFlags; - BoxToRect(nsIFrame* aRelativeTo, nsLayoutUtils::RectCallback* aCallback, + BoxToRect(const nsIFrame* aRelativeTo, nsLayoutUtils::RectCallback* aCallback, uint32_t aFlags) : mRelativeTo(aRelativeTo), mCallback(aCallback), mFlags(aFlags) {} @@ -4145,7 +4145,7 @@ struct BoxToRect : public nsLayoutUtils::BoxCallback { struct MOZ_RAII BoxToRectAndText : public BoxToRect { Sequence* mTextList; - BoxToRectAndText(nsIFrame* aRelativeTo, nsLayoutUtils::RectCallback* aCallback, + BoxToRectAndText(const nsIFrame* aRelativeTo, nsLayoutUtils::RectCallback* aCallback, Sequence* aTextList, uint32_t aFlags) : BoxToRect(aRelativeTo, aCallback, aFlags), mTextList(aTextList) {} @@ -4185,7 +4185,7 @@ struct MOZ_RAII BoxToRectAndText : public BoxToRect { }; void -nsLayoutUtils::GetAllInFlowRects(nsIFrame* aFrame, nsIFrame* aRelativeTo, +nsLayoutUtils::GetAllInFlowRects(nsIFrame* aFrame, const nsIFrame* aRelativeTo, RectCallback* aCallback, uint32_t aFlags) { BoxToRect converter(aRelativeTo, aCallback, aFlags); @@ -4193,7 +4193,8 @@ nsLayoutUtils::GetAllInFlowRects(nsIFrame* aFrame, nsIFrame* aRelativeTo, } void -nsLayoutUtils::GetAllInFlowRectsAndTexts(nsIFrame* aFrame, nsIFrame* aRelativeTo, +nsLayoutUtils::GetAllInFlowRectsAndTexts(nsIFrame* aFrame, + const nsIFrame* aRelativeTo, RectCallback* aCallback, Sequence* aTextList, uint32_t aFlags) @@ -4230,7 +4231,7 @@ nsIFrame* nsLayoutUtils::GetContainingBlockForClientRect(nsIFrame* aFrame) } nsRect -nsLayoutUtils::GetAllInFlowRectsUnion(nsIFrame* aFrame, nsIFrame* aRelativeTo, +nsLayoutUtils::GetAllInFlowRectsUnion(nsIFrame* aFrame, const nsIFrame* aRelativeTo, uint32_t aFlags) { RectAccumulator accumulator; GetAllInFlowRects(aFrame, aRelativeTo, &accumulator, aFlags); diff --git a/layout/base/nsLayoutUtils.h b/layout/base/nsLayoutUtils.h index acfb926c0c00..d099c8461cc9 100644 --- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -1221,10 +1221,11 @@ public: * or RECTS_USE_MARGIN_BOX, the corresponding type of box is used. * Otherwise (by default), the border box is used. */ - static void GetAllInFlowRects(nsIFrame* aFrame, nsIFrame* aRelativeTo, + static void GetAllInFlowRects(nsIFrame* aFrame, const nsIFrame* aRelativeTo, RectCallback* aCallback, uint32_t aFlags = 0); - static void GetAllInFlowRectsAndTexts(nsIFrame* aFrame, nsIFrame* aRelativeTo, + static void GetAllInFlowRectsAndTexts(nsIFrame* aFrame, + const nsIFrame* aRelativeTo, RectCallback* aCallback, mozilla::dom::Sequence* aTextList, uint32_t aFlags = 0); @@ -1239,7 +1240,7 @@ public: * or RECTS_USE_MARGIN_BOX, the corresponding type of box is used. * Otherwise (by default), the border box is used. */ - static nsRect GetAllInFlowRectsUnion(nsIFrame* aFrame, nsIFrame* aRelativeTo, + static nsRect GetAllInFlowRectsUnion(nsIFrame* aFrame, const nsIFrame* aRelativeTo, uint32_t aFlags = 0); enum {