From 86de53b54901478941da952538617eb98bf9f1a3 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Wed, 13 Aug 2014 15:39:01 -0700 Subject: [PATCH] Bug 625289 patch 5 - Create a ReframingStyleContexts struct during restyling. r=heycam --- layout/base/RestyleManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 004a61c5d16a..482b9612c181 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -3076,6 +3076,13 @@ RestyleManager::ComputeAndProcessStyleChange(nsIFrame* aFrame, RestyleTracker& aRestyleTracker, nsRestyleHint aRestyleHint) { + // Create a ReframingStyleContexts struct on the stack and put it in + // our mReframingStyleContexts for the scope of this function. + MOZ_ASSERT(!mReframingStyleContexts, "shouldn't call recursively"); + AutoRestore ar(mReframingStyleContexts); + ReframingStyleContexts reframingStyleContexts; + mReframingStyleContexts = &reframingStyleContexts; + nsStyleChangeList changeList; ComputeStyleChangeFor(aFrame, &changeList, aMinChange, aRestyleTracker, aRestyleHint);