Changeset 187298 in webkit
- Timestamp:
- Jul 23, 2015, 11:27:40 PM (11 years ago)
- Location:
- branches/safari-601.1-branch
- Files:
-
- 4 edited
- 4 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover-expected.html (copied) (copied from trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover-expected.html )
-
LayoutTests/platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover.html (copied) (copied from trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover.html )
-
LayoutTests/platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local-expected.html (copied) (copied from trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local-expected.html )
-
LayoutTests/platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local.html (copied) (copied from trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local.html )
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBoxModelObject.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerBacking.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-601.1-branch/LayoutTests/ChangeLog
r187293 r187298 1 2015-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 1 20 2015-07-23 Lucas Forschler <lforschler@apple.com> 2 21 -
branches/safari-601.1-branch/Source/WebCore/ChangeLog
r187292 r187298 1 2015-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 1 44 2015-07-23 Lucas Forschler <lforschler@apple.com> 2 45 -
branches/safari-601.1-branch/Source/WebCore/rendering/RenderBoxModelObject.cpp
r186391 r187298 1116 1116 else { 1117 1117 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); 1124 1142 viewportRect.setLocation(toLayoutPoint(frameView.documentScrollOffsetRelativeToViewOrigin())); 1143 } 1125 1144 1126 1145 top += topContentInset; -
branches/safari-601.1-branch/Source/WebCore/rendering/RenderLayerBacking.cpp
r187066 r187298 926 926 const FrameView& frameView = renderer().view().frameView(); 927 927 backgroundPosition = toLayoutPoint(frameView.scrollOffsetForFixedPosition()); 928 backgroundSize = frameView. visibleContentRect().size();928 backgroundSize = frameView.layoutSize(); 929 929 } 930 930 m_backgroundLayer->setPosition(backgroundPosition);
Note:
See TracChangeset
for help on using the changeset viewer.