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

Unified Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2804983003: [blink] Use early returns in baseBackgroundColor(Override) setters. (Closed)
Patch Set: Revert compositing update fix, keep other changes. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
index fa53cf4be94d6f5fdaa592e667ebd34d4fd8f577..e7828ea4f2178a69633fc93e318876e286e63456 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -302,13 +302,27 @@ void WebFrameWidgetImpl::clearBackgroundColorOverride() {
}
void WebFrameWidgetImpl::setBaseBackgroundColorOverride(WebColor color) {
+ if (m_baseBackgroundColorOverrideEnabled &&
+ m_baseBackgroundColorOverride == color) {
+ return;
+ }
+
m_baseBackgroundColorOverrideEnabled = true;
m_baseBackgroundColorOverride = color;
+ // Force lifecycle update to ensure we're good to call
+ // FrameView::setBaseBackgroundColor().
+ m_localRoot->frameView()->updateLifecycleToCompositingCleanPlusScrolling();
updateBaseBackgroundColor();
}
void WebFrameWidgetImpl::clearBaseBackgroundColorOverride() {
+ if (!m_baseBackgroundColorOverrideEnabled)
+ return;
+
m_baseBackgroundColorOverrideEnabled = false;
+ // Force lifecycle update to ensure we're good to call
+ // FrameView::setBaseBackgroundColor().
+ m_localRoot->frameView()->updateLifecycleToCompositingCleanPlusScrolling();
updateBaseBackgroundColor();
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698