⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 187298 in webkit


Ignore:
Timestamp:
Jul 23, 2015, 11:27:40 PM (11 years ago)
Author:
Lucas Forschler
Message:

Merged r187116. rdar://problem/21110936

Location:
branches/safari-601.1-branch
Files:
4 edited
4 copied

Legend:

Unmodified
Added
Removed
  • branches/safari-601.1-branch/LayoutTests/ChangeLog

    r187293 r187298  
     12015-07-23  Lucas Forschler  <lforschler@apple.com>
     2
     3        Merge r187116
     4
     5    2015-07-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
     6
     7            REGRESSION (r172417, r184065): Multiple rendering issues with fixed attached background-image
     8            https://bugs.webkit.org/show_bug.cgi?id=147049
     9            <rdar://problem/21110936>
     10
     11            Reviewed by Simon Fraser.
     12
     13            fixedLayoutSize background-image rendering for root and non-root elements.
     14
     15            * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover-expected.html: Added.
     16            * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover.html: Added.
     17            * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local-expected.html: Added.
     18            * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local.html: Added.
     19
    1202015-07-23  Lucas Forschler  <lforschler@apple.com>
    221
  • branches/safari-601.1-branch/Source/WebCore/ChangeLog

    r187292 r187298  
     12015-07-23  Lucas Forschler  <lforschler@apple.com>
     2
     3        Merge r187116
     4
     5    2015-07-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
     6
     7            REGRESSION (r172417, r184065): Multiple rendering issues with fixed attached background-image
     8            https://bugs.webkit.org/show_bug.cgi?id=147049
     9            <rdar://problem/21110936>
     10
     11            Reviewed by Simon Fraser.
     12
     13            The fixed-attached background-image rendering is special. In general, to
     14            display it, the destinationSize should be set to visibleContentSize. The
     15            destinationLocation should be set such that the background-image does
     16            not move with scrolling. The topContentInset should be subtracted from
     17            the destinationLocation such that background-image can be rendered blurred
     18            in the topContentArea. However there are cases in which these rules have to
     19            be changed.
     20
     21            -- destinationSize: In the case of fixed layout size, the fixedLayoutSize
     22            is bigger than the visibleContentSize. In this case, if the background-image
     23            belongs to the root element, the destinationSize has to be set to fixedLayoutSize.
     24            Otherwise it has to be set to the borderBoxSize unless the overflow is
     25            hidden.
     26
     27            -- destinationLocation: If the background-image belongs to the root element, no
     28            scroll offset to added to destinationLocation. For non-root element case,
     29            FrameView::documentScrollOffsetRelativeToViewOrigin() should be used if no page
     30            scaling is applied. Otherwise FrameView::scrollOffsetForFixedPosition() should be
     31            used instead.
     32
     33            Tests: platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover.html
     34                   platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local.html
     35
     36            * rendering/RenderBoxModelObject.cpp:
     37            (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Ensure
     38            the geometry for the fixed-attached background-image is calculated correctly.
     39
     40            * rendering/RenderLayerBacking.cpp:
     41            (WebCore::RenderLayerBacking::updateGeometry): Ensure the background layer
     42            gets the correct size for the fixedLayoutSize mode.
     43
    1442015-07-23  Lucas Forschler  <lforschler@apple.com>
    245
  • branches/safari-601.1-branch/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r186391 r187298  
    11161116        else {
    11171117            FrameView& frameView = view().frameView();
    1118             viewportRect.setSize(frameView.unscaledVisibleContentSizeIncludingObscuredArea());
    1119             topContentInset = frameView.topContentInset(ScrollView::TopContentInsetType::WebCoreOrPlatformContentInset);
    1120 
    1121             if (fixedBackgroundPaintsInLocalCoordinates())
    1122                 viewportRect.setLocation(LayoutPoint(0, -topContentInset));
    1123             else
     1118            bool useFixedLayout = frameView.useFixedLayout() && !frameView.fixedLayoutSize().isEmpty();
     1119
     1120            if (useFixedLayout) {
     1121                // Use the fixedLayoutSize() when useFixedLayout() because the rendering will scale
     1122                // down the frameView to to fit in the current viewport.
     1123                viewportRect.setSize(frameView.fixedLayoutSize());
     1124            } else
     1125                viewportRect.setSize(frameView.unscaledVisibleContentSizeIncludingObscuredArea());
     1126
     1127            if (fixedBackgroundPaintsInLocalCoordinates()) {
     1128                if (!useFixedLayout) {
     1129                    // Shifting location up by topContentInset is needed for layout tests which expect
     1130                    // layout to be shifted down when calling window.internals.setTopContentInset().
     1131                    topContentInset = frameView.topContentInset(ScrollView::TopContentInsetType::WebCoreOrPlatformContentInset);
     1132                    viewportRect.setLocation(LayoutPoint(0, -topContentInset));
     1133                }
     1134            } else if (useFixedLayout || frameView.frameScaleFactor() != 1) {
     1135                // scrollOffsetForFixedPosition() is adjusted for page scale and it does not include
     1136                // topContentInset so do not add it to the calculation below.
     1137                viewportRect.setLocation(toLayoutPoint(frameView.scrollOffsetForFixedPosition()));
     1138            } else {
     1139                // documentScrollOffsetRelativeToViewOrigin() includes -topContentInset in its height
     1140                // so we need to account for that in calculating the phase size
     1141                topContentInset = frameView.topContentInset(ScrollView::TopContentInsetType::WebCoreOrPlatformContentInset);
    11241142                viewportRect.setLocation(toLayoutPoint(frameView.documentScrollOffsetRelativeToViewOrigin()));
     1143            }
    11251144
    11261145            top += topContentInset;
  • branches/safari-601.1-branch/Source/WebCore/rendering/RenderLayerBacking.cpp

    r187066 r187298  
    926926            const FrameView& frameView = renderer().view().frameView();
    927927            backgroundPosition = toLayoutPoint(frameView.scrollOffsetForFixedPosition());
    928             backgroundSize = frameView.visibleContentRect().size();
     928            backgroundSize = frameView.layoutSize();
    929929        }
    930930        m_backgroundLayer->setPosition(backgroundPosition);
Note: See TracChangeset for help on using the changeset viewer.