Bug 38046

Summary: Need borderAndPadding(Width|Height)
Product: WebKit Reporter: Shinichiro Hamaji <hamaji>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1
none
Patch v2 darin: review+

Description Shinichiro Hamaji 2010-04-23 08:49:26 PDT
We have many paddingTop()+paddingBottom()+borderTop()+borderBottom() in WebCore code. Let's add paddingAndBorder(Width|Height) and use it.
Comment 1 Shinichiro Hamaji 2010-04-23 08:52:34 PDT
Created attachment 54164 [details]
Patch v1
Comment 2 WebKit Review Bot 2010-04-23 08:57:30 PDT
Attachment 54164 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/rendering/RenderBlock.cpp:589:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
WebCore/rendering/RenderBlock.cpp:589:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 2 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Shinichiro Hamaji 2010-04-23 09:11:07 PDT
Created attachment 54165 [details]
Patch v2
Comment 4 Darin Adler 2010-04-23 09:27:31 PDT
Comment on attachment 54165 [details]
Patch v2

Is there a better name for this without the word "and" in it? This is the difference between the content box size and the border box size. Why did "padding" come first in the name rather than "border"?

r=me as is -- I think there probably is not better name
Comment 5 Shinichiro Hamaji 2010-04-23 09:54:22 PDT
Yeah, I don't know any word which means border+padding.

At first, I named it as borderAndPadding. However, I found a variable whose name is paddingAndBorder so I used paddingAndBorder. Maybe I should have changed the name of the variable to borderAndPadding. I'll change them before I land.

Thanks for your quick review!
Comment 6 Shinichiro Hamaji 2010-04-23 10:33:35 PDT
Committed r58177: <http://trac.webkit.org/changeset/58177>