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

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

Issue 1870963002: Clean up CompositorPendingAnimations inclusion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 cb1f78ce9f058e1632701738d969c4b4da1ae0bf..40653dd8d99566416e253519b904b780bb365318 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/css/parser/CSSParserTokenRange.h"
#include "core/css/parser/CSSTokenizer.h"
+#include "core/dom/Element.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
#include "core/dom/IntersectionObserverCallback.h"
@@ -115,16 +116,13 @@ IntersectionObserver* IntersectionObserver::create(const IntersectionObserverIni
IntersectionObserver::IntersectionObserver(IntersectionObserverCallback& callback, Node& root, const Vector<Length>& rootMargin, const Vector<float>& thresholds)
: m_callback(&callback)
+ , m_root(&root)
, m_thresholds(thresholds)
, m_topMargin(Fixed)
, m_rightMargin(Fixed)
, m_bottomMargin(Fixed)
, m_leftMargin(Fixed)
{
- if (root.isDocumentNode())
- m_root = toDocument(root).ensureIntersectionObserverData().createWeakPtr(&root);
- else
- m_root = toElement(root).ensureIntersectionObserverData().createWeakPtr(&root);
switch (rootMargin.size()) {
case 0:
break;

Powered by Google App Engine
This is Rietveld 408576698