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+

Shinichiro Hamaji
Reported 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.
Attachments
Patch v1 (30.72 KB, patch)
2010-04-23 08:52 PDT, Shinichiro Hamaji
no flags
Patch v2 (30.11 KB, patch)
2010-04-23 09:11 PDT, Shinichiro Hamaji
darin: review+
Shinichiro Hamaji
Comment 1 2010-04-23 08:52:34 PDT
Created attachment 54164 [details] Patch v1
WebKit Review Bot
Comment 2 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.
Shinichiro Hamaji
Comment 3 2010-04-23 09:11:07 PDT
Created attachment 54165 [details] Patch v2
Darin Adler
Comment 4 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
Shinichiro Hamaji
Comment 5 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!
Shinichiro Hamaji
Comment 6 2010-04-23 10:33:35 PDT
Note You need to log in before you can comment on or make changes to this bug.