Bug 1370123 - Make aContent parameter to nsComputedDOMStyle::GetPresShellForContent const; r?xidorn draft
authorBrian Birtles <birtles@gmail.com>
Mon, 19 Jun 2017 12:21:17 +0900
changeset 606640 a66bc3bf7da452d201485d1f6a752636d329b3f8
parent 606639 2d45f4d4bce7a90dbbd2f1df05a1e65572b96201
child 606641 f83a5f13ab8611d18611769c04eea71c59c3b63b
push id67758
push userbbirtles@mozilla.com
push dateTue, 11 Jul 2017 07:47:52 +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