Bug 722325 - Revert bug 720987 for transformed frames. r=roc a=akeybl
authorChris Lord <chrislord.net@gmail.com>
Wed, 01 Feb 2012 08:50:24 +0000
changeset 88306 73f3d8eeb937f4c73472268ba72791d92e6a8ef4
parent 88305 63278b4cbe87bb63f1211bd7adcdabbec33bd5d6
child 88307 e6022b12e254735d6e7640f30595c99ab40d47e4
push id674
push userffxbld
push dateTue, 13 Mar 2012 21:17:50 +0000
treeherdermozilla-beta@e3c4c92dec31 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, akeybl
bugs722325, 720987
milestone12.0a2
Bug 722325 - Revert bug 720987 for transformed frames. r=roc a=akeybl The fix checked in for bug 720987 caused a major rendering regression with native fennec. Revert it for transformed frames until the correct fix is found.
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -8016,17 +8016,27 @@ nsCSSFrameConstructor::ProcessRestyledFr
       }
       if (hint & (nsChangeHint_RepaintFrame | nsChangeHint_SyncFrameView |
                   nsChangeHint_UpdateOpacityLayer | nsChangeHint_UpdateTransformLayer)) {
         ApplyRenderingChangeToTree(presContext, frame, hint);
         didInvalidate = true;
       }
       if (hint & nsChangeHint_UpdateOverflow) {
         while (frame) {
-          frame->UpdateOverflow();
+          nsOverflowAreas* pre = static_cast<nsOverflowAreas*>
+            (frame->Properties().Get(frame->PreTransformOverflowAreasProperty()));
+          if (pre) {
+            // FinishAndStoreOverflow will change the overflow areas passed in,
+            // so make a copy.
+            nsOverflowAreas overflowAreas = *pre;
+            frame->FinishAndStoreOverflow(overflowAreas, frame->GetSize());
+          } else {
+            frame->UpdateOverflow();
+          }
+
           nsIFrame* next =
             nsLayoutUtils::GetNextContinuationOrSpecialSibling(frame);
           // Update the ancestors' overflow after we have updated the overflow
           // for all the continuations with the same parent.
           if (!next || frame->GetParent() != next->GetParent()) {
             for (nsIFrame* ancestor = frame->GetParent(); ancestor;
                  ancestor = ancestor->GetParent()) {
               if (!ancestor->UpdateOverflow()) {