Bug 139058

Summary: [CSS Grid Layout] Wrong arguments passed to computeNormalizedFractionBreadth
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: CSSAssignee: Sergio Villar Senin <svillar>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, darin, dino, esprehn+autocc, glenn, hyatt, jfernandez, kling, kondapallykalyan, rego, svillar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 139059    
Bug Blocks: 60731    
Attachments:
Description Flags
Patch kling: review+

Description Sergio Villar Senin 2014-11-26 03:57:07 PST
RenderGrid::computeNormalizedFractionBreadth() is supposed to get as fourth argument either the grid element's content box size or the max-size of a particular grid item. For the former we were incorrectly passing the free space after distributing the available space to tracks.

Apart from that, that method has a bug in its implementation. As we were using the free space instead of the grid element's content box size, we didn't have to subtract the usedBreadth of grid tracks from the passed in value. That does not work for the case of the caller passing the max-size of a particular item.
Comment 1 Sergio Villar Senin 2015-01-19 06:40:03 PST
Created attachment 244902 [details]
Patch
Comment 2 Andreas Kling 2015-01-19 11:34:01 PST
Comment on attachment 244902 [details]
Patch

r=me
Comment 3 Sergio Villar Senin 2015-01-20 01:19:51 PST
Committed r178701: <http://trac.webkit.org/changeset/178701>