From 1461ab171442cff521c8544104c3be3bccb55a32 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Tue, 14 Dec 2010 15:32:36 -0500 Subject: [PATCH] Do the same compositing check during layout. Change-Id: Ia38edb0a66f538d2020bdb9623e2fd2d7f3af97e Fix: 3280851 --- WebCore/page/FrameView.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp index 7d9920bb3..284c5fcef 100644 --- a/WebCore/page/FrameView.cpp +++ b/WebCore/page/FrameView.cpp @@ -558,8 +558,13 @@ void FrameView::updateCompositingLayers() // Enter compositing mode for child frames that have layout dimensions. The // decision to enable compositing for the RenderView will be done in the // compositor. - if (m_frame->ownerRenderer() && (layoutWidth() | layoutHeight())) - enterCompositingMode(); + if (m_frame->ownerRenderer() && (layoutWidth() | layoutHeight()) && !view->usesCompositing()) { + ScrollbarMode h,v; + scrollbarModes(h, v); + if ((h != ScrollbarAlwaysOff && layoutWidth() < contentsWidth()) || + (v != ScrollbarAlwaysOff && layoutHeight() < contentsHeight())) + enterCompositingMode(); + } #endif // This call will make sure the cached hasAcceleratedCompositing is updated from the pref -- 2.11.0