Bug 227899 - Rename hasOverflowClip() to prepare for the real overflow:clip
Summary: Rename hasOverflowClip() to prepare for the real overflow:clip
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords: InRadar
Depends on:
Blocks: 198230
  Show dependency treegraph
 
Reported: 2021-07-13 00:13 PDT by Rob Buis
Modified: 2021-07-14 13:41 PDT (History)
20 users (show)

See Also:


Attachments
Patch (7.67 KB, patch)
2021-07-13 00:30 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (8.14 KB, patch)
2021-07-13 02:38 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (5.33 KB, patch)
2021-07-13 11:41 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (82.89 KB, patch)
2021-07-13 13:27 PDT, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2021-07-13 00:13:43 PDT
Introduce isScrollContainer helper and start using it.
Comment 1 Rob Buis 2021-07-13 00:30:36 PDT
Created attachment 433393 [details]
Patch
Comment 2 Rob Buis 2021-07-13 02:38:49 PDT
Created attachment 433396 [details]
Patch
Comment 3 Simon Fraser (smfr) 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.
Comment 4 Rob Buis 2021-07-13 11:41:15 PDT
Created attachment 433435 [details]
Patch
Comment 5 Rob Buis 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.
Comment 6 Simon Fraser (smfr) 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 ?
Comment 7 Rob Buis 2021-07-13 13:27:43 PDT
Created attachment 433446 [details]
Patch
Comment 8 Rob Buis 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.
Comment 9 Rob Buis 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.
Comment 10 EWS 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].
Comment 11 Radar WebKit Bug Importer 2021-07-14 13:41:37 PDT
<rdar://problem/80594572>