RESOLVED FIXED 8910
Various code cleanups in RenderBox
https://bugs.webkit.org/show_bug.cgi?id=8910
Summary Various code cleanups in RenderBox
Sam Weinig
Reported 2006-05-14 19:42:05 PDT
mostly deals with calcWidth()
Attachments
patch (9.25 KB, patch)
2006-05-14 19:45 PDT, Sam Weinig
darin: review-
patch 2 (9.41 KB, patch)
2006-05-15 05:46 PDT, Sam Weinig
darin: review+
Sam Weinig
Comment 1 2006-05-14 19:45:48 PDT
Created attachment 8312 [details] patch cleanup and slight optimizations
Darin Adler
Comment 2 2006-05-14 20:23:41 PDT
Comment on attachment 8312 [details] patch I'm not fond of adding parentheses around the equality comparisons in if statements. I don't like formatting where a continued if condition has the same indenting level as the code that will execute if the if is true. I typically indent the if condition an extra level to avoid this. In headers, I like leaving out the parameter name if it's completely redundant with the type, so all those "WidthType widthType" should just be "WidthType". + int maxW = calcWidthUsing(MaxWidth, containerWidth); Two spaces here after the = sign, should just be one. I don't understand why we'd set m_marginLeft and m_marginRight to 0 just before setting them inside the width.isAuto() case. Can those lines go inside the else? The changes look good otherwise. I like the continued cleanup of calcWidthUsing. I'm tempted to say review+, but since this is all about style I think I'll say review- for the m_marginLeft/Right thing if for nowthing else.
Sam Weinig
Comment 3 2006-05-15 05:46:20 PDT
Created attachment 8317 [details] patch 2 updated to address darin's comments
Darin Adler
Comment 4 2006-05-15 11:28:58 PDT
Comment on attachment 8317 [details] patch 2 r=me
Note You need to log in before you can comment on or make changes to this bug.