Bug 246203 - REGRESSION (r294902): Overflowed area is not repainted when just changed to "hidden".
Summary: REGRESSION (r294902): Overflowed area is not repainted when just changed to "...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-06 23:56 PDT by Takao Baba
Modified: 2022-10-08 07:54 PDT (History)
10 users (show)

See Also:


Attachments
Test reduction (446 bytes, text/html)
2022-10-07 07:56 PDT, zalan
no flags Details
Test reduction (439 bytes, text/html)
2022-10-07 09:21 PDT, zalan
no flags Details
Patch (5.39 KB, patch)
2022-10-07 12:18 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (4.65 KB, patch)
2022-10-07 12:24 PDT, 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 Takao Baba 2022-10-06 23:56:19 PDT
Steps to reproduce:
1. Open https://jsbin.com/pukomelowe/edit?html,css,js,output by Safari 16. (It doesn't matter if it is iOS or macOS)
2. Click "1". Then the first <p> is wrapped by a black border.
3. Click "2". Then the second <p> is wrapped by a black border.

Expected behavior:
The border around the first <p> disappears.

Actual behavior:
On Safari 16, the first border still remains.

I've tested on Safari 16.0 (17614.1.25.9.10) on macOS 12.6 and iPad Simulator 16.0.
iOS 15.7 works well. This is a regression of iOS 16.
Comment 1 zalan 2022-10-07 07:56:22 PDT
Created attachment 462865 [details]
Test reduction
Comment 2 zalan 2022-10-07 09:21:34 PDT
Created attachment 462868 [details]
Test reduction
Comment 3 Radar WebKit Bug Importer 2022-10-07 09:23:26 PDT
<rdar://problem/100901132>
Comment 4 zalan 2022-10-07 12:18:14 PDT
Created attachment 462869 [details]
Patch
Comment 5 Simon Fraser (smfr) 2022-10-07 12:21:02 PDT
Comment on attachment 462869 [details]
Patch

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

> COMMIT_MESSAGE:7
> +1. When a layer has "full repaint" flag set we skip any subsequent repaint requests on the associated renderer and on any of its descendant because we know that the layer would eventually issue a repaint on the enclosing rect after layout.

its descendant_s_

> Source/WebCore/rendering/RenderObject.cpp:982
> +    if (!isRooted() || view().printing())

RenderObject::repaintRectangle() calls this, so now we have two calls to `isRooted` in this code path? That's an ancestor tree walk.
Comment 6 zalan 2022-10-07 12:24:58 PDT
Created attachment 462870 [details]
Patch
Comment 7 EWS 2022-10-08 07:42:14 PDT
Committed 255312@main (3cf19dcd601e): <https://commits.webkit.org/255312@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 462870 [details].
Comment 8 zalan 2022-10-08 07:54:31 PDT
(In reply to Takao Baba from comment #0)
> Steps to reproduce:
> 1. Open https://jsbin.com/pukomelowe/edit?html,css,js,output by Safari 16.
> (It doesn't matter if it is iOS or macOS)
> 2. Click "1". Then the first <p> is wrapped by a black border.
> 3. Click "2". Then the second <p> is wrapped by a black border.
> 
> Expected behavior:
> The border around the first <p> disappears.
> 
> Actual behavior:
> On Safari 16, the first border still remains.
> 
> I've tested on Safari 16.0 (17614.1.25.9.10) on macOS 12.6 and iPad
> Simulator 16.0.
> iOS 15.7 works well. This is a regression of iOS 16.
Thanks for filing this issue!