| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index d27feb25d9efcfc466580789bf8518fade265c11..c1e3d78b6464b94998f9c19fa9735bae22faf166 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -1089,6 +1089,27 @@ void FrameView::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidation
|
|
|
| m_doFullPaintInvalidation = false;
|
| lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean);
|
| +
|
| + if (RuntimeEnabledFeatures::intersectionObserverEnabled()) {
|
| + computeIntersectionObservations(paintInvalidationState);
|
| + }
|
| +}
|
| +
|
| +void FrameView::computeIntersectionObservations(PaintInvalidationState& paintInvalidationState)
|
| +{
|
| + ASSERT(layoutView());
|
| +
|
| + if (FrameView* parent = parentFrameView()) {
|
| + m_clippedBounds = IntRect(frameRect().location(), paintInvalidationState.clipRect().pixelSnappedSize());
|
| + m_clippedBounds = parent->contentsToRootFrame(m_clippedBounds);
|
| + m_clippedBounds.intersect(parent->contentsToRootFrame(parent->m_clippedBounds));
|
| + if (!m_clippedBounds.isEmpty())
|
| + m_clippedBounds = rootFrameToContents(m_clippedBounds);
|
| + } else {
|
| + m_clippedBounds = pixelSnappedIntRect(paintInvalidationState.clipRect());
|
| + }
|
| +
|
| + layoutView()->computeIntersectionObservations(FloatRect(m_clippedBounds));
|
| }
|
|
|
| DocumentLifecycle& FrameView::lifecycle() const
|
|
|