Title: [136452] trunk/Source/WebCore
Revision
136452
Author
[email protected]
Date
2012-12-03 16:04:52 -0800 (Mon, 03 Dec 2012)

Log Message

[EFL][Qt][WK2] Fixed position elements are not always fixed
https://bugs.webkit.org/show_bug.cgi?id=103452

Reviewed by Simon Fraser.

The code figuring out whether fixed position layers are inside
the visible viewport, assumes that the visible viewport is always
the size of the layout viewport. This assumption doesn't hold with
how the Qt and EFL tiled backing store and coordinated graphics
works, so instead using the visibleContentsRect(), which provides
the right values in all cases.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

    Use visibleContentsRect instead of scrollOffsetForFixedPosition().

    scrollOffsetForFixedPosition() is needed sometimes in the Mac code
    because visibleContentRect() will return negative offsets when you
    are in the rubber-band phase of a scroll on the Mac.

    However that is not an issue here.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (136451 => 136452)


--- trunk/Source/WebCore/ChangeLog	2012-12-04 00:04:11 UTC (rev 136451)
+++ trunk/Source/WebCore/ChangeLog	2012-12-04 00:04:52 UTC (rev 136452)
@@ -1,3 +1,28 @@
+2012-12-03  Kenneth Rohde Christiansen  <[email protected]>
+
+        [EFL][Qt][WK2] Fixed position elements are not always fixed
+        https://bugs.webkit.org/show_bug.cgi?id=103452
+
+        Reviewed by Simon Fraser.
+
+        The code figuring out whether fixed position layers are inside
+        the visible viewport, assumes that the visible viewport is always
+        the size of the layout viewport. This assumption doesn't hold with
+        how the Qt and EFL tiled backing store and coordinated graphics
+        works, so instead using the visibleContentsRect(), which provides
+        the right values in all cases.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
+
+            Use visibleContentsRect instead of scrollOffsetForFixedPosition().
+
+            scrollOffsetForFixedPosition() is needed sometimes in the Mac code
+            because visibleContentRect() will return negative offsets when you
+            are in the rubber-band phase of a scroll on the Mac.
+
+            However that is not an issue here.
+
 2012-12-03  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r135271.

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (136451 => 136452)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-12-04 00:04:11 UTC (rev 136451)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-12-04 00:04:52 UTC (rev 136452)
@@ -1974,7 +1974,7 @@
 
     // Fixed position elements that are invisible in the current view don't get their own layer.
     if (FrameView* frameView = m_renderView->frameView()) {
-        IntRect viewBounds = IntRect(IntPoint(frameView->scrollOffsetForFixedPosition()), frameView->layoutSize());
+        IntRect viewBounds = frameView->visibleContentRect();
         IntRect layerBounds = calculateCompositedBounds(layer, rootRenderLayer());
         if (!viewBounds.intersects(layerBounds))
             return false;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to