Chromium Code Reviews| 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 3aa1f7a61faeb1db5ac1fca3d07815e4beede129..47d0bc30dae330814b1d7176eac6d78dc28c8078 100644 |
| --- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp |
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp |
| @@ -15,6 +15,7 @@ |
| #include "core/dom/IntersectionObserverEntry.h" |
| #include "core/dom/IntersectionObserverInit.h" |
| #include "core/dom/NodeIntersectionObserverData.h" |
| +#include "core/frame/FrameView.h" |
| #include "core/html/HTMLFrameOwnerElement.h" |
| #include "core/layout/LayoutView.h" |
| #include "core/timing/DOMWindowPerformance.h" |
| @@ -183,6 +184,10 @@ void IntersectionObserver::observe(Element* target) |
| IntersectionObservation* observation = new IntersectionObservation(*this, *target, shouldReportRootBounds); |
| target->ensureIntersectionObserverData().addObservation(*observation); |
| m_observations.add(observation); |
| + if (!rootFrame) |
| + return; |
| + if (FrameView* rootFrameView = rootFrame->view()) |
| + rootFrameView->scheduleAnimation(); |
|
esprehn
2016/05/20 22:40:52
I think this is probably broken for OOPIF, we need
szager1
2016/05/20 22:42:12
Oh yes, undoubtedly, IO is completely broken for O
|
| } |
| void IntersectionObserver::unobserve(Element* target) |