Bug 251816 - REGRESSION (258819@main): Wolfram Alpha dropdown box has repaint artifacts
Summary: REGRESSION (258819@main): Wolfram Alpha dropdown box has repaint artifacts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-06 14:22 PST by zalan
Modified: 2023-02-08 06:37 PST (History)
11 users (show)

See Also:


Attachments
Patch (4.04 KB, patch)
2023-02-06 14:25 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (7.51 KB, patch)
2023-02-07 12:47 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (9.42 KB, patch)
2023-02-07 16:19 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2023-02-06 14:22:12 PST
<rdar://104966985>
Comment 1 zalan 2023-02-06 14:25:04 PST
Created attachment 464872 [details]
Patch
Comment 2 Simon Fraser (smfr) 2023-02-06 15:22:37 PST
Comment on attachment 464872 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=464872&action=review

> Source/WebCore/rendering/RenderBlockFlow.cpp:3762
> +            // However at this point with such high IFC coverage, the subsequent layout is very likely to be IFC again.

This is the kind of comment that will go stale fairly fast. I'd suggest rewriting this in a way that is more future-proof.
Comment 3 zalan 2023-02-06 15:36:54 PST
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 464872 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=464872&action=review
> 
> > Source/WebCore/rendering/RenderBlockFlow.cpp:3762
> > +            // However at this point with such high IFC coverage, the subsequent layout is very likely to be IFC again.
> 
> This is the kind of comment that will go stale fairly fast. I'd suggest
> rewriting this in a way that is more future-proof.
I agree such comments may go stale fast in general, but I am somewhat convinced it's not going to be the case here (i.e. we don't go back to performing more legacy line layout) and also in practice this part of the code will be completely removed/restructured very soon with the upcoming "partial layout" work (I consider this as more of a FIXME comment.)
Comment 4 zalan 2023-02-06 15:44:42 PST
(In reply to zalan from comment #3)
> (In reply to Simon Fraser (smfr) from comment #2)
> > Comment on attachment 464872 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=464872&action=review
> > 
> > > Source/WebCore/rendering/RenderBlockFlow.cpp:3762
> > > +            // However at this point with such high IFC coverage, the subsequent layout is very likely to be IFC again.
> > 
> > This is the kind of comment that will go stale fairly fast. I'd suggest
> > rewriting this in a way that is more future-proof.
> I agree such comments may go stale fast in general, but I am somewhat
> convinced it's not going to be the case here (i.e. we don't go back to
> performing more legacy line layout) and also in practice this part of the
> code will be completely removed/restructured very soon with the upcoming
> "partial layout" work (I consider this as more of a FIXME comment.)
or I could just move this part to the commit message.
Comment 5 Darin Adler 2023-02-07 09:41:09 PST
Comment on attachment 464872 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=464872&action=review

>>>> Source/WebCore/rendering/RenderBlockFlow.cpp:3762
>>>> +            // However at this point with such high IFC coverage, the subsequent layout is very likely to be IFC again.
>>> 
>>> This is the kind of comment that will go stale fairly fast. I'd suggest rewriting this in a way that is more future-proof.
>> 
>> I agree such comments may go stale fast in general, but I am somewhat convinced it's not going to be the case here (i.e. we don't go back to performing more legacy line layout) and also in practice this part of the code will be completely removed/restructured very soon with the upcoming "partial layout" work (I consider this as more of a FIXME comment.)
> 
> or I could just move this part to the commit message.

I don’t think that Simon means there will be *less* IFC coverage in the future. But "at this point" is intrinsically about a moment in time. I think he just wants you to reword to say the subsequent layout is likely to be IFC again, without saying "at this point".

That’s future-proof until we get rid of non-IFC entirely, I think.
Comment 6 Darin Adler 2023-02-07 09:41:56 PST
Comment on attachment 464872 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=464872&action=review

>>>>> Source/WebCore/rendering/RenderBlockFlow.cpp:3762
>>>>> +            // However at this point with such high IFC coverage, the subsequent layout is very likely to be IFC again.
>>>> 
>>>> This is the kind of comment that will go stale fairly fast. I'd suggest rewriting this in a way that is more future-proof.
>>> 
>>> I agree such comments may go stale fast in general, but I am somewhat convinced it's not going to be the case here (i.e. we don't go back to performing more legacy line layout) and also in practice this part of the code will be completely removed/restructured very soon with the upcoming "partial layout" work (I consider this as more of a FIXME comment.)
>> 
>> or I could just move this part to the commit message.
> 
> I don’t think that Simon means there will be *less* IFC coverage in the future. But "at this point" is intrinsically about a moment in time. I think he just wants you to reword to say the subsequent layout is likely to be IFC again, without saying "at this point".
> 
> That’s future-proof until we get rid of non-IFC entirely, I think.

And yes, considering a shorter comment, with a more thorough explanation in the commit message, is a good idea. This comment is long enough to be hard to follow.
Comment 7 zalan 2023-02-07 12:27:23 PST
alternatively we could shorten the repaint rect by doing something along the lines of

auto repaintRect = clippedOverflowRectForRepaint(containerForRepaint().renderer);
repaintRectangle({ repaintRect.x(), repaintRect.y(), repaintRect.width(), *m_previousModernLineLayoutContentBoxLogicalHeight }, false);
(as opposed to call repaint())

but I don't think a tall container with constantly changing short content is a super common case.
Comment 8 zalan 2023-02-07 12:47:27 PST
Created attachment 464893 [details]
Patch
Comment 9 zalan 2023-02-07 16:19:42 PST
Created attachment 464899 [details]
Patch
Comment 10 EWS 2023-02-08 06:37:04 PST
Committed 260008@main (f5f87a80a556): <https://commits.webkit.org/260008@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 464899 [details].