Bug 1575839: part 2) Declare some methods `const` or `static`. r=hsivonen
authorMirko Brodesser <mbrodesser@mozilla.com>
Tue, 27 Aug 2019 10:40:30 +0000
changeset 553789 5a833f31ffb1e61c0a4047ea36a47c7a9dc8fca4
parent 553788 64b069575224c1905b59162effca4d61b684da9d
child 553790 ce15b71195316eb82954c24f62a319e54c0e4405
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs1575839
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1575839: part 2) Declare some methods `const` or `static`. r=hsivonen Differential Revision: https://phabricator.services.mozilla.com/D43416
dom/base/nsPlainTextSerializer.cpp
dom/base/nsPlainTextSerializer.h
--- a/dom/base/nsPlainTextSerializer.cpp
+++ b/dom/base/nsPlainTextSerializer.cpp
@@ -261,17 +261,17 @@ bool nsPlainTextSerializer::PopBool(nsTA
   uint32_t size = aStack.Length();
   if (size > 0) {
     returnValue = aStack.ElementAt(size - 1);
     aStack.RemoveElementAt(size - 1);
   }
   return returnValue;
 }
 
-bool nsPlainTextSerializer::IsIgnorableRubyAnnotation(nsAtom* aTag) {
+bool nsPlainTextSerializer::IsIgnorableRubyAnnotation(nsAtom* aTag) const {
   if (mSettings.GetWithRubyAnnotation()) {
     return false;
   }
 
   return aTag == nsGkAtoms::rp || aTag == nsGkAtoms::rt ||
          aTag == nsGkAtoms::rtc;
 }
 
--- a/dom/base/nsPlainTextSerializer.h
+++ b/dom/base/nsPlainTextSerializer.h
@@ -120,27 +120,27 @@ class nsPlainTextSerializer final : publ
                              nsIDocumentEncoder::OutputWrap);
   }
   inline bool MayBreakLines() const {
     return !mSettings.HasFlag(nsIDocumentEncoder::OutputDisallowLineBreaking);
   }
 
   inline bool DoOutput() const { return mHeadLevel == 0; }
 
-  inline bool IsQuotedLine(const nsAString& aLine) {
+  static inline bool IsQuotedLine(const nsAString& aLine) {
     return !aLine.IsEmpty() && aLine.First() == char16_t('>');
   }
 
   // Stack handling functions
   bool GetLastBool(const nsTArray<bool>& aStack);
   void SetLastBool(nsTArray<bool>& aStack, bool aValue);
   void PushBool(nsTArray<bool>& aStack, bool aValue);
   bool PopBool(nsTArray<bool>& aStack);
 
-  bool IsIgnorableRubyAnnotation(nsAtom* aTag);
+  bool IsIgnorableRubyAnnotation(nsAtom* aTag) const;
 
   // @return true, iff the elements' whitespace and newline characters have to
   //         be preserved according to its style or because it's a `<pre>`
   //         element.
   static bool IsElementPreformatted(mozilla::dom::Element* aElement);
 
   // https://drafts.csswg.org/css-display/#block-level
   static bool IsCssBlockLevelElement(mozilla::dom::Element* aElement);