Bug 17994

Summary: REGRESSION (523-525+) View not updated when changing CSS size via JavaScript
Product: WebKit Reporter: Andrea Baron <andrea>
Component: Layout and RenderingAssignee: mitz
Status: VERIFIED FIXED    
Severity: Normal CC: mitz
Priority: P1 Keywords: HasReduction, Regression
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.5   
Attachments:
Description Flags
Test case for width
none
Test case for height
none
Test case for backgroundColor
none
Patch, including change log and pixel test none

Andrea Baron
Reported 2008-03-21 15:40:54 PDT
I could not figure out the real cause of the bug, but I made a reduction that is to the bare minimum: changing, removing or even adding things makes the bug disappear. The css stylings involved are all needed to exhibit the bug. There's an element with an onmouseover event that changes the size of its first child to follow the mouse (like a progress bar that always ends where the mouse is). With Firefox and Safari 3.0.4 all works fine, the bar enlarges and reduces as needed; with Safari 3.1 and the latest WebKit (r31201) the view is not updated. If I add another change (like a changed text) the view is updated. I also saw that if I move the mouse in a certain position, change application and then return to Safari the bar appear in the right position, even if before changing app it was not. This is true for width and height, but trying to do the same thing with the background color, it works in the right way. I uploaded three reductions: one show the bug with width, one with height and the third shows that with backgroundColor it works right; in the first two I left commented the line that changes a text in a div, and this forces the rendering of the page, so the width/height changes. For now on my website (I use this technique for voting) I modify a div adding a comment with the width as a workaround. The bug shown on my website was even stranger: the page was updated only if the content of the div really changed, if I simply put the same text in the div the page was not refreshed. Hope this will be useful.
Attachments
Test case for width (675 bytes, text/html)
2008-03-21 15:41 PDT, Andrea Baron
no flags
Test case for height (675 bytes, text/html)
2008-03-21 15:42 PDT, Andrea Baron
no flags
Test case for backgroundColor (675 bytes, text/html)
2008-03-21 15:42 PDT, Andrea Baron
no flags
Patch, including change log and pixel test (8.78 KB, patch)
2008-03-21 22:01 PDT, mitz
no flags
Andrea Baron
Comment 1 2008-03-21 15:41:35 PDT
Created attachment 19942 [details] Test case for width
Andrea Baron
Comment 2 2008-03-21 15:42:02 PDT
Created attachment 19943 [details] Test case for height
Andrea Baron
Comment 3 2008-03-21 15:42:27 PDT
Created attachment 19944 [details] Test case for backgroundColor
mitz
Comment 4 2008-03-21 19:54:20 PDT
Layout is updated but the view is not repainted.
mitz
Comment 5 2008-03-21 22:01:30 PDT
Created attachment 19955 [details] Patch, including change log and pixel test
mitz
Comment 6 2008-03-25 17:21:40 PDT
Comment on attachment 19955 [details] Patch, including change log and pixel test The patch attached to bug 18063 addresses this bug as well.
mitz
Comment 7 2008-03-26 07:35:29 PDT
Andrea Baron
Comment 8 2008-04-04 09:54:51 PDT
I verified the problem that I reported is now fixed, even the one that I had on my website. Thanks
Note You need to log in before you can comment on or make changes to this bug.