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

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

Issue 2859543003: Don't run IntersectionObserver lifecycle in frames with dirty layout. (Closed)
Patch Set: Run RecordDeferredLoadingStats even if layout is dirty. Created 3 years, 8 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 | 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 5e8e7341e02c6ab8a2594ca484eea4a8b104ed0b..9a8cac29f64884212a3a39725332b4245446e9da 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4907,12 +4907,14 @@ void FrameView::UpdateViewportIntersectionsForSubtree(
if (target_state == DocumentLifecycle::kPaintClean) {
RecordDeferredLoadingStats();
- // Notify javascript IntersectionObservers
- if (GetFrame().GetDocument()->GetIntersectionObserverController()) {
- GetFrame()
- .GetDocument()
- ->GetIntersectionObserverController()
- ->ComputeTrackedIntersectionObservations();
+ if (!NeedsLayout()) {
+ // Notify javascript IntersectionObservers
+ if (GetFrame().GetDocument()->GetIntersectionObserverController()) {
+ GetFrame()
+ .GetDocument()
+ ->GetIntersectionObserverController()
+ ->ComputeTrackedIntersectionObservations();
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698