зеркало из https://github.com/mozilla/gecko-dev.git
Bug 560067 - Ensure visibility tracking code doesn't choke on visibility:hidden images. r=tnikkel
visibility: hidden still goes into BuildDisplayListForChild (because children might be visible), but the child itself might not be visible. Differential Revision: https://phabricator.services.mozilla.com/D122117
This commit is contained in:
Родитель
8bd5597bae
Коммит
cfb2c25163
|
@ -4181,13 +4181,15 @@ void nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
// REVIEW: Taken from nsBoxFrame::Paint
|
||||
// Don't paint our children if the theme object is a leaf.
|
||||
if (IsThemed(ourDisp) && !PresContext()->Theme()->WidgetIsContainer(
|
||||
ourDisp->EffectiveAppearance()))
|
||||
ourDisp->EffectiveAppearance())) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Since we're now sure that we're adding this frame to the display list
|
||||
// (which means we're painting it, modulo occlusion), mark it as visible
|
||||
// within the displayport.
|
||||
if (isPaintingToWindow && child->TrackingVisibility()) {
|
||||
if (isPaintingToWindow && child->TrackingVisibility() &&
|
||||
child->IsVisibleForPainting()) {
|
||||
child->PresShell()->EnsureFrameInApproximatelyVisibleList(child);
|
||||
awayFromCommonPath = true;
|
||||
}
|
||||
|
|
|
@ -2290,7 +2290,9 @@ already_AddRefed<imgIRequest> nsImageFrame::GetCurrentRequest() const {
|
|||
|
||||
void nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsDisplayListSet& aLists) {
|
||||
if (!IsVisibleForPainting()) return;
|
||||
if (!IsVisibleForPainting()) {
|
||||
return;
|
||||
}
|
||||
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче