Bug 83920

Summary: [chromium] There is no Color(float, float, float) constructor, fix an attempt to call it.
Product: WebKit Reporter: Nico Weber <thakis>
Component: New BugsAssignee: Nico Weber <thakis>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Nico Weber
Reported 2012-04-13 11:13:40 PDT
[chromium] There is no Color(float, float, float) constructor, fix an attempt to call it.
Attachments
Patch (2.32 KB, patch)
2012-04-13 11:14 PDT, Nico Weber
no flags
Patch for landing (2.32 KB, patch)
2012-04-13 18:06 PDT, Nico Weber
no flags
Nico Weber
Comment 1 2012-04-13 11:14:40 PDT
James Robinson
Comment 2 2012-04-13 11:21:58 PDT
Comment on attachment 137108 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=137108&action=review > Source/WebKit/chromium/tests/LayerChromiumTest.cpp:508 > + EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBackgroundColor(Color(0.4f, 0.4f, 0.4f, 1.0f))); Since you're fixing nits here, these should be (0.4, 0.4, 0.4, 1) - no "f" or ".0f" http://www.webkit.org/coding/coding-style.html#float-suffixes
Nico Weber
Comment 3 2012-04-13 12:10:42 PDT
Thanks! (In reply to comment #2) > (From update of attachment 137108 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=137108&action=review > > > Source/WebKit/chromium/tests/LayerChromiumTest.cpp:508 > > + EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBackgroundColor(Color(0.4f, 0.4f, 0.4f, 1.0f))); > > Since you're fixing nits here, these should be (0.4, 0.4, 0.4, 1) - no "f" or ".0f" http://www.webkit.org/coding/coding-style.html#float-suffixes That page says "unless required". It's required here: test.cc:9:3: error: call to constructor of 'Color' is ambiguous Color(0.4, 0.4, 0.4, 1.0); ^ ~~~~~~~~~~~~~~~~~~ test.cc:4:5: note: candidate constructor Color(int r, int g, int b, int a) { } ^ test.cc:5:5: note: candidate constructor Color(float r, float g, float b, float a) { } ^ 1 error generated. hummer:src thakis$ third_party/llvm-build/Release+Asserts/bin/clang -c test.cc test.cc:9:9: warning: implicit conversion turns literal floating-point number into integer: 'double' to 'int' [-Wliteral-conversion] Color(0.4, 0.4, 0.4, 1); ~~~~~ ^~~ test.cc:9:14: warning: implicit conversion turns literal floating-point number into integer: 'double' to 'int' [-Wliteral-conversion] Color(0.4, 0.4, 0.4, 1); ~~~~~ ^~~ test.cc:9:19: warning: implicit conversion turns literal floating-point number into integer: 'double' to 'int' [-Wliteral-conversion] Color(0.4, 0.4, 0.4, 1); ~~~~~ ^~~ 3 warnings generated.
WebKit Review Bot
Comment 4 2012-04-13 17:43:26 PDT
Comment on attachment 137108 [details] Patch Rejecting attachment 137108 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: t/webkit-commit-queue/ Parsed 2 diffs from patch file(s). patching file Source/WebKit/chromium/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Source/WebKit/chromium/tests/LayerChromiumTest.cpp Hunk #1 FAILED at 505. 1 out of 1 hunk FAILED -- saving rejects to file Source/WebKit/chromium/tests/LayerChromiumTest.cpp.rej Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'James Robi..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue/ Full output: http://queues.webkit.org/results/12406079
Nico Weber
Comment 5 2012-04-13 18:06:50 PDT
Created attachment 137190 [details] Patch for landing
WebKit Review Bot
Comment 6 2012-04-13 20:07:43 PDT
Comment on attachment 137190 [details] Patch for landing Clearing flags on attachment: 137190 Committed r114201: <http://trac.webkit.org/changeset/114201>
WebKit Review Bot
Comment 7 2012-04-13 20:07:47 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.