Bug 38046 - Need borderAndPadding(Width|Height)
Summary: Need borderAndPadding(Width|Height)
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2010-04-23 08:49 PDT by Shinichiro Hamaji
Modified: 2010-04-23 10:33 PDT (History)
1 user (show)

See Also:

Patch v1 (30.72 KB, patch)
2010-04-23 08:52 PDT, Shinichiro Hamaji
no flags Details | Formatted Diff | Diff
Patch v2 (30.11 KB, patch)
2010-04-23 09:11 PDT, Shinichiro Hamaji
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>