diff options
author | Ben Murdoch <benm@google.com> | 2011-11-17 05:45:57 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-17 05:45:57 -0800 |
commit | 821a96a38b73feb4a362a5a738f355b52667253f (patch) | |
tree | fbb25a15ee9327ddb0691c1ff2f9ccc26e5a2c3d /Source | |
parent | 80e88c9309cad72bc5266e3f0197490c2ffe2460 (diff) | |
parent | d34224ca67791aa7215160c7be4900f965f79eea (diff) | |
download | external_webkit-821a96a38b73feb4a362a5a738f355b52667253f.zip external_webkit-821a96a38b73feb4a362a5a738f355b52667253f.tar.gz external_webkit-821a96a38b73feb4a362a5a738f355b52667253f.tar.bz2 |
am d34224ca: Merge "Promote -ve z-index fixed/scrollable elements to layers" into ics-mr1
* commit 'd34224ca67791aa7215160c7be4900f965f79eea':
Promote -ve z-index fixed/scrollable elements to layers
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/rendering/RenderLayerCompositor.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp index 4f4f553..598926d 100644 --- a/Source/WebCore/rendering/RenderLayerCompositor.cpp +++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp @@ -764,7 +764,18 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, O // If we have to make a layer for this child, make one now so we can have a contents layer // (since we need to ensure that the -ve z-order child renders underneath our contents). +#ifdef ANDROID + // Normally we try to reduce the number of layers by not promoting all fixed + // or scrollable elements to their own compositing layer. But in the case that + // we have such an element in the negative z-order, we must make it a layer + // otherwise the content will be painted at a higher z-index. This breaks pages + // that set a large image with a z-index of -1 to implement a background image, + // for example. + bool childRequiresCompositing = childState.m_hasFixedElement || childState.m_hasScrollableElement; + if (!willBeComposited && (childState.m_subtreeIsCompositing || childRequiresCompositing)) { +#else if (!willBeComposited && childState.m_subtreeIsCompositing) { +#endif // make layer compositing layer->setMustOverlapCompositedLayers(true); childState.m_compositingAncestor = layer; |