Follow up of bug 70369 where we switched only row / column handling to unsigned, now let's switch the remaining table code to unsigned (where it makes sense).
Created attachment 114614 [details] Proposed change.
Comment on attachment 114614 [details] Proposed change. View in context: https://bugs.webkit.org/attachment.cgi?id=114614&action=review > Source/WebCore/ChangeLog:18 > + The only exception is reverse iterating over the array > + as I did not find a good way of doing that without using > + an unsigned (tried all of the usual suggestions but they > + keep failing locally and using do { } while () is worse). > + Due to the size limits on the columns and rows added in > + bug 71135, it should be difficult to overflow the integer > + in some cases. for (unsigned i = size; i; ) { --i; // Body of loop goes here. }
(In reply to comment #2) > (From update of attachment 114614 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=114614&action=review > > > Source/WebCore/ChangeLog:18 > > + The only exception is reverse iterating over the array > > + as I did not find a good way of doing that without using > > + an unsigned (tried all of the usual suggestions but they > > + keep failing locally and using do { } while () is worse). > > + Due to the size limits on the columns and rows added in > > + bug 71135, it should be difficult to overflow the integer > > + in some cases. > > for (unsigned i = size; i; ) { > --i; > // Body of loop goes here. > } Exactly what I needed, thanks! I tried it and it works perfectly without being too horrible. Better patch forthcoming.
Created attachment 115056 [details] Fixed the reverse iterators after Darin's suggestion.
Comment on attachment 115056 [details] Fixed the reverse iterators after Darin's suggestion. 4>c:\cygwin\home\buildbot\webkit\source\webcore\rendering\RenderTableSection.cpp(1206) : warning C4804: '>=' : unsafe use of type 'bool' in operation Probably need a ? 1 : 0 in there to make Windows build.
Created attachment 115289 [details] Patch for landing
Comment on attachment 115289 [details] Patch for landing Clearing flags on attachment: 115289 Committed r100386: <http://trac.webkit.org/changeset/100386>
All reviewed patches have been landed. Closing bug.