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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user