Source/WebCore/ChangeLog

 12018-11-14 Frederic Wang <fwang@igalia.com>
 2
 3 Overlay with -webkit-overflow-scrolling:touch doesn't become scrollable after added text makes it taller
 4 https://bugs.webkit.org/show_bug.cgi?id=158342
 5 rdar://problem/26652811
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 This commit fixes an issue when resizing the content of a -webkit-overflow-scrolling: touch
 10 overflow node on iOS. Indeed, the RenderLayerBacking's scrolling layer may not be properly
 11 created and hence the UIProcess receives a null UIScrollView pointer. This triggers an
 12 assertion in debug mode and prevents the user from scrolling the overflow node in release
 13 mode. This was partially fixed by the refactoring of bug 90342 but this commit addresses
 14 the remaining issues by forcing a configuration update after layout in order to ensure that
 15 RenderLayerBacking's scrolling layer is available.
 16
 17 Tests: fast/scrolling/ios/change-scrollability-on-content-resize-nested.html
 18 fast/scrolling/ios/change-scrollability-on-content-resize.html
 19
 20 * rendering/RenderLayer.cpp:
 21 (WebCore::RenderLayer::updateScrollInfoAfterLayout): Force a configuration update so that
 22 RenderLayerCompositor::updateBackingAndHierarchy will later instantiate
 23 RenderLayerBacking::m_scrollingLayer.
 24
1252018-11-12 Rob Buis <rbuis@igalia.com>
226
327 Content-Type parameter values should allow empty quoted strings

Source/WebCore/rendering/RenderLayer.cpp

@@void RenderLayer::updateScrollInfoAfterLayout()
35713571 if (originalScrollOffset != scrollOffset())
35723572 scrollToOffsetWithoutAnimation(IntPoint(scrollOffset()));
35733573
3574  if (isComposited())
 3574 if (isComposited()) {
35753575 setNeedsCompositingGeometryUpdate();
 3576 setNeedsCompositingConfigurationUpdate();
 3577 }
35763578
35773579 updateScrollSnapState();
35783580}

LayoutTests/ChangeLog

 12018-11-14 Frederic Wang <fwang@igalia.com>
 2
 3 Overlay with -webkit-overflow-scrolling:touch doesn't become scrollable after added text makes it taller
 4 https://bugs.webkit.org/show_bug.cgi?id=158342
 5 rdar://problem/26652811
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Add a test to check that scrollability of composited/non-composited overflow divs is properly
 10 updated. This test used to fail and assert before #238090. A second test with nested divs
 11 stills exhibit the issue and is fixed by the present commit.
 12
 13 * fast/scrolling/ios/change-scrollability-on-content-resize-expected.txt: Added.
 14 * fast/scrolling/ios/change-scrollability-on-content-resize-nested-expected.txt: Added.
 15 * fast/scrolling/ios/change-scrollability-on-content-resize-nested.html: Added.
 16 * fast/scrolling/ios/change-scrollability-on-content-resize.html: Added.
 17
1182018-11-12 Darshan Kadu <darsh7807@gmail.com>
219
320 Implement Cache API support for WPE/GTK

LayoutTests/fast/scrolling/ios/change-scrollability-on-content-resize-expected.txt

 10
 21
 32
 43
 5(GraphicsLayer
 6 (anchor 0.00 0.00)
 7 (bounds 800.00 600.00)
 8 (visible rect 0.00, 0.00 800.00 x 600.00)
 9 (coverage rect 0.00, 0.00 800.00 x 600.00)
 10 (intersects coverage rect 1)
 11 (contentsScale 2.00)
 12 (children 1
 13 (GraphicsLayer
 14 (bounds 800.00 600.00)
 15 (contentsOpaque 1)
 16 (visible rect 0.00, 0.00 800.00 x 600.00)
 17 (coverage rect 0.00, 0.00 800.00 x 600.00)
 18 (intersects coverage rect 1)
 19 (contentsScale 2.00)
 20 (tile cache coverage 0, 0 800 x 600)
 21 (tile size 800 x 600)
 22 (top left tile 0, 0 tiles grid 1 x 1)
 23 (in window 1)
 24 (children 1
 25 (GraphicsLayer
 26 (bounds 800.00 600.00)
 27 (drawsContent 1)
 28 (visible rect 0.00, 0.00 800.00 x 600.00)
 29 (coverage rect 0.00, 0.00 800.00 x 600.00)
 30 (intersects coverage rect 1)
 31 (contentsScale 2.00)
 32 (children 6
 33 (GraphicsLayer
 34 (bounds 50.00 50.00)
 35 (contentsOpaque 1)
 36 (transform [0.87 0.50 0.00 0.00] [-0.50 0.87 0.00 0.00] [0.00 0.00 1.00 0.00] [175.00 0.00 -5.00 1.00])
 37 (visible rect 0.00, 0.00 50.00 x 50.00)
 38 (coverage rect -160.71, -296.65 992.82 x 919.62)
 39 (intersects coverage rect 1)
 40 (contentsScale 2.00)
 41 )
 42 (GraphicsLayer
 43 (position 250.00 0.00)
 44 (bounds 50.00 50.00)
 45 (contentsOpaque 1)
 46 (transform [0.87 0.50 0.00 0.00] [-0.50 0.87 0.00 0.00] [0.00 0.00 1.00 0.00] [175.00 0.00 -5.00 1.00])
 47 (visible rect 0.00, 0.00 50.00 x 50.00)
 48 (coverage rect -377.21, -171.65 992.82 x 919.62)
 49 (intersects coverage rect 1)
 50 (contentsScale 2.00)
 51 )
 52 (GraphicsLayer
 53 (bounds 800.00 600.00)
 54 (drawsContent 1)
 55 (visible rect 0.00, 0.00 800.00 x 600.00)
 56 (coverage rect 0.00, 0.00 800.00 x 600.00)
 57 (intersects coverage rect 1)
 58 (contentsScale 2.00)
 59 )
 60 (GraphicsLayer
 61 (position 5.00 5.00)
 62 (bounds 210.00 210.00)
 63 (drawsContent 1)
 64 (visible rect 0.00, 0.00 210.00 x 210.00)
 65 (coverage rect -5.00, -5.00 800.00 x 600.00)
 66 (intersects coverage rect 1)
 67 (contentsScale 2.00)
 68 )
 69 (GraphicsLayer
 70 (position 255.00 5.00)
 71 (bounds 210.00 210.00)
 72 (drawsContent 1)
 73 (visible rect 0.00, 0.00 210.00 x 210.00)
 74 (coverage rect -255.00, -5.00 800.00 x 600.00)
 75 (intersects coverage rect 1)
 76 (contentsScale 2.00)
 77 (children 1
 78 (GraphicsLayer
 79 (offsetFromRenderer width=-5 height=-5)
 80 (position 5.00 5.00)
 81 (bounds 200.00 200.00)
 82 (visible rect 0.00, 0.00 200.00 x 200.00)
 83 (coverage rect 0.00, 0.00 200.00 x 200.00)
 84 (intersects coverage rect 1)
 85 (contentsScale 2.00)
 86 (children 1
 87 (GraphicsLayer
 88 (offsetFromRenderer width=5 height=5)
 89 (bounds 200.00 400.00)
 90 (drawsContent 1)
 91 (visible rect 0.00, 0.00 200.00 x 200.00)
 92 (coverage rect 0.00, 0.00 200.00 x 200.00)
 93 (intersects coverage rect 1)
 94 (contentsScale 2.00)
 95 )
 96 )
 97 )
 98 )
 99 )
 100 (GraphicsLayer
 101 (position 5.00 255.00)
 102 (bounds 210.00 210.00)
 103 (drawsContent 1)
 104 (visible rect 0.00, 0.00 210.00 x 210.00)
 105 (coverage rect -5.00, -255.00 800.00 x 600.00)
 106 (intersects coverage rect 1)
 107 (contentsScale 2.00)
 108 )
 109 )
 110 )
 111 )
 112 )
 113 )
 114)
 115
 116
 117
 118(Frame scrolling node
 119 (scrollable area size 800 600)
 120 (contents size 800 600)
 121 (scrollable area parameters
 122 (horizontal scroll elasticity 1)
 123 (vertical scroll elasticity 1)
 124 (horizontal scrollbar mode 0)
 125 (vertical scrollbar mode 0))
 126 (visual viewport enabled 1)
 127 (layout viewport at (0,0) size 800x600)
 128 (min layout viewport origin (0,0))
 129 (max layout viewport origin (0,0))
 130 (synchronous event dispatch region for event wheel
 131 at (255,255) size 210x210)
 132 (behavior for fixed 0)
 133 (children 1
 134 (Overflow scrolling node
 135 (scrollable area size 200 200)
 136 (contents size 200 400)
 137 (scrollable area parameters
 138 (horizontal scroll elasticity 1)
 139 (vertical scroll elasticity 1)
 140 (horizontal scrollbar mode 0)
 141 (vertical scrollbar mode 0))
 142 )
 143 )
 144)
 145
 146

LayoutTests/fast/scrolling/ios/change-scrollability-on-content-resize-nested-expected.txt

 1(GraphicsLayer
 2 (anchor 0.00 0.00)
 3 (bounds 800.00 600.00)
 4 (visible rect 0.00, 0.00 800.00 x 600.00)
 5 (coverage rect 0.00, 0.00 800.00 x 600.00)
 6 (intersects coverage rect 1)
 7 (contentsScale 2.00)
 8 (children 1
 9 (GraphicsLayer
 10 (bounds 800.00 600.00)
 11 (contentsOpaque 1)
 12 (visible rect 0.00, 0.00 800.00 x 600.00)
 13 (coverage rect 0.00, 0.00 800.00 x 600.00)
 14 (intersects coverage rect 1)
 15 (contentsScale 2.00)
 16 (tile cache coverage 0, 0 800 x 600)
 17 (tile size 800 x 600)
 18 (top left tile 0, 0 tiles grid 1 x 1)
 19 (in window 1)
 20 (children 1
 21 (GraphicsLayer
 22 (position 8.00 13.00)
 23 (bounds 300.00 200.00)
 24 (visible rect 0.00, 0.00 300.00 x 200.00)
 25 (coverage rect -8.00, -13.00 800.00 x 600.00)
 26 (intersects coverage rect 1)
 27 (contentsScale 2.00)
 28 (children 1
 29 (GraphicsLayer
 30 (bounds 300.00 200.00)
 31 (visible rect 0.00, 0.00 300.00 x 200.00)
 32 (coverage rect 0.00, 0.00 300.00 x 200.00)
 33 (intersects coverage rect 1)
 34 (contentsScale 2.00)
 35 (children 1
 36 (GraphicsLayer
 37 (bounds 300.00 400.00)
 38 (drawsContent 1)
 39 (visible rect 0.00, 0.00 300.00 x 200.00)
 40 (coverage rect 0.00, 0.00 300.00 x 200.00)
 41 (intersects coverage rect 1)
 42 (contentsScale 2.00)
 43 (children 1
 44 (GraphicsLayer
 45 (bounds 200.00 50.00)
 46 (contentsOpaque 1)
 47 (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [50.00 100.00 0.00 1.00])
 48 (visible rect 0.00, 0.00 200.00 x 50.00)
 49 (coverage rect -50.00, -100.00 300.00 x 200.00)
 50 (intersects coverage rect 1)
 51 (contentsScale 2.00)
 52 )
 53 )
 54 )
 55 )
 56 )
 57 )
 58 )
 59 )
 60 )
 61 )
 62)
 63
 64
 65
 66(Frame scrolling node
 67 (scrollable area size 800 600)
 68 (contents size 800 600)
 69 (scrollable area parameters
 70 (horizontal scroll elasticity 1)
 71 (vertical scroll elasticity 1)
 72 (horizontal scrollbar mode 0)
 73 (vertical scrollbar mode 0))
 74 (visual viewport enabled 1)
 75 (layout viewport at (0,0) size 800x600)
 76 (min layout viewport origin (0,0))
 77 (max layout viewport origin (0,0))
 78 (behavior for fixed 0)
 79 (children 1
 80 (Overflow scrolling node
 81 (scrollable area size 300 200)
 82 (contents size 300 400)
 83 (scrollable area parameters
 84 (horizontal scroll elasticity 1)
 85 (vertical scroll elasticity 1)
 86 (horizontal scrollbar mode 0)
 87 (vertical scrollbar mode 0))
 88 )
 89 )
 90)
 91
 92

LayoutTests/fast/scrolling/ios/change-scrollability-on-content-resize-nested.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <title>Change scrollability on content resize (nested)</title>
 5 <meta name="viewport" content="width=device-width">
 6 <style>
 7 #root {
 8 width: 300px;
 9 height: 200px;
 10 position: absolute;
 11 }
 12 #scroller {
 13 width: 100%;
 14 height: 100%;
 15 overflow-x: hidden;
 16 overflow-y: scroll;
 17 -webkit-overflow-scrolling: touch;
 18 position: relative;
 19 }
 20 #content {
 21 background-color: yellow;
 22 }
 23 #compositedDiv {
 24 position: absolute;
 25 top: 0;
 26 left: 0;
 27 width: 200px;
 28 height: 50px;
 29 background: lightblue;
 30 transform: translate3d(50px, 100px, 0px);
 31 }
 32 </style>
 33 <script>
 34 if (window.testRunner) {
 35 testRunner.dumpAsText();
 36 testRunner.waitUntilDone();
 37 }
 38 function doTest()
 39 {
 40 requestAnimationFrame(() => {
 41 document.getElementById('content').style.height = "400px";
 42 if (window.testRunner && window.internals) {
 43 requestAnimationFrame(() => {
 44 document.getElementById('layerTree').innerText = internals.layerTreeAsText(document,
 45 internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES) + "\n\n" +
 46 internals.scrollingStateTreeAsText() + "\n";
 47 testRunner.notifyDone();
 48 });
 49 }
 50 });
 51 }
 52 window.addEventListener('load', doTest, false);
 53 </script>
 54 </head>
 55 <body>
 56 <div id="root">
 57 <div id="scroller">
 58 <div id="content">
 59 <div id="compositedDiv"></div>
 60 </div>
 61 </div>
 62 </div>
 63 <pre id="layerTree"></pre>
 64</body>
 65</html>

LayoutTests/fast/scrolling/ios/change-scrollability-on-content-resize.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <title>Change scrollability on content resize</title>
 5 <meta name="viewport" content="width=device-width">
 6 <style>
 7 .scrollable {
 8 position: absolute;
 9 left: 0px;
 10 top: 0px;
 11 width: 200px;
 12 height: 200px;
 13 overflow: auto;
 14 -webkit-overflow-scrolling: touch;
 15 border: 5px solid orange;
 16 margin: 5px;
 17 }
 18 .scrollable-content {
 19 width: 100px;
 20 height: 100px;
 21 background: lightgreen;
 22 }
 23 .overflowing {
 24 height: 400px;
 25 }
 26 .composited {
 27 z-index: -1;
 28 position: absolute;
 29 left: 0px;
 30 top: 0px;
 31 width: 50px;
 32 height: 50px;
 33 transform: translate3d(175px, 0px, -5px) rotate(30deg);
 34 background: blue;
 35 }
 36 #compositedBecomeNonScrollable {
 37 position: absolute;
 38 left: 0px;
 39 top: 0px;
 40 }
 41 #compositedBecomeScrollable {
 42 position: absolute;
 43 left: 250px;
 44 top: 0px;
 45 }
 46 #nonCompositedBecomeNonScrollable {
 47 position: absolute;
 48 left: 0px;
 49 top: 250px;
 50 }
 51 #nonCompositedBecomeScrollable {
 52 position: absolute;
 53 left: 250px;
 54 top: 250px;
 55 }
 56 </style>
 57 <script>
 58 if (window.testRunner) {
 59 testRunner.dumpAsText();
 60 testRunner.waitUntilDone();
 61 }
 62 function doTest()
 63 {
 64 requestAnimationFrame(() => {
 65 document.querySelectorAll('.scrollable-content').forEach((div) => {
 66 div.classList.toggle('overflowing');
 67 });
 68 if (window.testRunner && window.internals) {
 69 requestAnimationFrame(() => {
 70 document.getElementById('layerTree').innerText = internals.layerTreeAsText(document,
 71 internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES) + "\n\n" +
 72 internals.scrollingStateTreeAsText() + "\n";
 73 testRunner.notifyDone();
 74 });
 75 }
 76 });
 77 }
 78 window.addEventListener('load', doTest, false);
 79 </script>
 80 </head>
 81 <body>
 82 <div id="compositedBecomeNonScrollable">
 83 <div class="scrollable">
 84 <div class="scrollable-content overflowing">0</div>
 85 </div>
 86 <div class="composited">
 87 </div>
 88 </div>
 89
 90 <div id="compositedBecomeScrollable">
 91 <div class="scrollable">
 92 <div class="scrollable-content">1</div>
 93 </div>
 94 <div class="composited">
 95 </div>
 96 </div>
 97
 98 <div id="nonCompositedBecomeNonScrollable">
 99 <div class="scrollable">
 100 <div class="scrollable-content overflowing">2</div>
 101 </div>
 102 </div>
 103
 104 <div id="nonCompositedBecomeScrollable">
 105 <div class="scrollable">
 106 <div class="scrollable-content">3</div>
 107 </div>
 108 </div>
 109
 110 <pre id="layerTree"></pre>
 111 </body>
 112</html>