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

Issue 10544111: Some HTML API cleanup (Closed)

Created:
8 years, 6 months ago by vsm
Modified:
8 years, 6 months ago
Reviewers:
Anton Muhin, Jacob, sra1
CC:
reviews_dartlang.org, Jacob, antonm
Visibility:
Public.

Description

Some HTML API cleanup This CL adds: - A context2d getter to CanvasElement. - A top-level query method. - A top-level queryAll method. TEST=query_test, canvas_test Committed: https://code.google.com/p/dart/source/detail?r=8591

Patch Set 1 #

Patch Set 2 : Add new query test #

Patch Set 3 : Forgot new template #

Total comments: 2

Patch Set 4 : Add context2d to interface #

Patch Set 5 : Use a more specific type for dart2js #

Patch Set 6 : Add new template #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -10 lines) Patch
M lib/dom/templates/html/dartium/html_dartium.darttemplate View 1 chunk +3 lines, -0 lines 0 comments Download
M lib/dom/templates/html/frog/html_frog.darttemplate View 1 chunk +3 lines, -0 lines 0 comments Download
A + lib/dom/templates/html/frog/impl_CanvasElement.darttemplate View 1 2 3 4 5 1 chunk +3 lines, -3 lines 1 comment Download
A + lib/dom/templates/html/impl/impl_CanvasElement.darttemplate View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A + lib/dom/templates/html/interface/interface_CanvasElement.darttemplate View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M lib/html/dartium/html_dartium.dart View 4 chunks +7 lines, -2 lines 0 comments Download
M lib/html/frog/html_frog.dart View 4 chunks +11 lines, -0 lines 0 comments Download
M tests/html/canvas_test.dart View 1 chunk +1 line, -1 line 0 comments Download
A tests/html/query_test.dart View 1 1 chunk +53 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
vsm
8 years, 6 months ago (2012-06-12 16:13:57 UTC) #1
Jacob
https://chromiumcodereview.appspot.com/10544111/diff/6001/lib/dom/templates/html/impl/impl_CanvasElement.darttemplate File lib/dom/templates/html/impl/impl_CanvasElement.darttemplate (right): https://chromiumcodereview.appspot.com/10544111/diff/6001/lib/dom/templates/html/impl/impl_CanvasElement.darttemplate#newcode9 lib/dom/templates/html/impl/impl_CanvasElement.darttemplate:9: } add context3d as well context3d will need to ...
8 years, 6 months ago (2012-06-12 19:48:13 UTC) #2
sra1
https://chromiumcodereview.appspot.com/10544111/diff/6001/lib/dom/templates/html/impl/impl_CanvasElement.darttemplate File lib/dom/templates/html/impl/impl_CanvasElement.darttemplate (right): https://chromiumcodereview.appspot.com/10544111/diff/6001/lib/dom/templates/html/impl/impl_CanvasElement.darttemplate#newcode8 lib/dom/templates/html/impl/impl_CanvasElement.darttemplate:8: CanvasRenderingContext2D get context2d() => getContext('2d'); the frog version of ...
8 years, 6 months ago (2012-06-12 21:00:58 UTC) #3
vsm
Doh! Thanks. PTAL. On 2012/06/12 21:00:58, sra1 wrote: > https://chromiumcodereview.appspot.com/10544111/diff/6001/lib/dom/templates/html/impl/impl_CanvasElement.darttemplate > File lib/dom/templates/html/impl/impl_CanvasElement.darttemplate (right): > ...
8 years, 6 months ago (2012-06-12 21:33:46 UTC) #4
sra1
lgtm
8 years, 6 months ago (2012-06-13 00:23:57 UTC) #5
Anton Muhin
Sorry for late response. https://chromiumcodereview.appspot.com/10544111/diff/7/lib/dom/templates/html/frog/impl_CanvasElement.darttemplate File lib/dom/templates/html/frog/impl_CanvasElement.darttemplate (right): https://chromiumcodereview.appspot.com/10544111/diff/7/lib/dom/templates/html/frog/impl_CanvasElement.darttemplate#newcode8 lib/dom/templates/html/frog/impl_CanvasElement.darttemplate:8: _CanvasRenderingContext2DImpl get context2d() => getContext('2d'); ...
8 years, 6 months ago (2012-06-13 15:02:52 UTC) #6
vsm
8 years, 6 months ago (2012-06-13 17:00:06 UTC) #7
On 2012/06/13 15:02:52, antonmuhin wrote:
> Sorry for late response.
> 
>
https://chromiumcodereview.appspot.com/10544111/diff/7/lib/dom/templates/html...
> File lib/dom/templates/html/frog/impl_CanvasElement.darttemplate (right):
> 
>
https://chromiumcodereview.appspot.com/10544111/diff/7/lib/dom/templates/html...
> lib/dom/templates/html/frog/impl_CanvasElement.darttemplate:8:
> _CanvasRenderingContext2DImpl get context2d() => getContext('2d');
> Do we really need a separate template?  May we add a new method in some
> different way, not to spread our customization across the files?

I really don't like having a second template.  But, I get Stephen's point about
providing more info to the compiler.

One simple way to avoid this: make the impl class names the same between Dartium
and Dart2JS.  That would do eliminate a number of duplicate files under src and
templates.  WDYT?

Powered by Google App Engine
This is Rietveld 408576698