We have many paddingTop()+paddingBottom()+borderTop()+borderBottom() in WebCore code. Let's add paddingAndBorder(Width|Height) and use it.
Created attachment 54164 [details] Patch v1
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.
Created attachment 54165 [details] Patch v2
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
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!
Committed r58177: <http://trac.webkit.org/changeset/58177>