From 4443e3c2277743bb3e8a75c26679bd94add61203 Mon Sep 17 00:00:00 2001 From: Jamie Nicol Date: Wed, 24 Feb 2016 14:57:43 +0000 Subject: [PATCH] Bug 1247098 - Mark nsIPresShell::GetResolution and nsPresContext::IsRootContentDocument as const. r=tnikkel MozReview-Commit-ID: 5IXm4EUy7IN --HG-- extra : rebase_source : 7028a908adcb36828a58bb3ad7403559cfad9eb2 --- layout/base/nsIPresShell.h | 2 +- layout/base/nsPresContext.cpp | 2 +- layout/base/nsPresContext.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h index a485d4bf83f1..dd797245d9f2 100644 --- a/layout/base/nsIPresShell.h +++ b/layout/base/nsIPresShell.h @@ -1401,7 +1401,7 @@ public: * The resolution defaults to 1.0. */ virtual nsresult SetResolution(float aResolution) = 0; - float GetResolution() { return mResolution.valueOr(1.0); } + float GetResolution() const { return mResolution.valueOr(1.0); } virtual float GetCumulativeResolution() = 0; /** diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index 41a904ccdc1e..02b67908b31a 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -2941,7 +2941,7 @@ nsPresContext::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const } bool -nsPresContext::IsRootContentDocument() +nsPresContext::IsRootContentDocument() const { // We are a root content document if: we are not a resource doc, we are // not chrome, and we either have no parent or our parent is chrome. diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h index 48b1a68914e3..318459418fe8 100644 --- a/layout/base/nsPresContext.h +++ b/layout/base/nsPresContext.h @@ -1029,7 +1029,7 @@ public: return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf); } - bool IsRootContentDocument(); + bool IsRootContentDocument() const; bool IsCrossProcessRootContentDocument(); bool IsGlyph() const {