OSDN Git Service

Do the same compositing check during layout.
authorPatrick Scott <phanna@android.com>
Tue, 14 Dec 2010 20:32:36 +0000 (15:32 -0500)
committerPatrick Scott <phanna@android.com>
Tue, 14 Dec 2010 20:32:36 +0000 (15:32 -0500)
Change-Id: Ia38edb0a66f538d2020bdb9623e2fd2d7f3af97e
Fix: 3280851

WebCore/page/FrameView.cpp

index 7d9920b..284c5fc 100644 (file)
@@ -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