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

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

Issue 168193002: Fix compositing chicken and egg problem in updateControlTints. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 1e2efc1bd60059dd9d891f6a3d6206f074593a0a..4a80aea9be2ec52da38b131d5f38c6419236d1cc 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -2623,8 +2623,10 @@ void FrameView::updateControlTints()
if (m_frame->document()->url().isEmpty())
return;
- if (RenderTheme::theme().supportsControlTints() || hasCustomScrollbars())
+ if (RenderTheme::theme().supportsControlTints() || hasCustomScrollbars()) {
+ updateLayoutAndStyleForPainting();
paintControlTints();
+ }
}
void FrameView::paintControlTints()
@@ -2776,6 +2778,13 @@ void FrameView::paintOverhangAreas(GraphicsContext* context, const IntRect& hori
ScrollView::paintOverhangAreas(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect);
}
+void FrameView::updateLayoutAndStyleForPainting()
+{
abarth-chromium 2014/02/15 07:12:19 Don't we need to hold a RefPtr<FrameView> protecto
ojan 2014/02/18 18:52:41 :(
+ updateLayoutAndStyleIfNeededRecursive();
+ if (RenderView* view = renderView())
+ view->compositor()->updateCompositingLayers();
+}
+
void FrameView::updateLayoutAndStyleIfNeededRecursive()
{
// We have to crawl our entire tree looking for any FrameViews that need

Powered by Google App Engine
This is Rietveld 408576698