Changeset 286417 in webkit
- Timestamp:
- Dec 2, 2021 12:18:21 AM (8 months ago)
- Location:
- trunk
- Files:
-
- 8 added
- 5 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-bottom-expected.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-bottom.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-left-expected.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-left.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-right-expected.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-right.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-top-expected.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-top.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBox.h (modified) (1 diff)
-
Source/WebCore/rendering/RenderTableCell.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderTableCell.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r286415 r286417 1 2021-12-02 Martin Robinson <mrobinson@webkit.org> 2 3 sticky th or td in table does not stops at specified top 4 https://bugs.webkit.org/show_bug.cgi?id=232431 5 <rdar://problem/85011818> 6 7 Reviewed by Simon Fraser. 8 9 Add new WPT tests that test the behavior of sticky <td> elements in the middle of 10 tables. 11 12 * web-platform-tests/css/css-position/sticky/position-sticky-table-td-bottom-expected.html: Added. 13 * web-platform-tests/css/css-position/sticky/position-sticky-table-td-bottom.html: Added. 14 * web-platform-tests/css/css-position/sticky/position-sticky-table-td-left-expected.html: Added. 15 * web-platform-tests/css/css-position/sticky/position-sticky-table-td-left.html: Added. 16 * web-platform-tests/css/css-position/sticky/position-sticky-table-td-right-expected.html: Added. 17 * web-platform-tests/css/css-position/sticky/position-sticky-table-td-right.html: Added. 18 * web-platform-tests/css/css-position/sticky/position-sticky-table-td-top-expected.html: Added. 19 * web-platform-tests/css/css-position/sticky/position-sticky-table-td-top.html: Added. 20 1 21 2021-12-02 Manuel Rego Casasnovas <rego@igalia.com> 2 22 -
trunk/Source/WebCore/ChangeLog
r286416 r286417 1 2021-12-02 Martin Robinson <mrobinson@webkit.org> 2 3 sticky th or td in table does not stops at specified top 4 https://bugs.webkit.org/show_bug.cgi?id=232431 5 <rdar://problem/85011818> 6 7 Reviewed by Simon Fraser. 8 9 Tests: imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-bottom.html 10 imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-left.html 11 imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-right.html 12 imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-table-td-top.html 13 14 * rendering/RenderBox.h: Make frameRectForStickyPositioning not final. 15 * rendering/RenderTableCell.cpp: 16 (WebCore::RenderTableCell::frameRectForStickyPositioning const): Added this implementation 17 that takes into account that RenderTableCell is positioned relatively to the RenderTableSection. 18 * rendering/RenderTableCell.h: Added method declaration. 19 1 20 2021-12-01 Carlos Garcia Campos <cgarcia@igalia.com> 2 21 -
trunk/Source/WebCore/rendering/RenderBox.h
r286115 r286417 784 784 virtual void computePreferredLogicalWidths(); 785 785 786 LayoutRect frameRectForStickyPositioning() const final{ return frameRect(); }786 LayoutRect frameRectForStickyPositioning() const override { return frameRect(); } 787 787 788 788 LayoutRect computeVisibleRectUsingPaintOffset(const LayoutRect&) const; -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r283893 r286417 204 204 } 205 205 206 LayoutRect RenderTableCell::frameRectForStickyPositioning() const 207 { 208 // RenderTableCell has the RenderTableRow as the container, but is positioned relatively 209 // to the RenderTableSection. The sticky positioning algorithm assumes that elements are 210 // positioned relatively to their container, so we correct for that here. 211 ASSERT(parentBox()); 212 auto returnValue = frameRect(); 213 returnValue.move(-parentBox()->locationOffset()); 214 return returnValue; 215 } 216 206 217 void RenderTableCell::computeIntrinsicPadding(LayoutUnit rowHeight) 207 218 { -
trunk/Source/WebCore/rendering/RenderTableCell.h
r283893 r286417 139 139 void computePreferredLogicalWidths() override; 140 140 141 LayoutRect frameRectForStickyPositioning() const override; 142 141 143 static RenderPtr<RenderTableCell> createTableCellWithStyle(Document&, const RenderStyle&); 142 144
Note: See TracChangeset
for help on using the changeset viewer.