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

Unified Diff: third_party/WebKit/Source/core/dom/ElementVisibilityObserver.h

Issue 2919543002: [ElementVisibilityObserver] Fix regression with default threshold (Closed)
Patch Set: Add link Created 3 years, 7 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 | « no previous file | third_party/WebKit/Source/core/dom/ElementVisibilityObserver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ElementVisibilityObserver.h
diff --git a/third_party/WebKit/Source/core/dom/ElementVisibilityObserver.h b/third_party/WebKit/Source/core/dom/ElementVisibilityObserver.h
index ef982b86225a44b8e8c7a90d1d210dbcbdce7805..fbc01973b1828a4a824ea8d26a9211abe4cd0db2 100644
--- a/third_party/WebKit/Source/core/dom/ElementVisibilityObserver.h
+++ b/third_party/WebKit/Source/core/dom/ElementVisibilityObserver.h
@@ -5,6 +5,8 @@
#ifndef ElementVisibilityObserver_h
#define ElementVisibilityObserver_h
+#include <limits>
+
#include "core/CoreExport.h"
#include "core/dom/IntersectionObserver.h"
#include "platform/heap/Heap.h"
@@ -34,7 +36,9 @@ class CORE_EXPORT ElementVisibilityObserver final
virtual ~ElementVisibilityObserver();
// The |threshold| is the minimum fraction that needs to be visible.
- void Start(float threshold = 0.0);
+ // See https://github.com/WICG/IntersectionObserver/issues/164 for why this
+ // defaults to std::numeric_limits<float>::min() rather than zero.
+ void Start(float threshold = std::numeric_limits<float>::min());
void Stop();
void DeliverObservationsForTesting();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ElementVisibilityObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698