Bug 1072130 - Don't swap structs when we're reusing a style context from a previous same-style continuation. r=dbaron
authorCameron McCormack <cam@mcc.id.au>
Thu, 25 Sep 2014 15:51:43 +1000
changeset 207159 64136343bb4b3b6016b85c402b6b113ddf0a26d0
parent 207158 d4e7b198391cf5d89ef1a014a0f42f0840865eec
child 207160 d028712770a50a6b6a272f25c8613c2785a780a6
push id27546
push usercbook@mozilla.com
push dateThu, 25 Sep 2014 12:23:21 +0000
treeherdermozilla-central@c3660fb07ffd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1072130
milestone35.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 1072130 - Don't swap structs when we're reusing a style context from a previous same-style continuation. r=dbaron
layout/base/RestyleManager.cpp
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -3047,17 +3047,20 @@ ElementRestyler::RestyleSelf(nsIFrame* a
       // which is important to maintain various invariants about
       // frame types matching their style contexts.
       // Note that this check even makes sense if we didn't call
       // CaptureChange because of copyFromContinuation being true,
       // since we'll have copied the existing context from the
       // previous continuation, so newContext == oldContext.
 
       if (result != eRestyleResult_Stop) {
-        if (oldContext->IsShared() && newContext->IsShared()) {
+        if (copyFromContinuation) {
+          LOG_RESTYLE("not swapping style structs, since we copied from a "
+                      "continuation");
+        } else if (oldContext->IsShared() && newContext->IsShared()) {
           LOG_RESTYLE("not swapping style structs, since both old and contexts "
                       "are shared");
         } else if (oldContext->IsShared()) {
           LOG_RESTYLE("not swapping style structs, since the old context is "
                       "shared");
         } else if (newContext->IsShared()) {
           LOG_RESTYLE("not swapping style structs, since the new context is "
                       "shared");