Bug 136218 - [CSS Grid Layout] Replace the usage of size_t by unsigned
Summary: [CSS Grid Layout] Replace the usage of size_t by unsigned
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
URL:
Keywords:
Depends on: 136217
Blocks: 60731
  Show dependency treegraph
 
Reported: 2014-08-25 03:29 PDT by Sergio Villar Senin
Modified: 2014-11-20 01:49 PST (History)
9 users (show)

See Also:


Attachments
Patch (40.61 KB, patch)
2014-11-12 10:37 PST, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Patch (42.63 KB, patch)
2014-11-13 07:22 PST, Sergio Villar Senin
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2014-08-25 03:29:18 PDT
size_t is generally used for sizes of memory objects. We're using it for indexes and spans in the grid. The fact that we're using Vectors to represent the grid should not force us to use size_t, unsigned seems to fit better in this case.
Comment 1 Sergio Villar Senin 2014-08-25 03:30:21 PDT
See for example: https://bugs.webkit.org/show_bug.cgi?id=135701#c2
Comment 2 Sergio Villar Senin 2014-11-12 10:37:45 PST
Created attachment 241434 [details]
Patch
Comment 3 Sergio Villar Senin 2014-11-13 07:22:11 PST
Created attachment 241483 [details]
Patch

Added a missing conversion
Comment 4 Sergio Villar Senin 2014-11-18 00:48:40 PST
Would it be possible to get this reviewed?
Comment 5 Benjamin Poulain 2014-11-18 01:12:49 PST
Comment on attachment 241483 [details]
Patch

Looks reasonable.
If someones creates a grid overflowing unsigned, she/he is crazy :)
Comment 6 Sergio Villar Senin 2014-11-18 01:33:55 PST
(In reply to comment #5)
> Comment on attachment 241483 [details]
> Patch
> 
> Looks reasonable.
> If someones creates a grid overflowing unsigned, she/he is crazy :)

Yeah :)

In any case, I have uploaded this only after landing bug 136217 that ensures that we won't overflow unsigned as it sets a hard limit to the number of tracks (1 million as recommended by specs).
Comment 7 Sergio Villar Senin 2014-11-20 01:49:12 PST
Committed r176390: <http://trac.webkit.org/changeset/176390>