Bug 56209 - [chromium] Avoid updating a composited layer's contents if the layer has nonpositive dimensions
Summary: [chromium] Avoid updating a composited layer's contents if the layer has nonp...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: James Robinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-11 11:19 PST by James Robinson
Modified: 2011-03-11 11:59 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.71 KB, patch)
2011-03-11 11:22 PST, James Robinson
kbr: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Robinson 2011-03-11 11:19:52 PST
[chromium] Avoid updating a composited layer's contents if the layer has nonpositive dimensions
Comment 1 James Robinson 2011-03-11 11:22:10 PST
Created attachment 85500 [details]
Patch
Comment 2 Kenneth Russell 2011-03-11 11:42:29 PST
Comment on attachment 85500 [details]
Patch

In the comment: "the prior to" -> "the behavior prior to".
Comment 3 James Robinson 2011-03-11 11:42:44 PST
Notes for posterity:

The intent of this patch is to mitigate the crash on nytimes.com/chrome (http://code.google.com/p/chromium/issues/detail?id=75563).  The issue is that a composited layer has a negative width due to bug 56153, which is still a mystery but does not seem to be recent.  If updateContents() is called on a ContentLayerChromium with a negative width, it attempts to allocate a PlatformCanvas with a negative width which crashes on Mac and Windows but seems to work fine on Linux.  Such a layer is never actually rendered because the draw() call is guarded by a bounds().isEmpty() check, which returns true (empty) if either width or height are non-positive.

The code prior to r80482 did the update and draw calls at the same time, and so both were guarded by a bounds().isEmpty() check.
Comment 4 James Robinson 2011-03-11 11:59:29 PST
Committed r80869: <http://trac.webkit.org/changeset/80869>