Changeset 243687 in webkit


Ignore:
Timestamp:
Mar 31, 2019 11:42:31 PM (5 years ago)
Author:
Manuel Rego Casasnovas
Message:

Scroll position gets reset when overflow:scroll is inside grid
https://bugs.webkit.org/show_bug.cgi?id=196337
<rdar://problem/49385784>

Reviewed by Simon Fraser.

Fix scroll position when there are changes inside a grid item with "overflow: scroll".

Source/WebCore:

Test: fast/css-grid-layout/grid-item-content-scroll-position.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock): Use beginUpdateScrollInfoAfterLayoutTransaction()
and endAndCommitUpdateScrollInfoAfterLayoutTransaction().

LayoutTests:

  • fast/css-grid-layout/grid-item-content-scroll-position-expected.txt: Added.
  • fast/css-grid-layout/grid-item-content-scroll-position.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243684 r243687  
     12019-03-31  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        Scroll position gets reset when overflow:scroll is inside grid
     4        https://bugs.webkit.org/show_bug.cgi?id=196337
     5        <rdar://problem/49385784>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Fix scroll position when there are changes inside a grid item with "overflow: scroll".
     10
     11        * fast/css-grid-layout/grid-item-content-scroll-position-expected.txt: Added.
     12        * fast/css-grid-layout/grid-item-content-scroll-position.html: Added.
     13
    1142019-03-31  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r243686 r243687  
     12019-03-31  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        Scroll position gets reset when overflow:scroll is inside grid
     4        https://bugs.webkit.org/show_bug.cgi?id=196337
     5        <rdar://problem/49385784>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Fix scroll position when there are changes inside a grid item with "overflow: scroll".
     10
     11        Test: fast/css-grid-layout/grid-item-content-scroll-position.html
     12
     13        * rendering/RenderGrid.cpp:
     14        (WebCore::RenderGrid::layoutBlock): Use beginUpdateScrollInfoAfterLayoutTransaction()
     15        and endAndCommitUpdateScrollInfoAfterLayoutTransaction().
     16
    1172019-03-31  Ryosuke Niwa  <rniwa@webkit.org>
    218
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r243432 r243687  
    189189
    190190        preparePaginationBeforeBlockLayout(relayoutChildren);
     191        beginUpdateScrollInfoAfterLayoutTransaction();
    191192
    192193        LayoutSize previousSize = size();
     
    279280        layoutGridItems();
    280281        m_trackSizingAlgorithm.reset();
     282
     283        endAndCommitUpdateScrollInfoAfterLayoutTransaction();
    281284
    282285        if (size() != previousSize)
Note: See TracChangeset for help on using the changeset viewer.