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

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

Issue 2610963003: Get rid of obsolete FrameView::m_shouldUpdateViewportIntersection. (Closed)
Patch Set: rebase Created 3 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/IntersectionObserver.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
index eade5171943781f148713d6be880359e56c06682..838f8cf59f95e7ccbfe92a3858f9c4a7c4971ad0 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
@@ -220,17 +220,12 @@ bool IntersectionObserver::rootIsValid() const {
}
Document& IntersectionObserver::trackingDocument() const {
- Document* document = nullptr;
if (rootIsImplicit()) {
DCHECK(m_callback->getExecutionContext());
- document = toDocument(m_callback->getExecutionContext());
- } else {
- DCHECK(root());
- document = &root()->document();
+ return *toDocument(m_callback->getExecutionContext());
}
- DCHECK(document);
- DCHECK(document->frame());
- return *document->frame()->localFrameRoot()->document();
+ DCHECK(root());
+ return root()->document();
}
void IntersectionObserver::observe(Element* target,

Powered by Google App Engine
This is Rietveld 408576698