Bug 187903 - Table caption jumps to the bottom of the table after simplified table relayout
Summary: Table caption jumps to the bottom of the table after simplified table relayout
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: Safari 11
Hardware: Mac macOS 10.12
: P2 Major
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-23 05:11 PDT by Denys
Modified: 2021-06-13 13:06 PDT (History)
16 users (show)

See Also:


Attachments
another test case (552 bytes, text/html)
2021-04-07 23:32 PDT, Fujii Hironori
no flags Details
WIP patch (1004 bytes, patch)
2021-04-08 00:13 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
WIP patch (586 bytes, patch)
2021-04-08 19:49 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (5.15 KB, patch)
2021-04-08 23:01 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denys 2018-07-23 05:11:04 PDT
Environment:

Safari: 11.1.1 (12605.2.8)
macOS Sierra: 10.12.6 (16G1408)

Bug description:

When <table> has a positioned child element (or an element that creates a new stacking context), and we hide/show this element, the table <caption> element starts jumping to the bottom of the table and back.


How to reproduce:

1) Go to https://codepen.io/webschik/pen/ZjeqBg
2) Move a cursor to the table cell to show the popup element and see how table <caption> behaves.
Comment 1 Radar WebKit Bug Importer 2018-07-23 10:58:22 PDT
<rdar://problem/42506245>
Comment 2 Denys 2021-01-28 09:14:12 PST
This issue is still reproducible in Safari 14.0.2 (15610.3.7.1.10, 15610)
Comment 3 mkumaran 2021-04-05 04:27:32 PDT
Issue still exist on Safari Version 14.0.3 (15610.4.3.1.6, 15610).
Comment 4 Fujii Hironori 2021-04-07 23:32:01 PDT
Created attachment 425479 [details]
another test case
Comment 5 Fujii Hironori 2021-04-08 00:13:51 PDT
Created attachment 425480 [details]
WIP patch

resetLogicalHeightBeforeLayoutIfNeeded doesn't seem to be called in the simplifiedLayout code path.
Comment 6 Fujii Hironori 2021-04-08 19:49:11 PDT
Created attachment 425575 [details]
WIP patch
Comment 7 Fujii Hironori 2021-04-08 23:01:25 PDT
Created attachment 425587 [details]
Patch
Comment 8 Fujii Hironori 2021-04-13 12:37:13 PDT
Could anyone review?
Comment 9 Fujii Hironori 2021-04-13 22:34:40 PDT
Comment on attachment 425587 [details]
Patch

Clearing flags on attachment: 425587

Committed r275931 (236493@main): <https://commits.webkit.org/236493@main>
Comment 10 Fujii Hironori 2021-04-13 22:34:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 renadr 2021-06-11 09:03:08 PDT
I still have this issue on safari 14.1.

The caption is still displayed on top but an invisible space shows up at the end. And when I look at this with the devtool it's highlighting the caption.
Comment 12 renadr 2021-06-11 09:05:42 PDT
I forgot to tell that in my case it's like that. But if I use the given codepen on Safari, I still have the same bug as @Denys !
Comment 13 Fujii Hironori 2021-06-13 13:06:26 PDT
Right. It seems that Safari 14.1 doesn't include the fix.
Please try the latest Safari Technology Preview 125.
https://developer.apple.com/safari/technology-preview/