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

Issue 25808002: Move Rectangle and Point into dart:math. (Closed)

Created:
7 years, 2 months ago by Emily Fortuna
Modified:
7 years, 2 months ago
CC:
reviews_dartlang.org, kevmoo-old, blois
Visibility:
Public.

Description

Move Rectangle and Point into dart:math. BUG= R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=28272

Patch Set 1 #

Patch Set 2 : #

Total comments: 38

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+788 lines, -1501 lines) Patch
M pkg/custom_element/lib/custom_element.dart View 1 3 chunks +4 lines, -4 lines 0 comments Download
M samples/solar/web/solar.dart View 1 2 chunks +4 lines, -4 lines 0 comments Download
M sdk/lib/html/dart2js/html_dart2js.dart View 17 chunks +118 lines, -308 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 25 chunks +242 lines, -424 lines 0 comments Download
M sdk/lib/html/html_common/html_common.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/html/html_common/html_common_dart2js.dart View 1 chunk +0 lines, -1 line 0 comments Download
D sdk/lib/html/html_common/jenkins_smi_hash.dart View 1 chunk +0 lines, -42 lines 0 comments Download
A + sdk/lib/math/jenkins_smi_hash.dart View 2 chunks +3 lines, -4 lines 0 comments Download
M sdk/lib/math/math.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M sdk/lib/math/math_sources.gypi View 1 chunk +3 lines, -0 lines 0 comments Download
A sdk/lib/math/point.dart View 1 2 3 1 chunk +81 lines, -0 lines 0 comments Download
A sdk/lib/math/rectangle.dart View 1 2 3 1 chunk +157 lines, -0 lines 2 comments Download
M tests/html/canvasrenderingcontext2d_test.dart View 7 chunks +11 lines, -11 lines 0 comments Download
M tests/html/client_rect_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/html/element_test.dart View 1 chunk +1 line, -1 line 0 comments Download
D tests/html/point_test.dart View 1 chunk +0 lines, -125 lines 0 comments Download
D tests/html/rect_test.dart View 1 chunk +0 lines, -159 lines 0 comments Download
M tests/html/svgelement_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
A + tests/lib/math/point_test.dart View 1 2 3 2 chunks +10 lines, -45 lines 0 comments Download
A + tests/lib/math/rectangle_test.dart View 1 2 3 6 chunks +44 lines, -72 lines 0 comments Download
M tools/dom/scripts/generator.py View 2 chunks +3 lines, -2 lines 0 comments Download
M tools/dom/src/CssRectangle.dart View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
D tools/dom/src/Point.dart View 1 chunk +0 lines, -72 lines 0 comments Download
D tools/dom/src/Rectangle.dart View 1 chunk +0 lines, -158 lines 0 comments Download
M tools/dom/templates/html/dart2js/html_dart2js.darttemplate View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M tools/dom/templates/html/dartium/html_dartium.darttemplate View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate View 2 chunks +7 lines, -7 lines 0 comments Download
M tools/dom/templates/html/impl/impl_ClientRect.darttemplate View 1 2 3 3 chunks +78 lines, -46 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Element.darttemplate View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Screen.darttemplate View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
Emily Fortuna
Florian, This is the same patch as before with a few modifications. The first patchset ...
7 years, 2 months ago (2013-10-02 23:13:35 UTC) #1
Lasse Reichstein Nielsen
https://codereview.chromium.org/25808002/diff/3001/sdk/lib/math/point.dart File sdk/lib/math/point.dart (right): https://codereview.chromium.org/25808002/diff/3001/sdk/lib/math/point.dart#newcode15 sdk/lib/math/point.dart:15: String toString() => '($x, $y)'; I wouldn't mind it ...
7 years, 2 months ago (2013-10-03 06:24:03 UTC) #2
Lasse Reichstein Nielsen
I think the problem is with the dart2js analyzer. The static type of 'x' in ...
7 years, 2 months ago (2013-10-03 08:41:07 UTC) #3
karlklose
On 2013/10/03 08:41:07, Lasse Reichstein Nielsen wrote: > I think the problem is with the ...
7 years, 2 months ago (2013-10-03 09:29:22 UTC) #4
floitsch
Still LGTM (and again with minor nits/comments). https://codereview.chromium.org/25808002/diff/3001/sdk/lib/math/point.dart File sdk/lib/math/point.dart (right): https://codereview.chromium.org/25808002/diff/3001/sdk/lib/math/point.dart#newcode33 sdk/lib/math/point.dart:33: * Scale ...
7 years, 2 months ago (2013-10-03 09:33:49 UTC) #5
Emily Fortuna
https://codereview.chromium.org/25808002/diff/3001/sdk/lib/math/point.dart File sdk/lib/math/point.dart (right): https://codereview.chromium.org/25808002/diff/3001/sdk/lib/math/point.dart#newcode15 sdk/lib/math/point.dart:15: String toString() => '($x, $y)'; On 2013/10/03 06:24:03, Lasse ...
7 years, 2 months ago (2013-10-03 21:29:12 UTC) #6
floitsch
Almost there. LGTM with base class addressed. https://codereview.chromium.org/25808002/diff/3001/sdk/lib/math/rectangle.dart File sdk/lib/math/rectangle.dart (right): https://codereview.chromium.org/25808002/diff/3001/sdk/lib/math/rectangle.dart#newcode111 sdk/lib/math/rectangle.dart:111: Rectangle<int> ceil() ...
7 years, 2 months ago (2013-10-04 08:59:12 UTC) #7
Emily Fortuna
Committed patchset #4 manually as r28272 (presubmit successful).
7 years, 2 months ago (2013-10-04 17:47:56 UTC) #8
siva
DBC https://codereview.chromium.org/25808002/diff/28001/sdk/lib/math/rectangle.dart File sdk/lib/math/rectangle.dart (right): https://codereview.chromium.org/25808002/diff/28001/sdk/lib/math/rectangle.dart#newcode157 sdk/lib/math/rectangle.dart:157: } Wouldn't it make more sense to call ...
7 years, 2 months ago (2013-10-08 22:05:30 UTC) #9
Emily Fortuna
7 years, 2 months ago (2013-10-08 22:20:26 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/25808002/diff/28001/sdk/lib/math/rectangle.dart
File sdk/lib/math/rectangle.dart (right):

https://codereview.chromium.org/25808002/diff/28001/sdk/lib/math/rectangle.da...
sdk/lib/math/rectangle.dart:157: }
On 2013/10/08 22:05:30, siva wrote:
> Wouldn't it make more sense to call the classes :
> 
> ImmutableRectangle
> Rectangle
> 
> Currently Rectangle does not seem to convey the fact that it is immutable.

We convey immutability that in the documentation. And we have the immutable
version simply called "Rectangle" to encourage users to use that one, as it is
more performant, which would generally be more desirable if you're in the
dart:math class.

Powered by Google App Engine
This is Rietveld 408576698