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

Unified Diff: Source/core/dom/Document.cpp

Issue 140763007: Begin removing the style recalc timer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 1e60754d36d15ddc0fbcf509b857f5b323b46c9f..0411b4fb44fabd775706a9f92728e886fd5530af 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1529,6 +1529,9 @@ PassRefPtr<TreeWalker> Document::createTreeWalker(Node* root, unsigned whatToSho
void Document::scheduleStyleRecalc()
{
+ if (!isActive())
+ return;
+
if (shouldDisplaySeamlesslyWithParent()) {
// When we're seamless, our parent document manages our style recalcs.
ownerElement()->setNeedsStyleRecalc();
@@ -1536,7 +1539,7 @@ void Document::scheduleStyleRecalc()
return;
}
- if (m_styleRecalcTimer.isActive())
+ if (m_styleRecalcTimer.isActive() || !shouldScheduleLayout())
esprehn 2014/01/23 22:13:00 Are we sure this is safe? It means we'll fail to s
abarth-chromium 2014/01/23 22:22:53 Nope.
return;
ASSERT(needsStyleRecalc() || childNeedsStyleRecalc() || childNeedsDistributionRecalc() || !m_useElementsNeedingUpdate.isEmpty());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698