summaryrefslogtreecommitdiffstats
path: root/WebCore/page/FrameView.cpp
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-12-14 15:32:36 -0500
committerPatrick Scott <phanna@android.com>2010-12-14 15:32:36 -0500
commit1461ab171442cff521c8544104c3be3bccb55a32 (patch)
tree2da2dd6a6b219dfbb8fc14181ab21c74fb77902b /WebCore/page/FrameView.cpp
parentb41d06babb774af11ede0ea864bb38c6cfe66707 (diff)
downloadexternal_webkit-1461ab171442cff521c8544104c3be3bccb55a32.zip
external_webkit-1461ab171442cff521c8544104c3be3bccb55a32.tar.gz
external_webkit-1461ab171442cff521c8544104c3be3bccb55a32.tar.bz2
Do the same compositing check during layout.
Change-Id: Ia38edb0a66f538d2020bdb9623e2fd2d7f3af97e Fix: 3280851
Diffstat (limited to 'WebCore/page/FrameView.cpp')
-rw-r--r--WebCore/page/FrameView.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 7d9920b..284c5fc 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