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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1330633003: Intersection Observer first draft Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Lost newline in merge Created 5 years, 3 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 80565df0ef762904c649c481e51d244adfde82f2..a276365074fcc62eec7c0a20d231695b47fd1241 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2468,6 +2468,9 @@ void LayoutObject::willBeDestroyed()
if (frameView())
setIsSlowRepaintObject(false);
+
+ if (view() && hasIntersectionObserver())
+ view()->removeIntersectionObserverTarget(this);
}
void LayoutObject::insertedIntoTree()
@@ -2496,6 +2499,9 @@ void LayoutObject::insertedIntoTree()
if (LayoutFlowThread* flowThread = flowThreadContainingBlock())
flowThread->flowThreadDescendantWasInserted(this);
+
+ if (view() && hasIntersectionObserver())
+ view()->addIntersectionObserverTarget(this);
}
void LayoutObject::willBeRemovedFromTree()
@@ -2525,6 +2531,9 @@ void LayoutObject::willBeRemovedFromTree()
// Update cached boundaries in SVG layoutObjects if a child is removed.
if (parent()->isSVG())
parent()->setNeedsBoundariesUpdate();
+
+ if (view() && hasIntersectionObserver())
+ view()->removeIntersectionObserverTarget(this);
}
void LayoutObject::removeFromLayoutFlowThread()
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698