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

Issue 1160453006: Provide Point+Size, Point-Point, Point.toSize(), and Rect.toPoint(). (Closed)

Created:
5 years, 6 months ago by Hixie
Modified:
5 years, 6 months ago
Reviewers:
Matt Perry
CC:
abarth-chromium, gregsimon, mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Provide Point+Size, Point-Point, Point.toSize(), and Rect.toPoint(). Also some minor code cleanup in affected files and nearby files. R=mpcomplete@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/970c842210db041b18b280a18e686a56cef3a79d

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -13 lines) Patch
M sky/engine/core/painting/Color.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sky/engine/core/painting/Point.dart View 1 chunk +7 lines, -4 lines 0 comments Download
M sky/engine/core/painting/Rect.dart View 1 chunk +9 lines, -5 lines 4 comments Download
M sky/engine/core/painting/Size.dart View 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Matt Perry
lgtm https://codereview.chromium.org/1160453006/diff/1/sky/engine/core/painting/Rect.dart File sky/engine/core/painting/Rect.dart (right): https://codereview.chromium.org/1160453006/diff/1/sky/engine/core/painting/Rect.dart#newcode47 sky/engine/core/painting/Rect.dart:47: bool contains(Point point) { why this change? https://codereview.chromium.org/1160453006/diff/1/sky/engine/core/painting/Rect.dart#newcode56 ...
5 years, 6 months ago (2015-06-03 21:15:25 UTC) #2
Hixie
Committed patchset #1 (id:1) manually as 970c842210db041b18b280a18e686a56cef3a79d (presubmit successful).
5 years, 6 months ago (2015-06-03 21:21:52 UTC) #3
Hixie
5 years, 6 months ago (2015-06-09 21:06:49 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/1160453006/diff/1/sky/engine/core/painting/Re...
File sky/engine/core/painting/Rect.dart (right):

https://codereview.chromium.org/1160453006/diff/1/sky/engine/core/painting/Re...
sky/engine/core/painting/Rect.dart:47: bool contains(Point point) {
On 2015/06/03 at 21:15:25, Matt Perry wrote:
> why this change?

Consistency. When it fits on one line, =>, when it doesn't, { }. Having => split
over multiple lines looks really ugly to me.

But I am happy to go the other way if you like. :-)

https://codereview.chromium.org/1160453006/diff/1/sky/engine/core/painting/Re...
sky/engine/core/painting/Rect.dart:56: return false;
On 2015/06/03 at 21:15:25, Matt Perry wrote:
> ditto?
> 
> Some of the formatting in this file was a result of running 'git cl format'.
It would be nice to be able to use that tool.

Having the if statement on the same line as the statement it controls makes
reading the code confusing to me. But again, if the code style we prefer is the
other way around, I'm not going to fight it.

Powered by Google App Engine
This is Rietveld 408576698