Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(789)

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObserver.cpp

Issue 1826323002: IntersectionObserver: use edge-inclusive geometry for intersections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer-inclusive-geometry
Patch Set: refactor Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObservation.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
index 847b288ad50159636e8b905ad715a5879a417280..dac0764a9d9b2566dd22bcdbdcdc0221bbb91926 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
@@ -290,13 +290,6 @@ void IntersectionObserver::applyRootMargin(LayoutRect& rect) const
unsigned IntersectionObserver::firstThresholdGreaterThan(float ratio) const
{
unsigned result = 0;
-
- // Special handling for zero threshold, which means "any non-zero number of pixels."
- // If the ratio is zero, then it should be treated as smaller than any threshold,
- // even a zero threshold.
- if (!ratio)
- return 0;
-
while (result < m_thresholds.size() && m_thresholds[result] <= ratio)
++result;
return result;
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObservation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698