Bug 1324619 part 2. Stop unnecessarily trying to reparent the style contexts of our kids in nsFirstLetterFrame::SetInitialChildList. r=emilio

The style contexts are already correct here; the frame constructor ensures that.

MozReview-Commit-ID: CWO225MB6Pe

--HG--
extra : rebase_source : ebc74ab507aaad6ac4c301cbbcdcab30ad3034d0
This commit is contained in:
Boris Zbarsky 2017-07-28 21:11:18 -04:00
Родитель 510ea95ba9
Коммит dbb8398bd1
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -77,12 +77,12 @@ nsFirstLetterFrame::SetInitialChildList(ChildListID aListID,
{
MOZ_ASSERT(aListID == kPrincipalList, "Principal child list is the only "
"list that nsFirstLetterFrame should set via this function");
RestyleManager* restyleManager = PresContext()->RestyleManager();
for (nsFrameList::Enumerator e(aChildList); !e.AtEnd(); e.Next()) {
NS_ASSERTION(e.get()->GetParent() == this, "Unexpected parent");
restyleManager->ReparentStyleContext(e.get());
nsLayoutUtils::MarkDescendantsDirty(e.get());
for (nsIFrame* f : aChildList) {
MOZ_ASSERT(f->GetParent() == this, "Unexpected parent");
MOZ_ASSERT(f->IsTextFrame(), "We should not have kids that are containers!");
MOZ_ASSERT_IF(f->StyleContext()->IsGecko(),
f->StyleContext()->AsGecko()->GetParent() == StyleContext());
nsLayoutUtils::MarkDescendantsDirty(f); // Drops cached textruns
}
mFrames.SetFrames(aChildList);