Changeset 237849 in webkit


Ignore:
Timestamp:
Nov 6, 2018 12:19:47 AM (5 years ago)
Author:
fred.wang@free.fr
Message:

Overlay with -webkit-overflow-scrolling:touch doesn't become scrollable after added text makes it taller
https://bugs.webkit.org/show_bug.cgi?id=158342

Patch by Frederic Wang <fwang@igalia.com> on 2018-11-06
Reviewed by Simon Fraser.

Source/WebCore:

Resizing the content of a -webkit-overflow-scrolling:touch overflow node on iOS may make it
scrollable. However, the RenderLayerBacking's scrolling layer is not properly created
when RenderLayerCompositor::updateScrollCoordinatedLayer is called and hence the UIProcess
receives a null UIScrollView pointer when ScrollingTreeScrollingNodeDelegateIOS performs the
associated update. In debug mode this hits an ASSERT and in release mode the overflow node
remains unscrollable from the user's point of view. This patch fixes this issue by ensuring
the RenderLayerBacking's scrolling layer is created during updateScrollCoordinatedStatus.

Test: fast/scrolling/ios/update-scroll-coordinated-status.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus): Call updateConfiguration()
to ensure the scrolling layer is present and indicate whether a rebuild is necessary.

LayoutTests:

Add a test to ensure the change of scrolling status is reflected in the layer and scrolling
trees. This test should also ASSERT in debug mode without the associated code change.

  • fast/scrolling/ios/update-scroll-coordinated-status-expected.txt: Added.
  • fast/scrolling/ios/update-scroll-coordinated-status.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r237842 r237849  
     12018-11-06  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
     6        Reviewed by Simon Fraser.
     7
     8        Add a test to ensure the change of scrolling status is reflected in the layer and scrolling
     9        trees. This test should also ASSERT in debug mode without the associated code change.
     10
     11        * fast/scrolling/ios/update-scroll-coordinated-status-expected.txt: Added.
     12        * fast/scrolling/ios/update-scroll-coordinated-status.html: Added.
     13
    1142018-11-05  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r237847 r237849  
     12018-11-06  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
     6        Reviewed by Simon Fraser.
     7
     8        Resizing the content of a -webkit-overflow-scrolling:touch overflow node on iOS may make it
     9        scrollable. However, the RenderLayerBacking's scrolling layer is not properly created
     10        when RenderLayerCompositor::updateScrollCoordinatedLayer is called and hence the UIProcess
     11        receives a null UIScrollView pointer when ScrollingTreeScrollingNodeDelegateIOS performs the
     12        associated update. In debug mode this hits an ASSERT and in release mode the overflow node
     13        remains unscrollable from the user's point of view. This patch fixes this issue by ensuring
     14        the RenderLayerBacking's scrolling layer is created during updateScrollCoordinatedStatus.
     15
     16        Test: fast/scrolling/ios/update-scroll-coordinated-status.html
     17
     18        * rendering/RenderLayerCompositor.cpp:
     19        (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus): Call updateConfiguration()
     20        to ensure the scrolling layer is present and indicate whether a rebuild is necessary.
     21
    1222018-11-05  Zan Dobersek  <zdobersek@igalia.com>
    223
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r237266 r237849  
    35453545        layer.backing()->setIsScrollCoordinatedWithViewportConstrainedRole(coordinationRoles.contains(ViewportConstrained));
    35463546
     3547    if (layer.backing() && layer.backing()->updateConfiguration())
     3548        setCompositingLayersNeedRebuild();
     3549
    35473550    if (coordinationRoles && canCoordinateScrollingForLayer(layer)) {
    35483551        if (m_scrollCoordinatedLayers.add(&layer).isNewEntry)
Note: See TracChangeset for help on using the changeset viewer.