Fixed background is scrolling in http://www.nieuwecode.nl/ in Qt webkit2
[WebKit-https.git] / Source / WebCore / css / CSSStyleSelector.cpp
index 1ae051bd245cc2989f3df92784a794272dbdb253..16f68ffac476b0eed04af7edca166c86d788ffa6 100644 (file)
 #include "StyleCachedImageSet.h"
 #endif
 
+#if PLATFORM(QT)
+#define FIXED_POSITION_CREATES_STACKING_CONTEXT 1
+#endif
+
 using namespace std;
 
 namespace WebCore {
@@ -2007,6 +2011,9 @@ void StyleResolver::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
     // object wedged in between them.  Auto z-index also becomes 0 for objects that specify transforms/masks/reflections.
     if (style->hasAutoZIndex() && ((e && e->document()->documentElement() == e) || style->opacity() < 1.0f
         || style->hasTransformRelatedProperty() || style->hasMask() || style->boxReflect() || style->hasFilter()
+#ifdef FIXED_POSITION_CREATES_STACKING_CONTEXT
+        || style->position() == FixedPosition
+#endif
 #if ENABLE(OVERFLOW_SCROLLING)
         // Touch overflow scrolling creates a stacking context.
         || style->useTouchOverflowScrolling()