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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1552213002: Implement suspend/resume for IntersectionObserver notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer
Patch Set: Create IntersectionObserverController on demand 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObserverController.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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 4e44017bb31be1e9e973df281a7f24a76292cfb6..8e3966173f04510d92f6e7aa796d111483da55b4 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3959,8 +3959,8 @@ void FrameView::updateViewportIntersectionsForSubtree(LifeCycleUpdateOption phas
updateViewportIntersectionIfNeeded();
// Notify javascript IntersectionObservers
- if (phases == AllPhases)
- frame().document()->ensureIntersectionObserverController().computeTrackedIntersectionObservations();
+ if (phases == AllPhases && frame().document()->intersectionObserverController())
+ frame().document()->intersectionObserverController()->computeTrackedIntersectionObservations();
// Adjust render throttling for iframes based on visibility
bool shouldNotify = !hadValidIntersection || hadEmptyIntersection != m_viewportIntersection.isEmpty();
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698