RESOLVED FIXED 227899
Rename hasOverflowClip() to prepare for the real overflow:clip
https://bugs.webkit.org/show_bug.cgi?id=227899
Summary Rename hasOverflowClip() to prepare for the real overflow:clip
Rob Buis
Reported 2021-07-13 00:13:43 PDT
Introduce isScrollContainer helper and start using it.
Attachments
Patch (7.67 KB, patch)
2021-07-13 00:30 PDT, Rob Buis
no flags
Patch (8.14 KB, patch)
2021-07-13 02:38 PDT, Rob Buis
no flags
Patch (5.33 KB, patch)
2021-07-13 11:41 PDT, Rob Buis
no flags
Patch (82.89 KB, patch)
2021-07-13 13:27 PDT, Rob Buis
no flags
Rob Buis
Comment 1 2021-07-13 00:30:36 PDT
Rob Buis
Comment 2 2021-07-13 02:38:49 PDT
Simon Fraser (smfr)
Comment 3 2021-07-13 09:39:21 PDT
Comment on attachment 433396 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433396&action=review > Source/WebCore/ChangeLog:14 > + The overflow property decides whether the RenderObject > + is scrollable, isScrollContainer captures this. > + Right now isScrollContainer will only return false for > + overflow visible, but the upcoming overflow clip is > + also not scrollable. Let's choose a good name for this. isScrollContainer() is vague because the element might not be scrollable, and overflow:hidden is not user-scrollable, but is programmatically scrollable. I want "overflow" in the name, because it's about the overflow property. We also need to decide if this helper will return true or false for overflow:clip, and if we need another helper for the visible/clip combination. For the current behavior, I suggest: hasNonVisibleOverflow() For the future "potentially scrollable" case I suggest: hasPotentiallyScrollableOverfow() or something.
Rob Buis
Comment 4 2021-07-13 11:41:15 PDT
Rob Buis
Comment 5 2021-07-13 11:44:12 PDT
Comment on attachment 433396 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433396&action=review >> Source/WebCore/ChangeLog:14 >> + also not scrollable. > > Let's choose a good name for this. > > isScrollContainer() is vague because the element might not be scrollable, and overflow:hidden is not user-scrollable, but is programmatically scrollable. I want "overflow" in the name, because it's about the overflow property. > > We also need to decide if this helper will return true or false for overflow:clip, and if we need another helper for the visible/clip combination. > > For the current behavior, I suggest: > > hasNonVisibleOverflow() > > For the future "potentially scrollable" case I suggest: > > hasPotentiallyScrollableOverfow() or something. That makes sense. But hasNonVisibleOverflow would just be a rename of hasOverflowClip I think (chromium did this)? I think it helps readibility and overflow: clip to add a method hasProgrammaticallyScrollableOverflow for programmatic scroll API, let me know what you think.
Simon Fraser (smfr)
Comment 6 2021-07-13 12:05:02 PDT
(In reply to Rob Buis from comment #5) > Comment on attachment 433396 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=433396&action=review > > >> Source/WebCore/ChangeLog:14 > >> + also not scrollable. > > > > Let's choose a good name for this. > > > > isScrollContainer() is vague because the element might not be scrollable, and overflow:hidden is not user-scrollable, but is programmatically scrollable. I want "overflow" in the name, because it's about the overflow property. > > > > We also need to decide if this helper will return true or false for overflow:clip, and if we need another helper for the visible/clip combination. > > > > For the current behavior, I suggest: > > > > hasNonVisibleOverflow() > > > > For the future "potentially scrollable" case I suggest: > > > > hasPotentiallyScrollableOverfow() or something. > > That makes sense. But hasNonVisibleOverflow would just be a rename of > hasOverflowClip I think (chromium did this)? That's the point! > I think it helps readibility and overflow: clip to add a method > hasProgrammaticallyScrollableOverflow for programmatic scroll API, let me > know what you think. But hasProgrammaticallyScrollableOverflow is also ambiguous: is it hasProgrammaticallyOrUserScrollableOverflow ?
Rob Buis
Comment 7 2021-07-13 13:27:43 PDT
Rob Buis
Comment 8 2021-07-13 14:19:32 PDT
Comment on attachment 433396 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433396&action=review >>>> Source/WebCore/ChangeLog:14 >>>> + also not scrollable. >>> >>> Let's choose a good name for this. >>> >>> isScrollContainer() is vague because the element might not be scrollable, and overflow:hidden is not user-scrollable, but is programmatically scrollable. I want "overflow" in the name, because it's about the overflow property. >>> >>> We also need to decide if this helper will return true or false for overflow:clip, and if we need another helper for the visible/clip combination. >>> >>> For the current behavior, I suggest: >>> >>> hasNonVisibleOverflow() >>> >>> For the future "potentially scrollable" case I suggest: >>> >>> hasPotentiallyScrollableOverfow() or something. >> >> That makes sense. But hasNonVisibleOverflow would just be a rename of hasOverflowClip I think (chromium did this)? >> >> I think it helps readibility and overflow: clip to add a method hasProgrammaticallyScrollableOverflow for programmatic scroll API, let me know what you think. > > That's the point! Oops, I thought somehow the bug was about adding a new method. Done.
Rob Buis
Comment 9 2021-07-13 14:24:06 PDT
(In reply to Simon Fraser (smfr) from comment #6) > > I think it helps readibility and overflow: clip to add a method > > hasProgrammaticallyScrollableOverflow for programmatic scroll API, let me > > know what you think. > > But hasProgrammaticallyScrollableOverflow is also ambiguous: is it > hasProgrammaticallyOrUserScrollableOverflow ? My idea was to restrict that one to programmatic scrolling only. I am not sure yet if we need a hasUserScrollableOverflow. Both may be simple aliases though, anyway this is probably pretty minor, will have another look at that kind of naming tomorrow.
EWS
Comment 10 2021-07-14 13:40:58 PDT
Committed r279918 (239667@main): <https://commits.webkit.org/239667@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433446 [details].
Radar WebKit Bug Importer
Comment 11 2021-07-14 13:41:37 PDT
Note You need to log in before you can comment on or make changes to this bug.