Bug 37349 - [RenderStyle Cleanup] Clean up BorderValue, CollapsedBorderValue, BorderData and OutlineValue
Summary: [RenderStyle Cleanup] Clean up BorderValue, CollapsedBorderValue, BorderData ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-09 12:28 PDT by Dave Hyatt
Modified: 2010-04-09 14:13 PDT (History)
3 users (show)

See Also:


Attachments
Patch (43.32 KB, patch)
2010-04-09 13:01 PDT, Dave Hyatt
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2010-04-09 12:28:55 PDT
Make them all have the same style (classes with m_ members and accessors for those members).  Let RenderStyle poke the members directly for setting.
Comment 1 Dave Hyatt 2010-04-09 13:01:23 PDT
Created attachment 52981 [details]
Patch
Comment 2 WebKit Review Bot 2010-04-09 13:02:27 PDT
Attachment 52981 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/rendering/style/BorderValue.h:44:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/rendering/style/BorderValue.h:49:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebCore/rendering/style/BorderData.h:86:  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]
Total errors found: 3 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Adam Roben (:aroben) 2010-04-09 13:09:24 PDT
Comment on attachment 52981 [details]
Patch

>  class BorderData {
> +friend class RenderStyle;

I think we normally put friend declarations at the start of "private:" sections. But maybe that's not as common as I think? (Same goes for BorderValue and CollapsedBorderValue.)

> +    Color color() const { return m_borderColor; }

Could make this return a const Color& while you're at it.

r=me
Comment 4 Dave Hyatt 2010-04-09 13:22:11 PDT
Fixed in r57355.
Comment 5 WebKit Review Bot 2010-04-09 14:11:19 PDT
http://trac.webkit.org/changeset/57355 might have broken SnowLeopard Intel Release (Tests)
The following changes are on the blame list:
http://trac.webkit.org/changeset/57355
http://trac.webkit.org/changeset/57356
Comment 6 Adam Barth 2010-04-09 14:13:43 PDT
Looks like our flaky XMLHttpRequest woes on Snow Leopard aren't over:
http://build.webkit.org/results/SnowLeopard%20Intel%20Release%20(Tests)/r57358%20(8003)/http/tests/xmlhttprequest/basic-auth-pretty-diff.html