Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Issue 10946019: Don't return unsupported scales frrom GetScaleFactorFromScale() (Closed)

Created:
8 years, 3 months ago by Xianzhu
Modified:
8 years, 3 months ago
Reviewers:
tony, pkotwicz, oshima, sky
CC:
chromium-reviews
Visibility:
Public.

Description

Don't return unsupported scales frrom GetScaleFactorFromScale() BUG=148841 TEST=LayoutTest.GetScaleFactorFromScale Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157906

Patch Set 1 : Cleaned up #

Total comments: 2

Patch Set 2 : Simpler change #

Total comments: 6

Patch Set 3 : Optimized #

Patch Set 4 : Fix a typo in naming #

Total comments: 2

Patch Set 5 : Fix nits #

Patch Set 6 : Fix float error on win #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -6 lines) Patch
M ui/base/layout.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/base/layout.cc View 1 2 1 chunk +8 lines, -5 lines 0 comments Download
A ui/base/layout_unittest.cc View 1 2 3 4 5 1 chunk +79 lines, -0 lines 0 comments Download
M ui/ui_unittests.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Xianzhu
8 years, 3 months ago (2012-09-19 00:56:44 UTC) #1
Xianzhu
8 years, 3 months ago (2012-09-19 00:59:20 UTC) #2
Xianzhu
Sorry there are some unexpected changes in Patch Set 1. Cleaning up.
8 years, 3 months ago (2012-09-19 01:04:12 UTC) #3
Xianzhu
On 2012/09/19 01:04:12, Xianzhu wrote: > Sorry there are some unexpected changes in Patch Set ...
8 years, 3 months ago (2012-09-19 01:10:31 UTC) #4
pkotwicz
To help me look at this patch, is this something which needs to be in ...
8 years, 3 months ago (2012-09-19 02:02:17 UTC) #5
Xianzhu
On 2012/09/19 02:02:17, pkotwicz wrote: > To help me look at this patch, is this ...
8 years, 3 months ago (2012-09-19 02:33:04 UTC) #6
oshima
https://chromiumcodereview.appspot.com/10946019/diff/9/ui/base/layout.h File ui/base/layout.h (right): https://chromiumcodereview.appspot.com/10946019/diff/9/ui/base/layout.h#newcode54 ui/base/layout.h:54: UI_EXPORT ScaleFactor GetScaleFactorFromScale(float scale); This shouldn't return unsupported scale ...
8 years, 3 months ago (2012-09-19 07:06:35 UTC) #7
pkotwicz
Right now GetScaleFactorFromScale(float scale) may return an unsupported scale factor if scale == 1.4f. From ...
8 years, 3 months ago (2012-09-19 14:22:01 UTC) #8
pkotwicz
http://codereview.chromium.org/10946019/diff/9/ui/base/layout.cc File ui/base/layout.cc (right): http://codereview.chromium.org/10946019/diff/9/ui/base/layout.cc#newcode92 ui/base/layout.cc:92: bool includeUnsupported) { Nit: use camel case for variable ...
8 years, 3 months ago (2012-09-19 14:22:10 UTC) #9
oshima
On 2012/09/19 14:22:01, pkotwicz wrote: > Right now GetScaleFactorFromScale(float scale) may return an unsupported scale ...
8 years, 3 months ago (2012-09-19 16:03:32 UTC) #10
Xianzhu
Thanks all for comments. Just uploaded Patch Set 3 that let GetScaleFactorFromScale return only supported ...
8 years, 3 months ago (2012-09-19 17:13:21 UTC) #11
pkotwicz
LGTM with nits http://codereview.chromium.org/10946019/diff/7001/ui/base/layout.cc File ui/base/layout.cc (right): http://codereview.chromium.org/10946019/diff/7001/ui/base/layout.cc#newcode116 ui/base/layout.cc:116: if (!IsScaleFactorSupported(static_cast<ScaleFactor>(i))) Nit: iterate through the ...
8 years, 3 months ago (2012-09-19 21:05:16 UTC) #12
Xianzhu
http://codereview.chromium.org/10946019/diff/7001/ui/base/layout.cc File ui/base/layout.cc (right): http://codereview.chromium.org/10946019/diff/7001/ui/base/layout.cc#newcode116 ui/base/layout.cc:116: if (!IsScaleFactorSupported(static_cast<ScaleFactor>(i))) On 2012/09/19 21:05:17, pkotwicz wrote: > Nit: ...
8 years, 3 months ago (2012-09-19 21:38:23 UTC) #13
Xianzhu
sky, could you also review this CL? Thanks.
8 years, 3 months ago (2012-09-20 16:53:38 UTC) #14
oshima
lgtm with one nit. thank you for adding tests! http://codereview.chromium.org/10946019/diff/11004/ui/base/layout_unittest.cc File ui/base/layout_unittest.cc (right): http://codereview.chromium.org/10946019/diff/11004/ui/base/layout_unittest.cc#newcode7 ui/base/layout_unittest.cc:7: ...
8 years, 3 months ago (2012-09-20 18:10:55 UTC) #15
Xianzhu
http://codereview.chromium.org/10946019/diff/11004/ui/base/layout_unittest.cc File ui/base/layout_unittest.cc (right): http://codereview.chromium.org/10946019/diff/11004/ui/base/layout_unittest.cc#newcode7 ui/base/layout_unittest.cc:7: #include "ui/base/layout.h" On 2012/09/20 18:10:55, oshima wrote: > nit: ...
8 years, 3 months ago (2012-09-20 18:51:33 UTC) #16
sky
LGTM
8 years, 3 months ago (2012-09-20 19:45:12 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/10946019/19001
8 years, 3 months ago (2012-09-20 20:05:23 UTC) #18
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 3 months ago (2012-09-20 21:44:11 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/10946019/20006
8 years, 3 months ago (2012-09-20 22:54:27 UTC) #20
commit-bot: I haz the power
8 years, 3 months ago (2012-09-21 02:38:12 UTC) #21
Change committed as 157906

Powered by Google App Engine
This is Rietveld 408576698