Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2140983003: Early out for inactive documents in FrameView lifecycle updating functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/FramePainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e00f51476cdb872eb478c6c3c7e89273fa6f09c9..b6c32b750da6a3cd25db466de3e2ff0a8491de07 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -2518,6 +2518,9 @@ void FrameView::updateLifecyclePhasesInternal(DocumentLifecycle::LifecycleState
|| targetState == DocumentLifecycle::PrePaintClean
|| targetState == DocumentLifecycle::PaintClean);
+ if (!m_frame->document()->isActive())
+ return;
+
TemporaryChange<DocumentLifecycle::LifecycleState> targetStateScope(m_currentUpdateLifecyclePhasesTargetState, targetState);
if (shouldThrottleRendering()) {
@@ -2683,7 +2686,7 @@ void FrameView::updateStyleAndLayoutIfNeededRecursive()
void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal()
{
- if (shouldThrottleRendering())
+ if (shouldThrottleRendering() || !m_frame->document()->isActive())
return;
ScopedFrameBlamer frameBlamer(m_frame);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/FramePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698