Bug 997101 - Remove the SetCSSViewport call in TabChild::Observe that needlessly sets a default value that results in a lot of expensive reflow. r=kats, a=lmandel
author"Kan-Ru Chen (陳侃如)" <kanru@kanru.info>
Sat, 06 Sep 2014 18:02:07 +0100
changeset 223107 b3d8b5ea20fde275a04a987cda071fdbfac12a7b
parent 223106 42be358fe96fb9693ee5f06149f2f46067cb3cac
child 223108 d5c8203fa93be23fc03b4fefb6a618b9347dd46e
push id4
push usergszorc@mozilla.com
push dateWed, 29 Oct 2014 02:48:29 +0000
reviewerskats, lmandel
bugs997101
milestone34.0a2
Bug 997101 - Remove the SetCSSViewport call in TabChild::Observe that needlessly sets a default value that results in a lot of expensive reflow. r=kats, a=lmandel
dom/ipc/TabChild.cpp
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -871,21 +871,16 @@ TabChild::Observe(nsISupports *aSubject,
       nsCOMPtr<nsIDocument> doc(GetDocument());
 
       if (SameCOMIdentity(subject, doc)) {
         nsCOMPtr<nsIDOMWindowUtils> utils(GetDOMWindowUtils());
         utils->SetIsFirstPaint(true);
 
         mContentDocumentIsDisplayed = true;
 
-        // Reset CSS viewport and zoom to default on new page, then
-        // calculate them properly using the actual metadata from the
-        // page.
-        SetCSSViewport(kDefaultViewportSize);
-
         // In some cases before-first-paint gets called before
         // RecvUpdateDimensions is called and therefore before we have an
         // mInnerSize value set. In such cases defer initializing the viewport
         // until we we get an inner size.
         if (HasValidInnerSize()) {
           InitializeRootMetrics();
           utils->SetResolution(mLastRootMetrics.mResolution.scale,
                                mLastRootMetrics.mResolution.scale);