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

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

Issue 2553103004: Refactor IntersectionGeometry class and move it to core/layout. (Closed)
Patch Set: Simplify isContainingBlockChainDescendant Created 4 years 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/IntersectionObserver.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
index 09e1dc56fbee1336102c78cb58183102b4c46a70..bb69ebb03c1e0c746a8d602ef7b8391fd2812806 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
@@ -270,11 +270,8 @@ void IntersectionObserver::observe(Element* target,
isDOMDescendant = (targetFrame->tree().top() == rootFrame);
}
- IntersectionObservation* observation = new IntersectionObservation(
- *this, *target,
- shouldReportRootBounds
- ? IntersectionGeometry::ReportRootBounds::kShouldReportRootBounds
- : IntersectionGeometry::ReportRootBounds::kShouldNotReportRootBounds);
+ IntersectionObservation* observation =
+ new IntersectionObservation(*this, *target, shouldReportRootBounds);
target->ensureIntersectionObserverData().addObservation(*observation);
m_observations.add(observation);

Powered by Google App Engine
This is Rietveld 408576698