summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/wtf/Platform.h
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2010-03-16 15:35:12 +0000
committerNicolas Roard <nicolas@android.com>2010-03-17 14:41:57 +0000
commit09cdf3e990745cfbcada2d0a49ef371029fc6a97 (patch)
treeac1e5f02cec6e463cb92d42742bcc4373ecf7770 /JavaScriptCore/wtf/Platform.h
parentb0c2f7b33106420933e04a3b0a69ca4d1d1b3fd8 (diff)
downloadexternal_webkit-09cdf3e990745cfbcada2d0a49ef371029fc6a97.zip
external_webkit-09cdf3e990745cfbcada2d0a49ef371029fc6a97.tar.gz
external_webkit-09cdf3e990745cfbcada2d0a49ef371029fc6a97.tar.bz2
Refactor how we set up the layers hierarchy when using fixed
composited layers, and fix the z-index position. Bug:2497910 Bug:2450006 We add a new COMPOSITED_FIXED_ELEMENTS define to isolate the changes in the webkit common code. We previously had a problem where the hierarchy of GraphicsLayer (i.e. the backed surfaces associated to the composited RenderLayer) was not reflecting that layers were children of a fixed layer. The workaround we currently have is not fully satisfactory, due to the way we draw layers on screen (in some cases layers were wrongly translated, see Bug:2497910). Instead, modifying the webkit common code simplify things a lot, and makes the patch more likely to be upstreamed to webkit, as it's now a reasonably well-delimited feature (use composited layers for fixed elements). What we do now is to consider fixed elements as a stacking context, which makes all layers children of such elements children too in the GraphicsLayer hierarchy, and modifying the offset of those children accordingly (in RenderLayer.cpp). In addition, we fixes the z-index bugs we had by signaling that there is a fixed element to its siblings, and turning the siblings as composited layers as well (so that the ordering works fully UI-side). Change-Id: I735c6c14d955ef54653f0053187d3495bef1f332
Diffstat (limited to 'JavaScriptCore/wtf/Platform.h')
-rw-r--r--JavaScriptCore/wtf/Platform.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index f30ca49..a6ded58 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -824,6 +824,10 @@
#define ENABLE_TEXT_CARET 1
#endif
+#if !defined(ENABLE_COMPOSITED_FIXED_ELEMENTS)
+#define ENABLE_COMPOSITED_FIXED_ELEMENTS 0
+#endif
+
// ENABLE_ARCHIVE is an Android addition. We need this default value to allow
// us to build on Mac.
// FIXME: Upstream to webkit.org.