зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1400618 part 6 - Remove the workaround for the broken IsPrimaryFrame() in nsFrame::DestroyFrom since it now works also for NAC frames. r=bz
MozReview-Commit-ID: 1DFyWZBpzwP
This commit is contained in:
Родитель
c908bacce6
Коммит
652757273a
|
@ -763,14 +763,7 @@ nsFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData)
|
|||
}
|
||||
}
|
||||
|
||||
// XXXneerja All instances of 'mContent->GetPrimaryFrame() == this' have been
|
||||
// replaced with IsPrimaryFrame() except for this one. The reason is that
|
||||
// for native anonymous content our subclass Destroy method has already
|
||||
// called UnbindFromTree so nsINode::mSubtreeRoot might be in use here and
|
||||
// we don't want to call mContent->SetPrimaryFrame(nullptr) in that case.
|
||||
// (bug 1400618 will fix that order)
|
||||
bool isPrimaryFrame = (mContent && mContent->GetPrimaryFrame() == this);
|
||||
if (isPrimaryFrame) {
|
||||
if (IsPrimaryFrame()) {
|
||||
// This needs to happen before we clear our Properties() table.
|
||||
ActiveLayerTracker::TransferActivityToContent(this, mContent);
|
||||
|
||||
|
@ -825,7 +818,7 @@ nsFrame::DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData)
|
|||
}
|
||||
|
||||
// Make sure that our deleted frame can't be returned from GetPrimaryFrame()
|
||||
if (isPrimaryFrame) {
|
||||
if (IsPrimaryFrame()) {
|
||||
mContent->SetPrimaryFrame(nullptr);
|
||||
|
||||
// Pass the root of a generated content subtree (e.g. ::after/::before) to
|
||||
|
|
Загрузка…
Ссылка в новой задаче