Bug 1370123 - Make aContent parameter to nsComputedDOMStyle::GetPresShellForContent const; r?xidorn
MozReview-Commit-ID: 8eZ7JmgE1XY
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -718,17 +718,17 @@ nsComputedDOMStyle::GetAdjustedValuesFor
adjustment = mInnerFrame->GetUsedBorderAndPadding();
}
return adjustment;
}
/* static */
nsIPresShell*
-nsComputedDOMStyle::GetPresShellForContent(nsIContent* aContent)
+nsComputedDOMStyle::GetPresShellForContent(const nsIContent* aContent)
{
nsIDocument* composedDoc = aContent->GetComposedDoc();
if (!composedDoc)
return nullptr;
return composedDoc->GetShell();
}
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -117,17 +117,17 @@ public:
return DoGetStyleContextNoFlush(aElement,
aPseudo,
aPresShell,
aStyleType,
eWithoutAnimation);
}
static nsIPresShell*
- GetPresShellForContent(nsIContent* aContent);
+ GetPresShellForContent(const nsIContent* aContent);
// Helper for nsDOMWindowUtils::GetVisitedDependentComputedStyle
void SetExposeVisitedStyle(bool aExpose) {
NS_ASSERTION(aExpose != mExposeVisitedStyle, "should always be changing");
mExposeVisitedStyle = aExpose;
}
// nsDOMCSSDeclaration abstract methods which should never be called