[css-anchor-position] Remove unnecessary visibility observer threshold
Position-visibility: anchors-visible only needs to observe when an
anchor transitions between being fully-clipped and not-fully-clipped.
Because of this, we only need to use a minimum intersection observer
threshold, and can remove the additional threshold value of 1.
Bug: 329703412
Change-Id: Ice9cbacb096bd838274124d738e62b2ceccc509b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5431840
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Auto-Submit: Philip Rogers <pdr@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1284026}
diff --git a/third_party/blink/renderer/core/layout/anchor_position_visibility_observer.cc b/third_party/blink/renderer/core/layout/anchor_position_visibility_observer.cc
index ba2c7cd..fe8fd077 100644
--- a/third_party/blink/renderer/core/layout/anchor_position_visibility_observer.cc
+++ b/third_party/blink/renderer/core/layout/anchor_position_visibility_observer.cc
@@ -43,7 +43,7 @@
std::nullopt,
IntersectionObserver::Params{
.root = root,
- .thresholds = {IntersectionObserver::kMinimumThreshold, 1.0f},
+ .thresholds = {IntersectionObserver::kMinimumThreshold},
.behavior = IntersectionObserver::kDeliverDuringPostLayoutSteps,
});
// TODO(pdr): Refactor intersection observer to take const objects.