Changeset 282201 in webkit


Ignore:
Timestamp:
Sep 9, 2021 1:16:24 AM (10 months ago)
Author:
Martin Robinson
Message:

Position sticky does not work within table cells
https://bugs.webkit.org/show_bug.cgi?id=155496

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table-ref.html: Added.
  • web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table.html: Added.

Source/WebCore:

When computing the content box rect of a sticky container, do not include
intrinsic padding. Instead, use the values computed from CSS. The instrinsic
padding should not limit the movement area of a position:sticky item.

  • web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table-ref.html: Added.
  • web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table.html: Added.

Test: imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::computeStickyPositionConstraints const): Use CSS computed
values which do not include intrinsic padding.

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r282199 r282201  
     12021-09-09  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Position sticky does not work within table cells
     4        https://bugs.webkit.org/show_bug.cgi?id=155496
     5
     6        Reviewed by Simon Fraser.
     7
     8        * web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table-ref.html: Added.
     9        * web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table.html: Added.
     10
    1112021-09-09  Youenn Fablet  <youenn@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r282199 r282201  
     12021-09-09  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Position sticky does not work within table cells
     4        https://bugs.webkit.org/show_bug.cgi?id=155496
     5
     6        Reviewed by Simon Fraser.
     7
     8        When computing the content box rect of a sticky container, do not include
     9        intrinsic padding. Instead, use the values computed from CSS. The instrinsic
     10        padding should not limit the movement area of a position:sticky item.
     11
     12        * web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table-ref.html: Added.
     13        * web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table.html: Added.
     14
     15        Test: imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-contained-by-display-table.html
     16
     17        * rendering/RenderBoxModelObject.cpp:
     18        (WebCore::RenderBoxModelObject::computeStickyPositionConstraints const): Use CSS computed
     19        values which do not include intrinsic padding.
     20
    1212021-09-09  Youenn Fablet  <youenn@apple.com>
    222
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r282143 r282201  
    467467        // we use the content box rectangle of the containing block, which is what should constrain the
    468468        // movement.
    469         containerContentRect = containingBlock->contentBoxRect();
     469        containerContentRect = containingBlock->computedCSSContentBoxRect();
    470470    } else {
    471471        containerContentRect = containingBlock->layoutOverflowRect();
Note: See TracChangeset for help on using the changeset viewer.