Changeset 187271 in webkit
- Timestamp:
- Jul 23, 2015, 4:43:35 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/layer-creation/fixed-overlap-extent-expected.txt (added)
-
LayoutTests/compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt (added)
-
LayoutTests/compositing/layer-creation/fixed-overlap-extent-rtl.html (added)
-
LayoutTests/compositing/layer-creation/fixed-overlap-extent.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r187269 r187271 1 2015-07-22 Simon Fraser <simon.fraser@apple.com> 2 3 Layer z-ordering is incorrect when scrolling on page witih position:fixed 4 https://bugs.webkit.org/show_bug.cgi?id=147220 5 rdar://problem/15849697&21929247 6 7 Reviewed by Dean Jackson. 8 9 Tests that reveal the overlap area by creating lots of small layers, and dumping 10 the layer tree. 11 12 * compositing/layer-creation/fixed-overlap-extent-expected.txt: Added. 13 * compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt: Added. 14 * compositing/layer-creation/fixed-overlap-extent-rtl.html: Added. 15 * compositing/layer-creation/fixed-overlap-extent.html: Added. 16 1 17 2015-07-23 Brian J. Burg <burg@cs.washington.edu> 2 18 -
trunk/Source/WebCore/ChangeLog
r187262 r187271 1 2015-07-22 Simon Fraser <simon.fraser@apple.com> 2 3 Layer z-ordering is incorrect when scrolling on page witih position:fixed 4 https://bugs.webkit.org/show_bug.cgi?id=147220 5 rdar://problem/15849697&21929247 6 7 Reviewed by Dean Jackson. 8 9 Overlap testing for compositing uses the currently laid out position of fixed 10 elements, without taking into account the fact that async scrolling can move 11 them around, and possibly under other non-composited elements. This manifested 12 as position:fixed elements moving over other elements on some pages when 13 scrolling, when they should have moved behind. 14 15 Fix by expanding the overlap map entry for position:fixed elements to create 16 an rect for the area they cover at all scroll locations, taking min and max 17 scroll offsets into account. 18 19 Also add a couple more LOG(Compositing) statements. 20 21 Tests: compositing/layer-creation/fixed-overlap-extent-rtl.html 22 compositing/layer-creation/fixed-overlap-extent.html 23 24 * rendering/RenderLayerCompositor.cpp: 25 (WebCore::fixedPositionOffset): 26 (WebCore::RenderLayerCompositor::computeExtent): 27 (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer): 28 (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): 29 1 30 2015-07-23 Jer Noble <jer.noble@apple.com> 2 31 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r186911 r187271 1166 1166 } 1167 1167 1168 #if PLATFORM(IOS) 1169 // FIXME: Share with RenderView. 1170 static inline LayoutSize fixedPositionOffset(const FrameView& frameView) 1171 { 1172 return frameView.useCustomFixedPositionLayoutRect() ? (frameView.customFixedPositionLayoutRect().location() - LayoutPoint()) : frameView.scrollOffset(); 1173 } 1174 #endif 1175 1168 1176 void RenderLayerCompositor::computeExtent(const OverlapMap& overlapMap, const RenderLayer& layer, OverlapExtent& extent) const 1169 1177 { … … 1184 1192 if (extent.bounds.isEmpty()) 1185 1193 extent.bounds.setSize(LayoutSize(1, 1)); 1194 1195 1196 RenderLayerModelObject& renderer = layer.renderer(); 1197 if (renderer.isOutOfFlowPositioned() && renderer.style().position() == FixedPosition && renderer.container() == &m_renderView) { 1198 // Because fixed elements get moved around without re-computing overlap, we have to compute an overlap 1199 // rect that covers all the locations that the fixed element could move to. 1200 // FIXME: need to handle sticky too. 1201 LayoutRect viewportRect; 1202 if (m_renderView.frameView().useFixedLayout()) 1203 viewportRect = m_renderView.unscaledDocumentRect(); 1204 else 1205 viewportRect = m_renderView.frameView().viewportConstrainedVisibleContentRect(); 1206 1207 #if PLATFORM(IOS) 1208 LayoutSize scrollPosition = fixedPositionOffset(m_renderView.frameView()); 1209 #else 1210 LayoutSize scrollPosition = m_renderView.frameView().scrollOffsetForFixedPosition(); 1211 #endif 1212 1213 LayoutPoint minimumScrollPosition = m_renderView.frameView().minimumScrollPosition(); 1214 LayoutPoint maximumScrollPosition = m_renderView.frameView().maximumScrollPosition(); 1215 1216 LayoutSize topLeftExpansion = scrollPosition - toLayoutSize(minimumScrollPosition); 1217 LayoutSize bottomRightExpansion = toLayoutSize(maximumScrollPosition) - scrollPosition; 1218 1219 extent.bounds.setLocation(extent.bounds.location() - topLeftExpansion); 1220 extent.bounds.setSize(extent.bounds.size() + topLeftExpansion + bottomRightExpansion); 1221 } 1186 1222 1187 1223 extent.extentComputed = true; … … 2854 2890 return false; 2855 2891 2892 LOG(Compositing, "RenderLayerCompositor %p needsFixedRootBackgroundLayer returning %d", this, supportsFixedRootBackgroundCompositing() && m_renderView.rootBackgroundIsEntirelyFixed()); 2893 2856 2894 return supportsFixedRootBackgroundCompositing() && m_renderView.rootBackgroundIsEntirelyFixed(); 2857 2895 } … … 3205 3243 3206 3244 bool isTransparent = viewHasTransparentBackground(); 3245 3246 LOG(Compositing, "RenderLayerCompositor %p rootBackgroundTransparencyChanged. isTransparent=%d, changed=%d", this, isTransparent, m_viewBackgroundIsTransparent == isTransparent); 3207 3247 if (m_viewBackgroundIsTransparent == isTransparent) 3208 3248 return;
Note:
See TracChangeset
for help on using the changeset viewer.