Bug 70867

Summary: Use enum instead of bool to represent -webkit-column-span property.
Product: WebKit Reporter: Luke Macpherson <macpherson>
Component: New BugsAssignee: Luke Macpherson <macpherson>
Status: RESOLVED FIXED    
Severity: Normal CC: macpherson, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Luke Macpherson
Reported 2011-10-25 20:09:41 PDT
Use enum instead of bool to represent -webkit-column-span property.
Attachments
Patch (9.10 KB, patch)
2011-10-25 20:12 PDT, Luke Macpherson
no flags
Luke Macpherson
Comment 1 2011-10-25 20:12:42 PDT
Darin Adler
Comment 2 2011-10-26 09:52:58 PDT
Comment on attachment 112443 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=112443&action=review > Source/WebCore/rendering/style/RenderStyleConstants.h:86 > +enum ColumnSpan { ColumnSpanOne = 0, ColumnSpanAll}; Not sure I see the value in specifying "= 0" here and not specifying "= 1". I’d leave off the "= 0" myself.
Luke Macpherson
Comment 3 2011-10-27 16:29:45 PDT
Comment on attachment 112443 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=112443&action=review >> Source/WebCore/rendering/style/RenderStyleConstants.h:86 >> +enum ColumnSpan { ColumnSpanOne = 0, ColumnSpanAll}; > > Not sure I see the value in specifying "= 0" here and not specifying "= 1". I’d leave off the "= 0" myself. The reason I do it this way is to make the behavior clear when used in logical statements. I'm not sure that the C++ spec defines the first enum value to be zero, even though most compilers do generate values that way. By doing this I am trying to express that ColumSpanOne is always logically false, and ColumnSpanAll is logically true (!0). Is that logic flawed? It seems to come up in reviews from time to time.
WebKit Review Bot
Comment 4 2011-10-28 12:15:43 PDT
Comment on attachment 112443 [details] Patch Clearing flags on attachment: 112443 Committed r98748: <http://trac.webkit.org/changeset/98748>
WebKit Review Bot
Comment 5 2011-10-28 12:15:47 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.