Changeset 224265 in webkit
- Timestamp:
- Oct 31, 2017 5:21:20 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r224264 r224265 1 2017-10-31 Simon Fraser <simon.fraser@apple.com> 2 3 Rubber-banding overflow-scrolling-touch shows black 4 https://bugs.webkit.org/show_bug.cgi?id=179087 5 rdar://problem/35260253 6 7 Reviewed by Sam Weinig. 8 9 * fast/scrolling/rubber-band-shows-background-expected.html: Added. 10 * fast/scrolling/rubber-band-shows-background.html: Added. 11 1 12 2017-10-31 Ryan Haddad <ryanhaddad@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r224263 r224265 1 2017-10-31 Simon Fraser <simon.fraser@apple.com> 2 3 Rubber-banding overflow-scrolling-touch shows black 4 https://bugs.webkit.org/show_bug.cgi?id=179087 5 rdar://problem/35260253 6 7 Reviewed by Sam Weinig. 8 9 The "backgroundIsKnownToBeObscured" optimization was kicking in for an overflow:scroll 10 whose area was completely covered by its contents, which happens with overlay scrollbars. 11 12 However, this ignored the fact that you can rubber-band to reveal the background, and, 13 on iOS, composited scrolling requires that the scroller background is painted since it goes 14 into its own layer. 15 16 Fix by turning off the optimization for layers that scroll overflow, including those 17 using composited scrolling. 18 19 Test: fast/scrolling/rubber-band-shows-background.html 20 21 * rendering/RenderBox.cpp: 22 (WebCore::RenderBox::foregroundIsKnownToBeOpaqueInRect const): 23 (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured): 24 * rendering/RenderLayer.cpp: 25 (WebCore::RenderLayer::scrollTo): 26 (WebCore::RenderLayer::calculateClipRects const): 27 * rendering/RenderLayer.h: 28 1 29 2017-10-31 Tim Horton <timothy_horton@apple.com> 2 30 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r224260 r224265 1419 1419 if (!maxDepthToTest) 1420 1420 return false; 1421 1421 1422 for (auto& childBox : childrenOfType<RenderBox>(*this)) { 1422 1423 if (!isCandidateForOpaquenessTest(childBox)) … … 1456 1457 if (!getBackgroundPaintedExtent(paintOffset, backgroundRect)) 1457 1458 return false; 1459 1460 if (hasLayer() && layer()->scrollingMayRevealBackground()) 1461 return false; 1462 1458 1463 return foregroundIsKnownToBeOpaqueInRect(backgroundRect, backgroundObscurationTestMaxDepth); 1459 1464 } -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r224260 r224265 2387 2387 return; 2388 2388 } 2389 2389 2390 2390 m_scrollPosition = newPosition; 2391 2391 … … 5983 5983 } 5984 5984 5985 bool RenderLayer::scrollingMayRevealBackground() const 5986 { 5987 return scrollsOverflow() || usesCompositedScrolling(); 5988 } 5989 5985 5990 bool RenderLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const 5986 5991 { -
trunk/Source/WebCore/rendering/RenderLayer.h
r224260 r224265 676 676 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; 677 677 678 bool scrollingMayRevealBackground() const; 679 678 680 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayScrollbars; } 679 681 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDirtyOverlayScrollbars = dirtyScrollbars; } … … 884 886 885 887 bool shouldBeNormalFlowOnly() const; 886 887 888 bool shouldBeSelfPaintingLayer() const; 888 889
Note: See TracChangeset
for help on using the changeset viewer.