Backed out changeset 3adba9da5967 (bug 1376931) for bustage at layout/style/nsMediaFeatures.cpp:296: 'class nsPresContext' has no member named 'GetEffectiveFullZoom'; did you mean 'GetDeviceFullZoom'. r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 05 Oct 2017 00:15:51 +0200
changeset 384569 c8a5f12a2c10a8523c28159b043734aea3689cdf
parent 384568 2cad511f5027bc20ee572b40c3c1cda00ab5ac7e
child 384570 31d7cf3009c9e5ce7b50d5ffb07752671fbbd002
push id32631
push userarchaeopteryx@coole-files.de
push dateThu, 05 Oct 2017 08:51:33 +0000
treeherdermozilla-central@66042a706980 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1376931
milestone58.0a1
backs out3adba9da59675b834809cce48f9475fd53dd03f7
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
Backed out changeset 3adba9da5967 (bug 1376931) for bustage at layout/style/nsMediaFeatures.cpp:296: 'class nsPresContext' has no member named 'GetEffectiveFullZoom'; did you mean 'GetDeviceFullZoom'. r=backout on a CLOSED TREE
docshell/base/nsIContentViewer.idl
layout/base/nsDocumentViewer.cpp
layout/base/nsPresContext.cpp
layout/base/nsPresContext.h
testing/specialpowers/content/specialpowersAPI.js
toolkit/content/widgets/browser.xml
--- a/docshell/base/nsIContentViewer.idl
+++ b/docshell/base/nsIContentViewer.idl
@@ -208,28 +208,16 @@ interface nsIContentViewer : nsISupports
 
   /** The actual text zoom in effect, as modified by the system font scale. */
   readonly attribute float effectiveTextZoom;
 
   /** The amount by which to scale all lengths. Default is 1.0. */
   attribute float fullZoom;
 
   /**
-   * The actual full zoom in effect, as modified by the device context.
-   * For a requested full zoom, the device context may choose a slightly
-   * different effectiveFullZoom to accomodate integer rounding of app units
-   * per dev pixel. This property returns the actual zoom amount in use,
-   * though it may not be good user experience to report that a requested zoom
-   * of 90% is actually 89.1%, for example. This value is provided primarily to
-   * support media queries of dppx values, because those queries are matched
-   * against the actual native device pixel ratio and the actual full zoom.
-   */
-  readonly attribute float deviceFullZoom;
-
-  /**
    * The value used to override devicePixelRatio and media queries dppx.
    * Default is 0.0, that means no overriding is done (only a positive value
    * is applied).
    */
   attribute float overrideDPPX;
 
   /** Disable entire author style level (including HTML presentation hints) */
   attribute boolean authorStyleDisabled;
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -3222,35 +3222,16 @@ nsDocumentViewer::GetFullZoom(float* aFu
   // Check the prescontext first because it might have a temporary
   // setting for print-preview
   nsPresContext* pc = GetPresContext();
   *aFullZoom = pc ? pc->GetFullZoom() : mPageZoom;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDocumentViewer::GetDeviceFullZoom(float* aDeviceFullZoom)
-{
-  NS_ENSURE_ARG_POINTER(aDeviceFullZoom);
-#ifdef NS_PRINT_PREVIEW
-  if (GetIsPrintPreview()) {
-    // Print Preview overrides all zoom; if specified, we use the print preview
-    // zoom, no matter what.
-    *aDeviceFullZoom = mPrintPreviewZoom;
-    return NS_OK;
-  }
-#endif
-  // If not in print preview, ask the prescontext for the device zoom, if a
-  // prescontext is available.
-  nsPresContext* pc = GetPresContext();
-  *aDeviceFullZoom = pc ? pc->GetDeviceFullZoom() : mPageZoom;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsDocumentViewer::SetOverrideDPPX(float aDPPX)
 {
   // If we don't have a document, then we need to bail.
   if (!mDocument) {
     return NS_ERROR_FAILURE;
   }
 
   mOverrideDPPX = aDPPX;
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1359,22 +1359,16 @@ nsPresContext::UpdateEffectiveTextZoom()
   if (HasCachedStyleData()) {
     // Media queries could have changed, since we changed the meaning
     // of 'em' units in them.
     MediaFeatureValuesChanged(eRestyle_ForceDescendants,
                               NS_STYLE_HINT_REFLOW);
   }
 }
 
-float
-nsPresContext::GetDeviceFullZoom()
-{
-  return mDeviceContext->GetFullZoom();
-}
-
 void
 nsPresContext::SetFullZoom(float aZoom)
 {
   if (!mShell || mFullZoom == aZoom) {
     return;
   }
 
   // Re-fetch the view manager's window dimensions in case there's a deferred
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -599,22 +599,16 @@ public:
       // Media queries could have changed, since we changed the meaning
       // of 'em' units in them.
       MediaFeatureValuesChanged(eRestyle_ForceDescendants,
                                 NS_STYLE_HINT_REFLOW);
     }
   }
 
   float GetFullZoom() { return mFullZoom; }
-  /**
-   * Device full zoom differs from full zoom because it gets the zoom from
-   * the device context, which may be using a different zoom due to rounding
-   * of app units to device pixels.
-   */
-  float GetDeviceFullZoom();
   void SetFullZoom(float aZoom);
 
   float GetOverrideDPPX() { return mOverrideDPPX; }
   void SetOverrideDPPX(float aDPPX);
 
   nscoord GetAutoQualityMinFontSize() {
     return DevPixelsToAppUnits(mAutoQualityMinFontSizePixelsPref);
   }
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -1417,19 +1417,16 @@ SpecialPowersAPI.prototype = {
   },
   resetConsole() {
     Services.console.reset();
   },
 
   getFullZoom(window) {
     return this._getMUDV(window).fullZoom;
   },
-  getDeviceFullZoom(window) {
-    return this._getMUDV(window).deviceFullZoom;
-  },
   setFullZoom(window, zoom) {
     this._getMUDV(window).fullZoom = zoom;
   },
   getTextZoom(window) {
     return this._getMUDV(window).textZoom;
   },
   setTextZoom(window, zoom) {
     this._getMUDV(window).textZoom = zoom;
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -549,23 +549,16 @@
         <getter><![CDATA[
           return this.markupDocumentViewer.fullZoom;
         ]]></getter>
         <setter><![CDATA[
           this.markupDocumentViewer.fullZoom = val;
         ]]></setter>
       </property>
 
-      <property name="deviceFullZoom"
-                readonly="true">
-        <getter><![CDATA[
-          return this.markupDocumentViewer.deviceFullZoom;
-        ]]></getter>
-      </property>
-
       <property name="textZoom">
         <getter><![CDATA[
           return this.markupDocumentViewer.textZoom;
         ]]></getter>
         <setter><![CDATA[
           this.markupDocumentViewer.textZoom = val;
         ]]></setter>
       </property>