Backed out changeset d9e8e468a2f2 (bug 1866566) for wpt failures on content-visibility-animation-with-scroll-timeline-in-hidden-subtree.html.

This commit is contained in:
Cosmin Sabou
2023-12-05 18:59:19 +02:00
parent 00064cd24c
commit 424d51a33c
24 changed files with 18 additions and 335 deletions

View File

@@ -11950,15 +11950,8 @@ void PresShell::UpdateRelevancyOfContentVisibilityAutoFrames() {
return;
}
bool isRelevantContentChanged = false;
for (nsIFrame* frame : mContentVisibilityAutoFrames) {
isRelevantContentChanged |=
frame->UpdateIsRelevantContent(mContentVisibilityRelevancyToUpdate);
}
if (isRelevantContentChanged) {
if (nsPresContext* presContext = GetPresContext()) {
presContext->UpdateHiddenByContentVisibilityForAnimations();
}
frame->UpdateIsRelevantContent(mContentVisibilityRelevancyToUpdate);
}
mContentVisibilityRelevancyToUpdate.clear();
@@ -11992,7 +11985,6 @@ PresShell::ProximityToViewportResult PresShell::DetermineProximityToViewport() {
auto input = DOMIntersectionObserver::ComputeInput(
*mDocument, /* aRoot = */ nullptr, &rootMargin);
bool isRelevantContentChanged = false;
for (nsIFrame* frame : mContentVisibilityAutoFrames) {
auto* element = frame->GetContent()->AsElement();
result.mAnyScrollIntoViewFlag |=
@@ -12013,8 +12005,7 @@ PresShell::ProximityToViewportResult PresShell::DetermineProximityToViewport() {
.Intersects();
element->SetVisibleForContentVisibility(intersects);
if (oldVisibility.isNothing() || *oldVisibility != intersects) {
isRelevantContentChanged |=
frame->UpdateIsRelevantContent(ContentRelevancyReason::Visible);
frame->UpdateIsRelevantContent(ContentRelevancyReason::Visible);
}
// 14.2.3.3
@@ -12022,11 +12013,6 @@ PresShell::ProximityToViewportResult PresShell::DetermineProximityToViewport() {
result.mHadInitialDetermination = true;
}
}
if (isRelevantContentChanged) {
if (nsPresContext* presContext = GetPresContext()) {
presContext->UpdateHiddenByContentVisibilityForAnimations();
}
}
return result;
}