Bug 625289 patch 3 - Add types for storing the style contexts of elements currently being reframed. r=heycam

This commit is contained in:
L. David Baron 2014-08-13 15:39:01 -07:00
parent c04b04986e
commit 88fff1692f

View File

@ -16,6 +16,7 @@
#include "RestyleTracker.h"
#include "nsPresContext.h"
#include "nsRefreshDriver.h"
#include "nsRefPtrHashtable.h"
class nsIFrame;
class nsStyleChangeList;
@ -131,6 +132,24 @@ public:
// itself.
nsresult ProcessRestyledFrames(nsStyleChangeList& aRestyleArray);
/**
* In order to start CSS transitions on elements that are being
* reframed, we need to stash their style contexts somewhere during
* the reframing process.
*
* In all cases, the content node in the hash table is the real
* content node, not the anonymous content node we create for ::before
* or ::after.
*/
typedef nsRefPtrHashtable<nsRefPtrHashKey<nsIContent>, nsStyleContext>
ReframingStyleContextTable;
class ReframingStyleContexts {
private:
ReframingStyleContextTable mElementContexts;
ReframingStyleContextTable mBeforePseudoContexts;
ReframingStyleContextTable mAfterPseudoContexts;
};
private:
void RestyleForEmptyChange(Element* aContainer);