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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1866303002: Rename Document::hasPendingStyleRecalc to hasPendingVisualUpdate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise description of commit message Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 // InPreLayout will recalc style itself. There's no reason to schedule anoth er recalc. 1552 // InPreLayout will recalc style itself. There's no reason to schedule anoth er recalc.
1553 if (m_lifecycle.state() == DocumentLifecycle::InPreLayout) 1553 if (m_lifecycle.state() == DocumentLifecycle::InPreLayout)
1554 return false; 1554 return false;
1555 if (!shouldScheduleLayout()) 1555 if (!shouldScheduleLayout())
1556 return false; 1556 return false;
1557 return true; 1557 return true;
1558 } 1558 }
1559 1559
1560 void Document::scheduleLayoutTreeUpdate() 1560 void Document::scheduleLayoutTreeUpdate()
1561 { 1561 {
1562 ASSERT(!hasPendingStyleRecalc()); 1562 ASSERT(!hasPendingVisualUpdate());
1563 ASSERT(shouldScheduleLayoutTreeUpdate()); 1563 ASSERT(shouldScheduleLayoutTreeUpdate());
1564 ASSERT(needsLayoutTreeUpdate()); 1564 ASSERT(needsLayoutTreeUpdate());
1565 1565
1566 if (!view()->canThrottleRendering()) 1566 if (!view()->canThrottleRendering())
1567 page()->animator().scheduleVisualUpdate(frame()); 1567 page()->animator().scheduleVisualUpdate(frame());
1568 m_lifecycle.ensureStateAtMost(DocumentLifecycle::VisualUpdatePending); 1568 m_lifecycle.ensureStateAtMost(DocumentLifecycle::VisualUpdatePending);
1569 1569
1570 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Schedu leStyleRecalculation", TRACE_EVENT_SCOPE_THREAD, "data", InspectorRecalculateSty lesEvent::data(frame())); 1570 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Schedu leStyleRecalculation", TRACE_EVENT_SCOPE_THREAD, "data", InspectorRecalculateSty lesEvent::data(frame()));
1571 InspectorInstrumentation::didScheduleStyleRecalculation(this); 1571 InspectorInstrumentation::didScheduleStyleRecalculation(this);
1572 1572
1573 ++m_styleVersion; 1573 ++m_styleVersion;
1574 } 1574 }
1575 1575
1576 bool Document::hasPendingForcedStyleRecalc() const 1576 bool Document::hasPendingForcedStyleRecalc() const
1577 { 1577 {
1578 return hasPendingStyleRecalc() && !inStyleRecalc() && getStyleChangeType() > = SubtreeStyleChange; 1578 return hasPendingVisualUpdate() && !inStyleRecalc() && getStyleChangeType() >= SubtreeStyleChange;
1579 } 1579 }
1580 1580
1581 void Document::updateStyleInvalidationIfNeeded() 1581 void Document::updateStyleInvalidationIfNeeded()
1582 { 1582 {
1583 ScriptForbiddenScope forbidScript; 1583 ScriptForbiddenScope forbidScript;
1584 1584
1585 if (!isActive()) 1585 if (!isActive())
1586 return; 1586 return;
1587 if (!childNeedsStyleInvalidation()) 1587 if (!childNeedsStyleInvalidation())
1588 return; 1588 return;
(...skipping 4456 matching lines...) Expand 10 before | Expand all | Expand 10 after
6045 #ifndef NDEBUG 6045 #ifndef NDEBUG
6046 using namespace blink; 6046 using namespace blink;
6047 void showLiveDocumentInstances() 6047 void showLiveDocumentInstances()
6048 { 6048 {
6049 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6049 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6050 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6050 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6051 for (Document* document : set) 6051 for (Document* document : set)
6052 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6052 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6053 } 6053 }
6054 #endif 6054 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698