REOPENED 241104
Spacing after some posts is too large on Dead by Daylight forums
https://bugs.webkit.org/show_bug.cgi?id=241104
Summary Spacing after some posts is too large on Dead by Daylight forums
Jason Hansen
Reported 2022-05-30 11:04:40 PDT
Created attachment 459867 [details] spacing_issue When viewing Dead by Daylight forums, the spacing after some posts are very large and need to scroll down a whole screen to see the next post. This does not occur within latest versions of Chrome or Firefox. An example can be found here - about half way down the page; https://forum.deadbydaylight.com/en/discussion/325745/do-you-miss-anything-from-old-dbd#latest I've also included a screenshot.
Attachments
spacing_issue (542.71 KB, image/png)
2022-05-30 11:04 PDT, Jason Hansen
no flags
Test reduction (308 bytes, text/html)
2022-05-31 11:16 PDT, alan
no flags
Screenshots (1.49 MB, image/png)
2022-05-31 12:34 PDT, alan
no flags
Patch (5.88 KB, patch)
2022-05-31 21:04 PDT, alan
no flags
Patch (6.71 KB, patch)
2022-05-31 21:27 PDT, alan
ews-feeder: commit-queue-
Patch (7.04 KB, patch)
2022-06-01 07:54 PDT, alan
no flags
Alexey Proskuryakov
Comment 1 2022-05-30 19:02:27 PDT
A lot of the time, such issues are caused by websites having browser specific code that is supposed to work around WebKit bugs, but instead breaks the websites. I tried to check if this is the case here by changing user agent string via Developer menu, but this forum software blocks UA spoofing, so the page doesn't open when using Chrome or Firefox UA.
alan
Comment 2 2022-05-31 11:16:33 PDT
Created attachment 459892 [details] Test reduction
alan
Comment 3 2022-05-31 11:36:22 PDT
Normally "height: -webkit-fill-available" stretches the block box to the height of the containing block (in a simple one child only case). Here the containing block's height in not definite meaning that it depends on the descendant content, while the child box says "stretch me all the way" (a bit of a circular dependency). It looks like we pick the viewport height as the base for such stretching to resolve this circular dependency.
alan
Comment 4 2022-05-31 11:40:53 PDT
(In reply to zalan from comment #3) > Normally "height: -webkit-fill-available" stretches the block box to the > height of the containing block (in a simple one child only case). Here the > containing block's height in not definite meaning that it depends on the > descendant content, while the child box says "stretch me all the way" (a bit > of a circular dependency). It looks like we pick the viewport height as the > base for such stretching to resolve this circular dependency. The gap changes as the browser window gets taller/shorter (after reload).
alan
Comment 5 2022-05-31 12:08:55 PDT
so yeah, apparently RenderBox::computeIntrinsicLogicalContentHeightUsing (with fill-available) walks the containing block tree all the way up to the first block container with definite height. In many cases that's the ICB -> viewport size.
alan
Comment 6 2022-05-31 12:30:38 PDT
Checking if available height is resolvable within the containing block fixes this issue, but I need to read this code a bit more to understand why we let this function climb across containing blocks.
alan
Comment 7 2022-05-31 12:34:17 PDT
Created attachment 459895 [details] Screenshots
alan
Comment 8 2022-05-31 21:04:10 PDT
alan
Comment 9 2022-05-31 21:04:44 PDT
Antti Koivisto
Comment 10 2022-05-31 21:09:12 PDT
Comment on attachment 459918 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=459918&action=review > Source/WebCore/rendering/RenderBox.cpp:3262 > +// FIXME: evaluate whether this should be a method of RenderObject instead. why does that need to be evaluated?
Antti Koivisto
Comment 11 2022-05-31 21:11:02 PDT
Comment on attachment 459918 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=459918&action=review > Source/WebCore/rendering/RenderBox.cpp:3282 > + // Until then, this is mostly just guesswork. Sounds solid!
Antti Koivisto
Comment 12 2022-05-31 21:14:18 PDT
Comment on attachment 459918 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=459918&action=review >> Source/WebCore/rendering/RenderBox.cpp:3262 >> +// FIXME: evaluate whether this should be a method of RenderObject instead. > > why does that need to be evaluated? Also this can probably take RenderBox
Antti Koivisto
Comment 13 2022-05-31 21:14:19 PDT
Comment on attachment 459918 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=459918&action=review >> Source/WebCore/rendering/RenderBox.cpp:3262 >> +// FIXME: evaluate whether this should be a method of RenderObject instead. > > why does that need to be evaluated? Also this can probably take RenderBox
alan
Comment 14 2022-05-31 21:27:22 PDT
alan
Comment 15 2022-05-31 21:27:59 PDT
(In reply to Antti Koivisto from comment #10) > Comment on attachment 459918 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=459918&action=review > > > Source/WebCore/rendering/RenderBox.cpp:3262 > > +// FIXME: evaluate whether this should be a method of RenderObject instead. > > why does that need to be evaluated? Done! Evaluated!
alan
Comment 16 2022-05-31 21:28:19 PDT
(In reply to Antti Koivisto from comment #13) > Comment on attachment 459918 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=459918&action=review > > >> Source/WebCore/rendering/RenderBox.cpp:3262 > >> +// FIXME: evaluate whether this should be a method of RenderObject instead. > > > > why does that need to be evaluated? > > Also this can probably take RenderBox Good point! Done.
alan
Comment 17 2022-05-31 21:36:27 PDT
(In reply to Antti Koivisto from comment #11) > Comment on attachment 459918 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=459918&action=review > > > Source/WebCore/rendering/RenderBox.cpp:3282 > > + // Until then, this is mostly just guesswork. > > Sounds solid! Yeah, so the proper way to resolve this (and this is exactly what LFC does) is instead of climbing the ancestor chain to resolve certain values (e.g. height), we should pass in a constraint value (e.g. containing block's height if available). It would make this code look like: if (height.isFillAvailable() && availableSpace) return availableSpace; return { }; vs. trying to figure out all the conditions where the containing block may have a valid value to resolve against.
alan
Comment 18 2022-06-01 07:54:56 PDT
EWS
Comment 19 2022-06-01 10:26:23 PDT
Committed r295094 (251189@main): <https://commits.webkit.org/251189@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 459928 [details].
Jason Hansen
Comment 20 2022-06-22 09:39:10 PDT
There isn't a way to know when or what release this will appear in for me to test, right? 147 came out today, but no mention of this bug.
alan
Comment 21 2022-06-22 10:29:18 PDT
(In reply to Jason Hansen from comment #20) > There isn't a way to know when or what release this will appear in for me to > test, right? 147 came out today, but no mention of this bug. You are right, 147 does not have this fix yet :/ I'd come back and check when 148 is out. Sorry about that.
Jason Hansen
Comment 22 2022-06-22 10:31:16 PDT
(In reply to zalan from comment #21) > (In reply to Jason Hansen from comment #20) > > There isn't a way to know when or what release this will appear in for me to > > test, right? 147 came out today, but no mention of this bug. > You are right, 147 does not have this fix yet :/ I'd come back and check > when 148 is out. Sorry about that. No need to apologize and appreciate the response. Thank you.
Jason Hansen
Comment 23 2022-07-01 12:41:29 PDT
I can confirm that Safari Tech Preview 148 fixed this issue.
Jason Hansen
Comment 24 2022-07-01 13:05:15 PDT
(In reply to Jason Hansen from comment #23) > I can confirm that Safari Tech Preview 148 fixed this issue. Even thought it wasn't mentioned in the release notes. :/
Brent Fulgham
Comment 25 2022-07-01 14:01:53 PDT
(In reply to Jason Hansen from comment #24) > (In reply to Jason Hansen from comment #23) > > I can confirm that Safari Tech Preview 148 fixed this issue. > > Even thought it wasn't mentioned in the release notes. :/ We should have! Doh!
alan
Comment 26 2022-07-01 15:42:48 PDT
(In reply to Brent Fulgham from comment #25) > (In reply to Jason Hansen from comment #24) > > (In reply to Jason Hansen from comment #23) > > > I can confirm that Safari Tech Preview 148 fixed this issue. > > > > Even thought it wasn't mentioned in the release notes. :/ > > We should have! Doh! Yeah how did we miss this.
Note You need to log in before you can comment on or make changes to this bug.