| 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 20f073c65f2843de195fb4bc8dcecab6d2d9e568..a0d27c975a50c86f6a5402efcf74b193c12b1f2f 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -4603,6 +4603,13 @@ void FrameView::updateViewportIntersectionsForSubtree(
|
| ->intersectionObserverController()
|
| ->computeTrackedIntersectionObservations();
|
|
|
| + // Don't throttle display:none frames (see updateRenderThrottlingStatus).
|
| + HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner();
|
| + if (m_hiddenForThrottling && ownerElement && !ownerElement->layoutObject()) {
|
| + updateRenderThrottlingStatus(m_hiddenForThrottling, m_subtreeThrottled);
|
| + DCHECK(!canThrottleRendering());
|
| + }
|
| +
|
| for (Frame* child = m_frame->tree().firstChild(); child;
|
| child = child->tree().nextSibling()) {
|
| if (!child->isLocalFrame())
|
| @@ -4623,9 +4630,11 @@ void FrameView::updateRenderThrottlingStatus(bool hidden,
|
| DCHECK(!m_frame->document() || !m_frame->document()->inStyleRecalc());
|
| bool wasThrottled = canThrottleRendering();
|
|
|
| - // Note that we disallow throttling of 0x0 frames because some sites use
|
| - // them to drive UI logic.
|
| - m_hiddenForThrottling = hidden && !frameRect().isEmpty();
|
| + // Note that we disallow throttling of 0x0 and display:none frames because
|
| + // some sites use them to drive UI logic.
|
| + HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner();
|
| + m_hiddenForThrottling = hidden && !frameRect().isEmpty() &&
|
| + (ownerElement && ownerElement->layoutObject());
|
| m_subtreeThrottled = subtreeThrottled;
|
|
|
| bool isThrottled = canThrottleRendering();
|
|
|