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

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: Update test results 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 | « LayoutTests/fast/layout/common-ancestor-relayout-boundary-expected.txt ('k') | 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 ebac27d8d108f814270530cbbdfd86d5e4da2996..17a996519c05c215ea9cd390557f6baab3b96c78 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())
return;
ASSERT(needsStyleRecalc() || childNeedsStyleRecalc() || childNeedsDistributionRecalc() || !m_useElementsNeedingUpdate.isEmpty());
« no previous file with comments | « LayoutTests/fast/layout/common-ancestor-relayout-boundary-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698