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

Unified Diff: sky/engine/core/dom/Document.cpp

Issue 865383003: Consolidate callers to scheduleVisualUpdate. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/editing/FrameSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Document.cpp
diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
index 9d85c2934d88a71013aadd801ae22a3d831b1145..aaaa486408a3d6c8179f37d5dc3c3aae34089bae 100644
--- a/sky/engine/core/dom/Document.cpp
+++ b/sky/engine/core/dom/Document.cpp
@@ -948,13 +948,21 @@ void Document::scheduleRenderTreeUpdate()
ASSERT(shouldScheduleRenderTreeUpdate());
ASSERT(needsRenderTreeUpdate());
- page()->animator().scheduleVisualUpdate();
+ scheduleVisualUpdate();
+
+ // TODO(esprehn): We should either rename this state, or change the other
+ // users of scheduleVisualUpdate() so they don't expect different states.
m_lifecycle.ensureStateAtMost(DocumentLifecycle::VisualUpdatePending);
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScheduleStyleRecalculation", TRACE_EVENT_SCOPE_PROCESS, "frame", frame());
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::currentCallStack());
}
+void Document::scheduleVisualUpdate()
+{
+ page()->animator().scheduleVisualUpdate();
+}
+
void Document::updateDistributionIfNeeded()
{
ScriptForbiddenScope forbidScript;
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698