NEW 149035
'relative' positioned child element not cleared completely if parent's style.display is set to 'none'
https://bugs.webkit.org/show_bug.cgi?id=149035
Summary 'relative' positioned child element not cleared completely if parent's style....
Grzegorz Ludwikowski
Reported 2015-09-10 05:49:10 PDT
Created attachment 260919 [details] Minimal testcase for reproduction. Reproduction: see minimal_testcase_webkit.html, click 'NEW' button. It sets 'NEW' button parent div's 'style.display' to none, but some part of the 'NEW' button isn't repainted/cleared. If 'BACK' button is pressed, the 'NEW' button is correctly repainted/shown back to screen. From my analysis I've found out that for the 'NEW' button, during clearing it from screen, its repaint/dirty rectangle doesn't include an offset from being below '.somespace' div. Yet during painting it back, its repaint rectangle is calculated correctly, and includes the offset (200px). I've tried to find the reason for this difference. Render tree during removing '.somespace' div from screen lacks one anonymous RenderBox, which is present during layouting the div back to screen (as RenderButton parent). Processing this RenderBox in RenderBox.cpp:2233 (computeRectForRepaint(...) - "topLeft.move(locationOffset);") adds mentioned offset. This anonymous RenderBox is removed from the render tree in RenderBlock.cpp:752 (removeChild(...) - "collapseAnonymousBoxChild(*this, downcast<RenderBlock>(child));") earlier in repainting, during processing '.somespace' div's rendertree node. There is a test, which decides whether it is safe to collapseAnonymousBoxChild, but it evaluates to true. If I skip the call to collapseAnonymousBoxChild in a debugger, the button is cleared correctly. 'NEW' button is cleared correctly on Firefox and Chromium. Tested on WebKit MiniBrowserEFL @r189566 on Linux.
Attachments
Minimal testcase for reproduction. (1.18 KB, text/html)
2015-09-10 05:49 PDT, Grzegorz Ludwikowski
no flags
Screenshot before clicking 'NEW' button (3.34 KB, image/png)
2015-09-10 05:55 PDT, Grzegorz Ludwikowski
no flags
Screenshot after clicking 'NEW' button, part of the 'NEW' button not cleared from screen (4.34 KB, image/png)
2015-09-10 05:57 PDT, Grzegorz Ludwikowski
no flags
Screenshot, rendered correctly of Firefox (3.39 KB, image/png)
2015-09-10 06:02 PDT, Grzegorz Ludwikowski
no flags
Grzegorz Ludwikowski
Comment 1 2015-09-10 05:55:34 PDT
Created attachment 260920 [details] Screenshot before clicking 'NEW' button
Grzegorz Ludwikowski
Comment 2 2015-09-10 05:57:06 PDT
Created attachment 260921 [details] Screenshot after clicking 'NEW' button, part of the 'NEW' button not cleared from screen
Grzegorz Ludwikowski
Comment 3 2015-09-10 06:02:45 PDT
Created attachment 260922 [details] Screenshot, rendered correctly of Firefox
Ahmad Saleem
Comment 4 2022-12-16 02:51:30 PST
I am able to reproduce this bug in Safari Technology Preview 160, it seems to be painting or invalidation issue where when clicking "Next", it does show both "Back" and "Next" but if I move to different tab or resize then "Next" go away. It works perfectly fine on first try in Chrome Canary 110 and Firefox Nightly 110. Just wanted to share updated testing result. Thanks!
Note You need to log in before you can comment on or make changes to this bug.