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.
Created attachment 462865 [details] Test reduction
Created attachment 462868 [details] Test reduction
<rdar://problem/100901132>
Created attachment 462869 [details] Patch
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.
Created attachment 462870 [details] Patch
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].
(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!