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 222599 64136343bb4b3b6016b85c402b6b113ddf0a26d0
parent 222598 d4e7b198391cf5d89ef1a014a0f42f0840865eec
child 222600 d028712770a50a6b6a272f25c8613c2785a780a6
push id7107
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 17:43:31 +0000
treeherdermozilla-aurora@b4b34e0acc75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1072130
milestone35.0a1
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");