| 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 85dc34831757df6dfc68c3aa100ba96d0073f147..913662e99f0a8fac218b1e2a6bc110f15c901fa4 100644
|
| --- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| @@ -242,35 +242,21 @@ void IntersectionObserver::observe(Element* target,
|
| if (target->ensureIntersectionObserverData().getObservationFor(*this))
|
| return;
|
|
|
| - bool isDOMDescendant = true;
|
| - bool shouldReportRootBounds = false;
|
| + bool shouldReportRootBounds = true;
|
| if (rootIsImplicit()) {
|
| Frame* rootFrame = targetFrame->tree().top();
|
| DCHECK(rootFrame);
|
| - if (rootFrame == targetFrame) {
|
| - shouldReportRootBounds = true;
|
| - } else {
|
| + if (rootFrame != targetFrame) {
|
| shouldReportRootBounds =
|
| targetFrame->securityContext()->getSecurityOrigin()->canAccess(
|
| rootFrame->securityContext()->getSecurityOrigin());
|
| }
|
| - } else {
|
| - shouldReportRootBounds = true;
|
| - isDOMDescendant = root()->isShadowIncludingInclusiveAncestorOf(target);
|
| }
|
|
|
| IntersectionObservation* observation =
|
| new IntersectionObservation(*this, *target, shouldReportRootBounds);
|
| target->ensureIntersectionObserverData().addObservation(*observation);
|
| m_observations.add(observation);
|
| -
|
| - if (!isDOMDescendant) {
|
| - root()->document().addConsoleMessage(
|
| - ConsoleMessage::create(JSMessageSource, WarningMessageLevel,
|
| - "IntersectionObserver.observe(target): target "
|
| - "element is not a descendant of root."));
|
| - }
|
| -
|
| if (FrameView* frameView = targetFrame->view())
|
| frameView->scheduleAnimation();
|
| }
|
|
|