Bug 722325 - Revert bug 720987 for transformed frames. r=roc
authorChris Lord <chrislord.net@gmail.com>
Thu, 09 Feb 2012 16:42:14 +0100
changeset 89306 fe7a433de8ffa109f4b00308f6a1e46a16b1e31e
parent 89305 ca84ab42bd5ba7d402f92830a0efa0e94709ab02
child 89378 7b1ae353588637325d4fec9a7df890a080969799
push id783
push userlsblakk@mozilla.com
push dateTue, 24 Apr 2012 17:33:42 +0000
treeherdermozilla-beta@11faed19f136 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs722325, 720987
milestone13.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 722325 - Revert bug 720987 for transformed frames. r=roc 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
@@ -7986,17 +7986,27 @@ nsCSSFrameConstructor::ProcessRestyledFr
       }
       if (hint & (nsChangeHint_RepaintFrame | nsChangeHint_SyncFrameView |
                   nsChangeHint_UpdateOpacityLayer | nsChangeHint_UpdateTransformLayer)) {
         ApplyRenderingChangeToTree(presContext, frame, hint);
         didInvalidate = true;
       }
       if ((hint & nsChangeHint_UpdateOverflow) && !didReflow) {
         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()) {