зеркало из https://github.com/mozilla/gecko-dev.git
Bug 896138 patch 8: Add setter for RestyleManager::mInStyleRefresh rather than using friend. r=heycam (within review comments for patch 4)
(The friend declaration is still needed for access to RestyleElement, which I'd rather leave private.)
This commit is contained in:
Родитель
2e0c82c9c0
Коммит
0a56a39306
|
@ -179,6 +179,11 @@ public:
|
||||||
PostRestyleEventInternal(true);
|
PostRestyleEventInternal(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetInStyleRefresh(bool aInStyleRefresh)
|
||||||
|
{
|
||||||
|
mInStyleRefresh = aInStyleRefresh;
|
||||||
|
}
|
||||||
|
|
||||||
void FlushOverflowChangedTracker()
|
void FlushOverflowChangedTracker()
|
||||||
{
|
{
|
||||||
mOverflowChangedTracker.Flush();
|
mOverflowChangedTracker.Flush();
|
||||||
|
@ -255,7 +260,7 @@ public:
|
||||||
private:
|
private:
|
||||||
/* aMinHint is the minimal change that should be made to the element */
|
/* aMinHint is the minimal change that should be made to the element */
|
||||||
// XXXbz do we really need the aPrimaryFrame argument here?
|
// XXXbz do we really need the aPrimaryFrame argument here?
|
||||||
void RestyleElement(Element* aElement,
|
void RestyleElement(Element* aElement,
|
||||||
nsIFrame* aPrimaryFrame,
|
nsIFrame* aPrimaryFrame,
|
||||||
nsChangeHint aMinHint,
|
nsChangeHint aMinHint,
|
||||||
RestyleTracker& aRestyleTracker,
|
RestyleTracker& aRestyleTracker,
|
||||||
|
|
|
@ -139,7 +139,7 @@ RestyleTracker::DoProcessRestyles()
|
||||||
// processing restyles
|
// processing restyles
|
||||||
mRestyleManager->PresContext()->FrameConstructor()->BeginUpdate();
|
mRestyleManager->PresContext()->FrameConstructor()->BeginUpdate();
|
||||||
|
|
||||||
mRestyleManager->mInStyleRefresh = true;
|
mRestyleManager->SetInStyleRefresh(true);
|
||||||
|
|
||||||
// loop so that we process any restyle events generated by processing
|
// loop so that we process any restyle events generated by processing
|
||||||
while (mPendingRestyles.Count()) {
|
while (mPendingRestyles.Count()) {
|
||||||
|
@ -241,9 +241,9 @@ RestyleTracker::DoProcessRestyles()
|
||||||
|
|
||||||
mRestyleManager->FlushOverflowChangedTracker();
|
mRestyleManager->FlushOverflowChangedTracker();
|
||||||
|
|
||||||
// Set mInStyleRefresh to false now, since the EndUpdate call might
|
// SetInStyleRefresh(false) now, since the EndUpdate call might
|
||||||
// add more restyles.
|
// add more restyles.
|
||||||
mRestyleManager->mInStyleRefresh = false;
|
mRestyleManager->SetInStyleRefresh(false);
|
||||||
|
|
||||||
mRestyleManager->PresContext()->FrameConstructor()->EndUpdate();
|
mRestyleManager->PresContext()->FrameConstructor()->EndUpdate();
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче