Bug 1370123 - Make aContent parameter to nsComputedDOMStyle::GetPresShellForContent const; r=xidorn
authorBrian Birtles <birtles@gmail.com>
Mon, 19 Jun 2017 12:21:17 +0900
changeset 607443 cd8e522d279890d6f3732b59b8823defa9bd8a24
parent 607442 a9805d5b89d741e7532aa469e15354533204fffa
child 607444 9858b929fbb6331575770362b8b8bcf0b7f9f5b5
push id67985
push userbmo:emilio+bugs@crisal.io
push dateWed, 12 Jul 2017 08:36:44 +0000
reviewersxidorn
bugs1370123
milestone56.0a1
Bug 1370123 - Make aContent parameter to nsComputedDOMStyle::GetPresShellForContent const; r=xidorn MozReview-Commit-ID: 8eZ7JmgE1XY
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
--- 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