[webkit-dev] RenderStyleConstants.h - enum naming conventions?

Glenn Adams glenn at skynav.com
Thu Aug 23 23:53:23 PDT 2012


I'm implementing a patch for [1], namely to support the CSS3 line-break
property.

[1] https://bugs.webkit.org/show_bug.cgi?id=89235

There is an older -{khtml,webkit}-line-break enum EKHTMLLineBreak defined
in RenderStyleConstants.h. I see that some enums use a 'E' prefix, while
others do not, e.g.,

enum ELineClampType { LineClampLineCount, LineClampPercentage };

vs

enum LineAlign { LineAlignNone, LineAlignEdges };

plus, there appears to be a different convention for enum member names,
e.g.,

enum EKHTMLLineBreak { LBNORMAL, AFTER_WHITE_SPACE };

Would it be better to have:

enum LineBreak { LineBreakNormal, LineBreakAfterWhiteSpace };

or, with the new keywords from CSS3 Text line-break, write this as:

enum LineBreak { LineBreakAuto, LineBreakLoose, LineBreakNormal,
LineBreakStrict, LineBreakAfterWhiteSpace };
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120824/70c9d6c6/attachment.html>


More information about the webkit-dev mailing list