Bug 58181

Summary: [chromium] Image layers don't update when their contents change
Product: WebKit Reporter: Vangelis Kokkevis <vangelis>
Component: WebCore Misc.Assignee: Vangelis Kokkevis <vangelis>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, enne, jamesr
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch none

Vangelis Kokkevis
Reported 2011-04-08 18:21:27 PDT
When a new Image is passed to an ImageLayerChromium, the contents of the layer aren't properly invalidated and the new image doesn't register. The same problem exists if the image contains an animation (e.g. an animated gif).
Attachments
Patch (17.75 KB, patch)
2011-04-08 18:35 PDT, Vangelis Kokkevis
no flags
Patch (23.24 KB, patch)
2011-04-11 09:42 PDT, Vangelis Kokkevis
no flags
Vangelis Kokkevis
Comment 1 2011-04-08 18:35:22 PDT
James Robinson
Comment 2 2011-04-08 19:00:19 PDT
Comment on attachment 88911 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=88911&action=review Code change looks good, test not quite - the test should go in LayoutTests/compositing/, there's nothing chromium-specific about it - since the test is set up to show red if it fails and green if it passes there's no need for text in the actual output. remove it and put it in an HTML comment in the test in case anyone is unsure - the setTimeout()s seem very wrong - can you get the same result by using layoutTestController.display() to force composites? > LayoutTests/platform/chromium/compositing/image-content-change.html:29 > + }, 20); > + } > + }, 2000); these timeouts are suspicious. where do 20 and 2000 come from? why does this test have to take 2 seconds to complete?
Vangelis Kokkevis
Comment 3 2011-04-11 09:42:38 PDT
Vangelis Kokkevis
Comment 4 2011-04-11 09:47:00 PDT
(In reply to comment #2) > (From update of attachment 88911 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=88911&action=review > > Code change looks good, test not quite > > - the test should go in LayoutTests/compositing/, there's nothing chromium-specific about it Good point. Moved it to LayoutTests/compositing/images > - since the test is set up to show red if it fails and green if it passes there's no need for text in the actual output. remove it and put it in an HTML comment in the test in case anyone is unsure Done. > - the setTimeout()s seem very wrong - can you get the same result by using layoutTestController.display() to force composites? > > > LayoutTests/platform/chromium/compositing/image-content-change.html:29 > > + }, 20); > > + } > > + }, 2000); > > these timeouts are suspicious. where do 20 and 2000 come from? why does this test have to take 2 seconds to complete? You're right, the intervals were kind of arbitrary. I changed them to 0. The timeouts are needed to make sure that the compositor gets triggered before and after the change to make sure we're testing the right thing. Using zero-interval timeouts seems to be common practice in the rest of the layout tests. Also, using timeouts rather than layoutTestController specific functionality has the advantage that the test can be run directly in the browser.
James Robinson
Comment 5 2011-04-11 17:04:29 PDT
Comment on attachment 89017 [details] Patch R=me
WebKit Commit Bot
Comment 6 2011-04-11 23:04:13 PDT
Comment on attachment 89017 [details] Patch Clearing flags on attachment: 89017 Committed r83558: <http://trac.webkit.org/changeset/83558>
WebKit Commit Bot
Comment 7 2011-04-11 23:04:19 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.