Bug 1516368 - Drop nsIDOMWindowUtils.isResolutionSet. r=botond
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Sun, 30 Dec 2018 02:16:30 +0000
changeset 509233 bb9b55fa11612bc7a6e70c3eda132d04b7f22167
parent 509232 463079c73a31c30e9167df1a9a8aa8bca3ee8ee7
child 509234 f11eea40912a16a004d9e71f2ec2d3faffd5d8c8
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1516368, 1337325
milestone66.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 1516368 - Drop nsIDOMWindowUtils.isResolutionSet. r=botond It's been unused since bug 1337325. Depends on D15338 Differential Revision: https://phabricator.services.mozilla.com/D15339
dom/base/nsDOMWindowUtils.cpp
dom/interfaces/base/nsIDOMWindowUtils.idl
layout/base/nsIPresShell.h
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -576,28 +576,16 @@ nsDOMWindowUtils::GetResolution(float* a
   }
 
   *aResolution = presShell->GetResolution();
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDOMWindowUtils::GetIsResolutionSet(bool* aIsResolutionSet) {
-  nsIPresShell* presShell = GetPresShell();
-  if (!presShell) {
-    return NS_ERROR_FAILURE;
-  }
-
-  *aIsResolutionSet = presShell->IsResolutionSet();
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsDOMWindowUtils::SetIsFirstPaint(bool aIsFirstPaint) {
   nsIPresShell* presShell = GetPresShell();
   if (presShell) {
     presShell->SetIsFirstPaint(aIsFirstPaint);
     return NS_OK;
   }
   return NS_ERROR_FAILURE;
 }
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl
+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl
@@ -230,25 +230,16 @@ interface nsIDOMWindowUtils : nsISupport
    * This resolution should be used when painting for the first time. Calling
    * this too late may have no effect.
    */
   void setRestoreResolution(in float aResolution,
                             in uint32_t aDisplayWidth,
                             in uint32_t aDisplayHeight);
 
   /**
-   * Whether the resolution has been set by the user.
-   * This gives a way to check whether the provided resolution is the default
-   * value or restored from a previous session.
-   *
-   * Can only be accessed with chrome privileges.
-   */
-  readonly attribute boolean isResolutionSet;
-
-  /**
    * Whether the next paint should be flagged as the first paint for a document.
    * This gives a way to track the next paint that occurs after the flag is
    * set. The flag gets cleared after the next paint.
    *
    * Can only be accessed with chrome privileges.
    */
   attribute boolean isFirstPaint;
 
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -1389,21 +1389,16 @@ class nsIPresShell : public nsStubDocume
 
   /**
    * Calculate the cumulative scale resolution from this document up to
    * but not including the root document.
    */
   virtual float GetCumulativeNonRootScaleResolution() = 0;
 
   /**
-   * Was the current resolution set by the user or just default initialized?
-   */
-  bool IsResolutionSet() { return mResolution.isSome(); }
-
-  /**
    * Used by session restore code to restore a resolution before the first
    * paint.
    */
   virtual void SetRestoreResolution(
       float aResolution, mozilla::LayoutDeviceIntSize aDisplaySize) = 0;
 
   /**
    * Returns whether we are in a DrawWindow() call that used the