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 641b2a0d86fb9a82a67cadc97abd57c5274632fe..12a869f3d0db11b7116547a95fa26004ae036169 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -4753,8 +4753,16 @@ void FrameView::updateRenderThrottlingStatusForTesting() { |
m_visibilityObserver->deliverObservationsForTesting(); |
} |
+void FrameView::crossOriginStatusChanged() { |
+ // Cross-domain status is not stored as a dirty bit within FrameView, |
+ // so force-invalidate throttling status when it changes regardless of |
+ // previous or new value. |
+ updateRenderThrottlingStatus(m_hiddenForThrottling, m_subtreeThrottled, true); |
+} |
+ |
void FrameView::updateRenderThrottlingStatus(bool hidden, |
- bool subtreeThrottled) { |
+ bool subtreeThrottled, |
+ bool forceThrottlingInvalidation) { |
TRACE_EVENT0("blink", "FrameView::updateRenderThrottlingStatus"); |
DCHECK(!isInPerformLayout()); |
DCHECK(!m_frame->document() || !m_frame->document()->inStyleRecalc()); |
@@ -4775,7 +4783,7 @@ void FrameView::updateRenderThrottlingStatus(bool hidden, |
// paint one of the children with an out-of-date layout before |
// |updateRenderThrottlingStatus| has made it throttled or 2) fail to |
// unthrottle a child whose parent is unthrottled by a later notification. |
- if (wasThrottled != isThrottled) { |
+ if (wasThrottled != isThrottled || forceThrottlingInvalidation) { |
for (const Member<Widget>& child : *children()) { |
if (child->isFrameView()) { |
FrameView* childView = toFrameView(child); |
@@ -4786,7 +4794,7 @@ void FrameView::updateRenderThrottlingStatus(bool hidden, |
} |
ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(); |
- if (becameUnthrottled) { |
+ if (becameUnthrottled || forceThrottlingInvalidation) { |
// ScrollingCoordinator needs to update according to the new throttling |
// status. |
if (scrollingCoordinator) |