Changeset 136452 in webkit


Ignore:
Timestamp:
Dec 3, 2012 4:04:52 PM (11 years ago)
Author:
kenneth@webkit.org
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r136449 r136452  
     12012-12-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        [EFL][Qt][WK2] Fixed position elements are not always fixed
     4        https://bugs.webkit.org/show_bug.cgi?id=103452
     5
     6        Reviewed by Simon Fraser.
     7
     8        The code figuring out whether fixed position layers are inside
     9        the visible viewport, assumes that the visible viewport is always
     10        the size of the layout viewport. This assumption doesn't hold with
     11        how the Qt and EFL tiled backing store and coordinated graphics
     12        works, so instead using the visibleContentsRect(), which provides
     13        the right values in all cases.
     14
     15        * rendering/RenderLayerCompositor.cpp:
     16        (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
     17
     18            Use visibleContentsRect instead of scrollOffsetForFixedPosition().
     19
     20            scrollOffsetForFixedPosition() is needed sometimes in the Mac code
     21            because visibleContentRect() will return negative offsets when you
     22            are in the rubber-band phase of a scroll on the Mac.
     23
     24            However that is not an issue here.
     25
    1262012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
    227
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r136433 r136452  
    19751975    // Fixed position elements that are invisible in the current view don't get their own layer.
    19761976    if (FrameView* frameView = m_renderView->frameView()) {
    1977         IntRect viewBounds = IntRect(IntPoint(frameView->scrollOffsetForFixedPosition()), frameView->layoutSize());
     1977        IntRect viewBounds = frameView->visibleContentRect();
    19781978        IntRect layerBounds = calculateCompositedBounds(layer, rootRenderLayer());
    19791979        if (!viewBounds.intersects(layerBounds))
Note: See TracChangeset for help on using the changeset viewer.