[Webkit-unassigned] [Bug 259018] Potentially redundant condition in LocalFrameView style functions
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jul 8 16:16:04 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=259018
--- Comment #3 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
(In reply to Ahmad Saleem from comment #1)
> Do you want to expand scope of this bug?
>
> I think we can add more checks in 'addScrollableArea' and
> 'containsScrollableArea' to also assert to confirm we have 'ScrollableArea'.
>
>
> bool LocalFrameView::addScrollableArea(ScrollableArea* scrollableArea)
> {
> ASSERT(scrollableArea);
>
>
> _________
>
> bool LocalFrameView::containsScrollableArea(ScrollableArea* scrollableArea)
> const
> {
>
> ASSERT(scrollableArea);
> if (!m_scrollableAreas || !scrollableArea)
> return false;
>
> ^ Kind of early return, if we don't have scrollableArea.
>
> _____
>
> I think it would make scroll code bit more robust as well.
>
> ________
>
>
> If not, I am happy to separate PR, above compiles in my local build. :-)
Although 'containsScrollableArea' is not used much as well. (If we can also explore, if we can remove it).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230708/fb1472eb/attachment.htm>
More information about the webkit-unassigned
mailing list