Chromium Code Reviews
Help | Chromium Project | Sign in
(236)

Issue 11364054: ui: Add IsExpressibleAsRect() method to RectF (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 5 months ago by danakj
Modified:
1 year, 5 months ago
Reviewers:
sky
CC:
chromium-reviews_chromium.org, cc-bugs_chromium.org, backer, piman
Visibility:
Public.

Description

ui: Add IsExpressibleAsRect() method to RectF

This method reports if the RectF can be safely converted to an
integer Rect. When it is false, some dimension of the RectF is
outside the bounds of what an integer can represent, and
converting it to a Rect will require clamping.

Tests:
ui_unittests:RectTest.IsExpressibleAsRect

R=sky
BUG=147395
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=165725

Patch Set 1 #

Total comments: 4

Patch Set 2 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -1 line) Lint Patch
M ui/gfx/rect_f.h View 1 1 chunk +6 lines, -0 lines 0 comments ? errors Download
M ui/gfx/rect_f.cc View 2 chunks +7 lines, -0 lines 0 comments ? errors Download
M ui/gfx/rect_unittest.cc View 1 chunk +31 lines, -0 lines 0 comments 1 errors Download
M ui/gfx/safe_integer_conversions.h View 1 chunk +1 line, -0 lines 0 comments ? errors Download
M ui/gfx/safe_integer_conversions.cc View 2 chunks +11 lines, -1 line 0 comments 2 errors Download
Commit:

Messages

Total messages: 7
danakj
1 year, 5 months ago #1
sky
LGTM I'm not to thrilled about the name, but I don't have anything better to ...
1 year, 5 months ago #2
danakj
Ya the name is not super exciting, but all I got is "AllComponentsExpressibleAsIntegers()" or something. ...
1 year, 5 months ago #3
I haz the power (commit-bot)
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11364054/7001
1 year, 5 months ago #4
I haz the power (commit-bot)
Step "update" is always a major failure. Look at the try server FAQ for more ...
1 year, 5 months ago #5
I haz the power (commit-bot)
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11364054/7001
1 year, 5 months ago #6
I haz the power (commit-bot)
1 year, 5 months ago #7
Sorry for I got bad news for ya.
Compile failed with a clobber build on linux_clang.
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_clan...
Your code is likely broken or HEAD is junk. Please ensure your
code is not broken then alert the build sheriffs.
Look at the try server FAQ for more details.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1280:2d3e6564b7b6