зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1575138 - Do not schedule reconstruction for <slot> if there's no fallback. r=smaug
Just realized that we probably want this too. Differential Revision: https://phabricator.services.mozilla.com/D46898 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ac737899a9
Коммит
28b566cf8f
|
@ -638,7 +638,8 @@ void ShadowRoot::MaybeSlotHostChild(nsIContent& aChild) {
|
|||
}
|
||||
|
||||
// Fallback content will go away, let layout know.
|
||||
if (assignment.mSlot->AssignedNodes().IsEmpty()) {
|
||||
if (assignment.mSlot->AssignedNodes().IsEmpty() &&
|
||||
assignment.mSlot->HasChildren()) {
|
||||
InvalidateStyleAndLayoutOnSubtree(assignment.mSlot);
|
||||
}
|
||||
|
||||
|
|
|
@ -2860,7 +2860,7 @@ void PresShell::SlotAssignmentWillChange(Element& aElement,
|
|||
if (aNewSlot) {
|
||||
// If the new slot will stop showing fallback content, we need to reframe it
|
||||
// altogether.
|
||||
if (aNewSlot->AssignedNodes().IsEmpty()) {
|
||||
if (aNewSlot->AssignedNodes().IsEmpty() && aNewSlot->HasChildren()) {
|
||||
DestroyFramesForAndRestyle(aNewSlot);
|
||||
// Otherwise we just care about the element, but we need to ensure that
|
||||
// something takes care of traversing to the relevant slot, if needed.
|
||||
|
|
Загрузка…
Ссылка в новой задаче