mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1110277 patch 7 - Call CreateNeededFrames from ~ReframingStyleContexts. r=bzbarsky
I don't have any tests that exercise this code, and I can't even find a codepath that demonstrates that it's needed, since the lazy reconstruction that happens during style-triggered frame reconstruction all appears to go through PostRestyleEvent rather than MaybeConstructLazily. But I think we should either do this or add an assertion that it's not needed, and given that it's one line, it seems like we may as well just do it. (Note also that we're currently calling CreateNeededFrames at the start of style reresolution, in RestyleManager::ProcessPendingRestyles; this adds a call at the end.)
This commit is contained in:
parent
12c5e4084d
commit
c26ac88323
@ -995,6 +995,16 @@ RestyleManager::ReframingStyleContexts::ReframingStyleContexts(
|
||||
mRestyleManager->mReframingStyleContexts = this;
|
||||
}
|
||||
|
||||
RestyleManager::ReframingStyleContexts::~ReframingStyleContexts()
|
||||
{
|
||||
// Before we go away, we need to flush out any frame construction that
|
||||
// was enqueued, so that we start transitions.
|
||||
// Note that this is a little bit evil in that we're calling into code
|
||||
// that calls our member functions from our destructor, but it's at
|
||||
// the beginning of our destructor, so it shouldn't be too bad.
|
||||
mRestyleManager->mPresContext->FrameConstructor()->CreateNeededFrames();
|
||||
}
|
||||
|
||||
static inline dom::Element*
|
||||
ElementForStyleContext(nsIContent* aParentContent,
|
||||
nsIFrame* aFrame,
|
||||
|
@ -181,7 +181,7 @@ public:
|
||||
*/
|
||||
typedef nsRefPtrHashtable<nsRefPtrHashKey<nsIContent>, nsStyleContext>
|
||||
ReframingStyleContextTable;
|
||||
class MOZ_STACK_CLASS ReframingStyleContexts {
|
||||
class MOZ_STACK_CLASS ReframingStyleContexts MOZ_FINAL {
|
||||
public:
|
||||
/**
|
||||
* Construct a ReframingStyleContexts object. The caller must
|
||||
@ -190,6 +190,7 @@ public:
|
||||
* method of RestyleManager.)
|
||||
*/
|
||||
explicit ReframingStyleContexts(RestyleManager* aRestyleManager);
|
||||
~ReframingStyleContexts();
|
||||
|
||||
void Put(nsIContent* aContent, nsStyleContext* aStyleContext) {
|
||||
MOZ_ASSERT(aContent);
|
||||
|
Loading…
Reference in New Issue
Block a user