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

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

Issue 1613543002: Use DOMHighResTimeStamp for notification time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Use DOMHighResTimeStamp in IntersectionObserverEntry Created 4 years, 11 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
Index: third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
index a32edd7be70bcdf562207bb7a3100af44988a3d6..c27f950971a1c5ec0c0e1f94dbd0db668b4435e3 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
@@ -122,7 +122,7 @@ bool IntersectionObservation::computeGeometry(IntersectionGeometry& geometry)
return true;
}
-void IntersectionObservation::computeIntersectionObservations(double timestamp)
+void IntersectionObservation::computeIntersectionObservations(DOMHighResTimeStamp timestamp)
{
// Pre-oilpan, there will be a delay between the time when the target Element gets deleted
// (because its ref count dropped to zero) and when this IntersectionObservation gets
@@ -149,7 +149,7 @@ void IntersectionObservation::computeIntersectionObservations(double timestamp)
unsigned newThresholdIndex = observer().firstThresholdGreaterThan(newVisibleRatio);
if (m_lastThresholdIndex != newThresholdIndex) {
IntersectionObserverEntry* newEntry = new IntersectionObserverEntry(
- timestamp / 1000.0,
+ timestamp,
pixelSnappedIntRect(geometry.targetRect),
pixelSnappedIntRect(geometry.rootRect),
pixelSnappedIntRect(geometry.intersectionRect),

Powered by Google App Engine
This is Rietveld 408576698