Changeset 287757 in webkit
- Timestamp:
- Jan 7, 2022, 10:06:43 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r287756 r287757 1 2022-01-07 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (Safari 14): background-attachment: local does not work 4 https://bugs.webkit.org/show_bug.cgi?id=219324 5 6 Reviewed by Antti Koivisto. 7 8 Skip the test on platforms without async overflow scroll. 9 10 * TestExpectations: 11 * fast/repaint/background-attachment-local-scroll-expected.txt: Added. 12 * fast/repaint/background-attachment-local-scroll.html: Added. 13 * platform/ios-wk2/TestExpectations: 14 * platform/mac-wk2/TestExpectations: 15 1 16 2022-01-07 Kate Cheney <katherine_cheney@apple.com> 2 17 -
trunk/LayoutTests/TestExpectations
r287696 r287757 92 92 compositing/scrolling/async-overflow-scrolling [ Skip ] 93 93 compositing/layer-creation/clipping-scope [ Skip ] 94 fast/repaint/background-attachment-local-scroll.html [ Skip ] 94 95 95 96 # WebKit2 only. -
trunk/LayoutTests/platform/ios-wk2/TestExpectations
r287693 r287757 42 42 fast/media/mq-prefers-contrast-live-update.html [ Pass ] 43 43 44 fast/repaint/background-attachment-local-scroll.html [ Pass ] 44 45 fast/repaint/placeholder-after-caps-lock-hidden.html [ Pass ] 45 46 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r287693 r287757 43 43 fast/media/mq-prefers-contrast.html [ Pass ] 44 44 45 fast/repaint/background-attachment-local-scroll.html [ Pass ] 45 46 fast/scrolling/unfocusing-page-while-keyboard-scrolling.html [ Pass ] 46 47 -
trunk/Source/WebCore/ChangeLog
r287756 r287757 1 2022-01-07 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (Safari 14): background-attachment: local does not work 4 https://bugs.webkit.org/show_bug.cgi?id=219324 5 <rdar://71808922> 6 7 Reviewed by Antti Koivisto. 8 9 With async overflow scrolling, we need to trigger a repaint if the scrolling element 10 has any background layer with `background-attachment: local`. 11 12 The background won't always be synchronized with the scrolling, but a little jitter 13 is better than a broken CSS behavior (and this is what Firefox does). 14 15 Test: fast/repaint/background-attachment-local-scroll.html 16 17 * rendering/RenderLayerBacking.cpp: 18 (WebCore::RenderLayerBacking::needsRepaintOnCompositedScroll const): 19 * rendering/style/RenderStyle.cpp: 20 (WebCore::RenderStyle::hasAnyLocalBackground const): 21 * rendering/style/RenderStyle.h: 22 1 23 2022-01-07 Kate Cheney <katherine_cheney@apple.com> 2 24 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r287742 r287757 2035 2035 return false; 2036 2036 2037 if (renderer().style().hasAnyLocalBackground()) 2038 return true; 2039 2037 2040 if (auto scrollingCoordinator = m_owningLayer.page().scrollingCoordinator()) 2038 2041 return scrollingCoordinator->hasSynchronousScrollingReasons(m_scrollingNodeID); 2039 2042 2040 2043 return false; 2041 2044 } -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r287742 r287757 1665 1665 { 1666 1666 return allLayersAreFixed(backgroundLayers()); 1667 } 1668 1669 bool RenderStyle::hasAnyLocalBackground() const 1670 { 1671 for (auto* layer = &backgroundLayers(); layer; layer = layer->next()) { 1672 if (layer->image() && layer->attachment() == FillAttachment::LocalBackground) 1673 return true; 1674 } 1675 return false; 1667 1676 } 1668 1677 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r287742 r287757 215 215 216 216 bool hasEntirelyFixedBackground() const; 217 bool hasAnyLocalBackground() const; 217 218 218 219 bool hasAppearance() const { return appearance() != NoControlPart; }
Note:
See TracChangeset
for help on using the changeset viewer.