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

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

Issue 2194423002: Schedule animation when setting base background color, rather than forcing an update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 4 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/web/WebFrameWidgetImpl.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 15ae442e9a9fb3ac1d7ab4b34e0fade56b777386..4784dd7466c71d63bfc859a221047804fdb73f04 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1893,7 +1893,9 @@ void FrameView::scheduleRelayoutOfSubtree(LayoutObject* relayoutRoot)
if (m_layoutSchedulingEnabled) {
m_hasPendingLayout = true;
- page()->animator().scheduleVisualUpdate(m_frame.get());
+ if (!shouldThrottleRendering())
+ page()->animator().scheduleVisualUpdate(m_frame.get());
+
lifecycle().ensureStateAtMost(DocumentLifecycle::StyleClean);
}
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "InvalidateLayout", TRACE_EVENT_SCOPE_THREAD, "data", InspectorInvalidateLayoutEvent::data(m_frame.get()));
@@ -1972,6 +1974,9 @@ void FrameView::setBaseBackgroundColor(const Color& backgroundColor)
compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay();
}
recalculateScrollbarOverlayStyle(documentBackgroundColor());
+
+ if (!shouldThrottleRendering())
+ page()->animator().scheduleVisualUpdate(m_frame.get());
}
void FrameView::updateBackgroundRecursively(const Color& backgroundColor, bool transparent)
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698