Bug 1475022 - Make aRelativeTo argument const. r=mattwoodrow

MozReview-Commit-ID: HIe5ShwTvqQ

--HG--
extra : rebase_source : 732745c5ca4ed6f252b7f5acc531c3946b9ff5fb
This commit is contained in:
Kartikaya Gupta 2018-07-11 16:12:50 -04:00
Родитель 88f981198b
Коммит 38ef244612
2 изменённых файлов: 11 добавлений и 9 удалений

Просмотреть файл

@ -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<nsString>* mTextList;
BoxToRectAndText(nsIFrame* aRelativeTo, nsLayoutUtils::RectCallback* aCallback,
BoxToRectAndText(const nsIFrame* aRelativeTo, nsLayoutUtils::RectCallback* aCallback,
Sequence<nsString>* 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<nsString>* 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);

Просмотреть файл

@ -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<nsString>* 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 {