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

Issue 11293194: ui: Prefer +/- operators to apply offsets. (Closed)

Created:
8 years, 1 month ago by danakj
Modified:
8 years, 1 month ago
CC:
chromium-reviews, cc-bugs_chromium.org, piman, backer
Visibility:
Public.

Description

ui: Prefer +/- operators to apply offsets. Adds +/- operators to gfx::Rect that are applied to its origin Point. Removes gfx::Point method a.OffsetFrom(b) in favor of (b - a). Begin use +/- instead of Offset() in ui/gfx/ and cc/ New tests: ui_unittests:RectTest.Offset R=pkasting,enne BUG=158416 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=167012

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : gfx:: #

Total comments: 7

Patch Set 5 : vector+rect #

Patch Set 6 : floats #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+803 lines, -220 lines) Patch
M .gitmodules View 1 2 3 4 5 2 chunks +1 line, -5 lines 2 comments Download
M cc/geometry.h View 1 2 3 4 5 1 chunk +0 lines, -13 lines 0 comments Download
M cc/layer_tree_host_common_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 2 chunks +6 lines, -10 lines 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M cc/math_util.cc View 1 2 3 4 5 2 chunks +4 lines, -10 lines 0 comments Download
M cc/occlusion_tracker_unittest.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M cc/page_scale_animation.cc View 1 2 3 4 5 2 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 2 chunks +0 lines, -10 lines 0 comments Download
M content/common/gpu/gpu_memory_manager.h View 1 2 3 4 5 4 chunks +20 lines, -2 lines 0 comments Download
M content/common/gpu/gpu_memory_manager.cc View 1 2 3 4 5 7 chunks +68 lines, -6 lines 0 comments Download
M content/common/gpu/gpu_memory_manager_unittest.cc View 1 2 3 4 5 3 chunks +128 lines, -2 lines 0 comments Download
M content/common/gpu/image_transport_surface.h View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/image_transport_surface.cc View 1 2 3 4 5 1 chunk +3 lines, -5 lines 0 comments Download
M ui/gfx/blit.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/blit.cc View 1 3 chunks +8 lines, -11 lines 0 comments Download
M ui/gfx/canvas_skia.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M ui/gfx/pango_util.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/point.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/point_base.h View 2 chunks +4 lines, -6 lines 0 comments Download
M ui/gfx/point_f.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/point_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ui/gfx/rect.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M ui/gfx/rect.cc View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M ui/gfx/rect_base.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/rect_base_impl.h View 2 chunks +24 lines, -2 lines 0 comments Download
M ui/gfx/rect_f.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M ui/gfx/rect_f.cc View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M ui/gfx/rect_unittest.cc View 1 2 3 4 1 chunk +39 lines, -15 lines 0 comments Download
M ui/gfx/render_text.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/vector2d_f.h View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
M ui/gfx/vector2d_f.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M ui/gfx/vector2d_unittest.cc View 1 2 3 4 5 2 chunks +12 lines, -0 lines 0 comments Download
M ui/gfx/vector3d_f.h View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
M ui/gfx/vector3d_f.cc View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M ui/gfx/vector3d_unittest.cc View 1 2 3 4 5 2 chunks +24 lines, -6 lines 0 comments Download
M ui/gl/generate_bindings.py View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gl/gl_surface.h View 1 2 3 4 5 3 chunks +12 lines, -6 lines 0 comments Download
M ui/gl/gl_surface.cc View 1 2 3 4 5 2 chunks +3 lines, -6 lines 0 comments Download
M ui/gl/gl_surface_glx.h View 1 2 3 4 5 3 chunks +13 lines, -2 lines 0 comments Download
M ui/gl/gl_surface_glx.cc View 1 2 3 4 5 6 chunks +327 lines, -71 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
danakj
pkasting please review ui/gfx/ enne please review cc/
8 years, 1 month ago (2012-11-09 03:44:18 UTC) #1
danakj
pkasting please review ui/gfx/ enne please review cc/
8 years, 1 month ago (2012-11-09 03:44:18 UTC) #2
enne (OOO)
cc lgtm
8 years, 1 month ago (2012-11-09 06:00:55 UTC) #3
tfarina
https://codereview.chromium.org/11293194/diff/1014/ui/gfx/rect_unittest.cc File ui/gfx/rect_unittest.cc (right): https://codereview.chromium.org/11293194/diff/1014/ui/gfx/rect_unittest.cc#newcode674 ui/gfx/rect_unittest.cc:674: EXPECT_TRUE(gfx::RectF().IsExpressibleAsRect()); nit: I though I had removed the gfx:: ...
8 years, 1 month ago (2012-11-09 14:29:52 UTC) #4
danakj
https://codereview.chromium.org/11293194/diff/1014/ui/gfx/rect_unittest.cc File ui/gfx/rect_unittest.cc (right): https://codereview.chromium.org/11293194/diff/1014/ui/gfx/rect_unittest.cc#newcode674 ui/gfx/rect_unittest.cc:674: EXPECT_TRUE(gfx::RectF().IsExpressibleAsRect()); On 2012/11/09 14:29:52, tfarina wrote: > nit: I ...
8 years, 1 month ago (2012-11-09 16:15:11 UTC) #5
Peter Kasting
LGTM https://codereview.chromium.org/11293194/diff/9001/ui/gfx/point_base.h File ui/gfx/point_base.h (right): https://codereview.chromium.org/11293194/diff/9001/ui/gfx/point_base.h#newcode31 ui/gfx/point_base.h:31: void Offset(Type delta_x, Type delta_y) { Are we ...
8 years, 1 month ago (2012-11-09 22:02:36 UTC) #6
danakj
https://codereview.chromium.org/11293194/diff/9001/ui/gfx/point_base.h File ui/gfx/point_base.h (right): https://codereview.chromium.org/11293194/diff/9001/ui/gfx/point_base.h#newcode31 ui/gfx/point_base.h:31: void Offset(Type delta_x, Type delta_y) { On 2012/11/09 22:02:36, ...
8 years, 1 month ago (2012-11-09 22:10:10 UTC) #7
Peter Kasting
On 2012/11/09 22:10:10, danakj wrote: > https://codereview.chromium.org/11293194/diff/9001/ui/gfx/rect.h#newcode81 > ui/gfx/rect.h:81: UI_EXPORT Rect operator-(const Rect& lhs, const ...
8 years, 1 month ago (2012-11-09 22:12:10 UTC) #8
danakj
On 2012/11/09 22:12:10, Peter Kasting wrote: > On 2012/11/09 22:10:10, danakj wrote: > > https://codereview.chromium.org/11293194/diff/9001/ui/gfx/rect.h#newcode81 ...
8 years, 1 month ago (2012-11-09 22:24:50 UTC) #9
Peter Kasting
LGTM
8 years, 1 month ago (2012-11-09 22:27:28 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11293194/12001
8 years, 1 month ago (2012-11-09 22:29:54 UTC) #11
commit-bot: I haz the power
Presubmit check for 11293194-12001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 1 month ago (2012-11-09 22:30:06 UTC) #12
danakj
+Sky please take a look at ui/gfx/
8 years, 1 month ago (2012-11-09 22:36:46 UTC) #13
sky
LGTM
8 years, 1 month ago (2012-11-09 23:03:45 UTC) #14
slavi
https://codereview.chromium.org/11293194/diff/6021/.gitmodules File .gitmodules (left): https://codereview.chromium.org/11293194/diff/6021/.gitmodules#oldcode189 .gitmodules:189: [submodule "third_party/findbugs"] Did you intentionally committed this .gitmodules?
8 years, 1 month ago (2012-11-10 00:08:01 UTC) #15
danakj
https://codereview.chromium.org/11293194/diff/6021/.gitmodules File .gitmodules (left): https://codereview.chromium.org/11293194/diff/6021/.gitmodules#oldcode189 .gitmodules:189: [submodule "third_party/findbugs"] On 2012/11/10 00:08:01, slavi wrote: > Did ...
8 years, 1 month ago (2012-11-10 00:10:45 UTC) #16
danakj
8 years, 1 month ago (2012-11-10 00:12:24 UTC) #17
On 2012/11/10 00:10:45, danakj wrote:
> https://codereview.chromium.org/11293194/diff/6021/.gitmodules
> File .gitmodules (left):
> 
> https://codereview.chromium.org/11293194/diff/6021/.gitmodules#oldcode189
> .gitmodules:189: [submodule "third_party/findbugs"]
> On 2012/11/10 00:08:01, slavi wrote:
> > Did you intentionally committed this .gitmodules?
> 
> Uhhh... I have no idea how that got there.

It looks like the commit did the right thing regardless.

Powered by Google App Engine
This is Rietveld 408576698