Bug 967671 - Set nsGfxScrollFrame's mOriginOfLastScroll default to 'other', insures apzc will receive a scroll offset update when frames are created. Also remove display port reset in metrofx front end code when window size changes. r=kats, r=tnikkel, a=sledru
authorJim Mathies <jmathies@mozilla.com>
Sat, 15 Feb 2014 07:06:27 -0600
changeset 176330 ca5a047a97d53c07a25e432d96a50e57c628cac5
parent 176329 ecb9afc1ea95a3f6a344268f4af1a7d3876f6906
child 176331 e8f98bacb0b2420efa8c8855af309ce16d3f859d
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats, tnikkel, sledru
bugs967671
milestone28.0
Bug 967671 - Set nsGfxScrollFrame's mOriginOfLastScroll default to 'other', insures apzc will receive a scroll offset update when frames are created. Also remove display port reset in metrofx front end code when window size changes. r=kats, r=tnikkel, a=sledru
browser/metro/base/content/apzc.js
layout/generic/nsGfxScrollFrame.cpp
--- a/browser/metro/base/content/apzc.js
+++ b/browser/metro/base/content/apzc.js
@@ -25,40 +25,36 @@ var APZCObserver = {
     this._enabled = Services.prefs.getBoolPref(kAsyncPanZoomEnabled);
     if (!this._enabled) {
       return;
     }
 
     let os = Services.obs;
     os.addObserver(this, "apzc-transform-begin", false);
 
-    // Fired by ContentAreaObserver
-    window.addEventListener("SizeChanged", this, true);
     Elements.tabList.addEventListener("TabSelect", this, true);
     Elements.browsers.addEventListener("pageshow", this, true);
     messageManager.addMessageListener("Content:ZoomToRect", this);
   },
 
   shutdown: function shutdown() {
     if (!this._enabled) {
       return;
     }
 
     let os = Services.obs;
     os.removeObserver(this, "apzc-transform-begin");
 
-    window.removeEventListener("SizeChanged", this, true);
     Elements.tabList.removeEventListener("TabSelect", this, true);
     Elements.browsers.removeEventListener("pageshow", this, true);
     messageManager.removeMessageListener("Content:ZoomToRect", this);
   },
 
   handleEvent: function APZC_handleEvent(aEvent) {
     switch (aEvent.type) {
-      case "SizeChanged":
       case 'TabSelect':
         this._resetDisplayPort();
         break;
 
       case 'pageshow':
         if (aEvent.target != Browser.selectedBrowser.contentDocument) {
           break;
         }
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -1532,17 +1532,17 @@ ScrollFrameHelper::ScrollFrameHelper(nsC
                                              bool aIsRoot)
   : mHScrollbarBox(nullptr)
   , mVScrollbarBox(nullptr)
   , mScrolledFrame(nullptr)
   , mScrollCornerBox(nullptr)
   , mResizerBox(nullptr)
   , mOuter(aOuter)
   , mAsyncScroll(nullptr)
-  , mOriginOfLastScroll(nullptr)
+  , mOriginOfLastScroll(nsGkAtoms::other)
   , mDestination(0, 0)
   , mScrollPosAtLastPaint(0, 0)
   , mRestorePos(-1, -1)
   , mLastPos(-1, -1)
   , mScrollPosForLayerPixelAlignment(-1, -1)
   , mLastUpdateImagesPos(-1, -1)
   , mNeverHasVerticalScrollbar(false)
   , mNeverHasHorizontalScrollbar(false)