Bug 17994 - REGRESSION (523-525+) View not updated when changing CSS size via JavaScript
Summary: REGRESSION (523-525+) View not updated when changing CSS size via JavaScript
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P1 Normal
Assignee: mitz
URL:
Keywords: HasReduction, Regression
Depends on:
Blocks:
 
Reported: 2008-03-21 15:40 PDT by Andrea Baron
Modified: 2008-04-04 09:54 PDT (History)
1 user (show)

See Also:


Attachments
Test case for width (675 bytes, text/html)
2008-03-21 15:41 PDT, Andrea Baron
no flags Details
Test case for height (675 bytes, text/html)
2008-03-21 15:42 PDT, Andrea Baron
no flags Details
Test case for backgroundColor (675 bytes, text/html)
2008-03-21 15:42 PDT, Andrea Baron
no flags Details
Patch, including change log and pixel test (8.78 KB, patch)
2008-03-21 22:01 PDT, mitz
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Baron 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.
Comment 1 Andrea Baron 2008-03-21 15:41:35 PDT
Created attachment 19942 [details]
Test case for width
Comment 2 Andrea Baron 2008-03-21 15:42:02 PDT
Created attachment 19943 [details]
Test case for height
Comment 3 Andrea Baron 2008-03-21 15:42:27 PDT
Created attachment 19944 [details]
Test case for backgroundColor
Comment 4 mitz 2008-03-21 19:54:20 PDT
Layout is updated but the view is not repainted.
Comment 5 mitz 2008-03-21 22:01:30 PDT
Created attachment 19955 [details]
Patch, including change log and pixel test
Comment 6 mitz 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.
Comment 7 mitz 2008-03-26 07:35:29 PDT
Fixed in <http://trac.webkit.org/projects/webkit/changeset/31313>.
Comment 8 Andrea Baron 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