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

Issue 11280103: Splitting out the Audio library. (Closed)

Created:
8 years, 1 month ago by blois
Modified:
8 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Splitting the Audio types out of the HTML library. BUG=3108 Committed: https://code.google.com/p/dart/source/detail?r=15529

Patch Set 1 #

Patch Set 2 : Syncing. #

Total comments: 3

Patch Set 3 : Changed dart:audio to dart:web_audio #

Total comments: 18

Patch Set 4 : Incorporating review feedback. #

Total comments: 4

Patch Set 5 : Added comment for dart:html imports. #

Patch Set 6 : Adding missing lib registrations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1874 lines, -1837 lines) Patch
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/native_handler.dart View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/libraries.dart View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M sdk/lib/html/dart2js/html_dart2js.dart View 1 2 3 4 5 19 chunks +2 lines, -694 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 19 chunks +19 lines, -1077 lines 0 comments Download
M sdk/lib/html/scripts/dartdomgenerator.py View 1 2 3 4 5 4 chunks +12 lines, -10 lines 0 comments Download
M sdk/lib/html/scripts/htmlrenamer.py View 1 2 3 4 5 2 chunks +10 lines, -0 lines 0 comments Download
M sdk/lib/html/scripts/systemhtml.py View 1 2 3 3 chunks +11 lines, -6 lines 0 comments Download
M sdk/lib/html/src/dart2js_FactoryProviders.dart View 1 chunk +0 lines, -8 lines 0 comments Download
M sdk/lib/html/src/dartium_FactoryProviders.dart View 1 chunk +0 lines, -8 lines 0 comments Download
M sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A sdk/lib/html/templates/html/dart2js/web_audio_dart2js.darttemplate View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M sdk/lib/html/templates/html/dartium/html_dartium.darttemplate View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A sdk/lib/html/templates/html/dartium/web_audio_dartium.darttemplate View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate View 1 chunk +12 lines, -1 line 0 comments Download
A sdk/lib/web_audio/dart2js/web_audio_dart2js.dart View 1 2 3 1 chunk +697 lines, -0 lines 0 comments Download
A sdk/lib/web_audio/dartium/web_audio_dartium.dart View 1 2 3 1 chunk +1068 lines, -0 lines 0 comments Download
M tests/html/audiobuffersourcenode_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/html/audiocontext_test.dart View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M tests/html/audioelement_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/html/html.status View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M tests/html/htmlaudioelement_test.dart View 1 2 1 chunk +0 lines, -25 lines 0 comments Download
M tools/create_sdk.py View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M utils/apidoc/html_diff.dart View 1 2 3 4 5 1 chunk +8 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
blois
8 years, 1 month ago (2012-11-20 22:16:44 UTC) #1
Emily Fortuna
lgtm with a naming suggestion https://codereview.chromium.org/11280103/diff/1001/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/11280103/diff/1001/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode496 sdk/lib/_internal/compiler/implementation/compiler.dart:496: || libraryName == 'dart:audio' ...
8 years, 1 month ago (2012-11-20 22:38:16 UTC) #2
blois
https://codereview.chromium.org/11280103/diff/1001/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/11280103/diff/1001/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode496 sdk/lib/_internal/compiler/implementation/compiler.dart:496: || libraryName == 'dart:audio' On 2012/11/20 22:38:17, Emily Fortuna ...
8 years, 1 month ago (2012-11-20 23:46:11 UTC) #3
Emily Fortuna
true. web_audio could be good. I'd still keep AudioElement in here where it is, but ...
8 years, 1 month ago (2012-11-20 23:59:22 UTC) #4
Emily Fortuna
https://codereview.chromium.org/11280103/diff/9001/tests/html/htmlaudioelement_test.dart File tests/html/htmlaudioelement_test.dart (left): https://codereview.chromium.org/11280103/diff/9001/tests/html/htmlaudioelement_test.dart#oldcode1 tests/html/htmlaudioelement_test.dart:1: library AudioElementTest; why delete this test? Why don't we ...
8 years, 1 month ago (2012-11-21 00:27:08 UTC) #5
Emily Fortuna
https://codereview.chromium.org/11280103/diff/9001/sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate File sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate (right): https://codereview.chromium.org/11280103/diff/9001/sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate#newcode13 sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate:13: import 'dart:web_audio' as audio; as web_audio?
8 years, 1 month ago (2012-11-21 00:28:10 UTC) #6
blois
https://codereview.chromium.org/11280103/diff/9001/sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate File sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate (right): https://codereview.chromium.org/11280103/diff/9001/sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate#newcode13 sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate:13: import 'dart:web_audio' as audio; On 2012/11/21 00:28:10, Emily Fortuna ...
8 years, 1 month ago (2012-11-21 00:48:54 UTC) #7
Emily Fortuna
sgtm. lgtm.
8 years, 1 month ago (2012-11-21 01:48:16 UTC) #8
sra1
lgtm
8 years, 1 month ago (2012-11-21 05:13:25 UTC) #9
Anton Muhin
sorry for late review https://codereview.chromium.org/11280103/diff/9001/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/11280103/diff/9001/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode498 sdk/lib/_internal/compiler/implementation/compiler.dart:498: || libraryName == 'dart:web_audio') { ...
8 years, 1 month ago (2012-11-22 03:22:51 UTC) #10
blois
https://codereview.chromium.org/11280103/diff/9001/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/11280103/diff/9001/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode498 sdk/lib/_internal/compiler/implementation/compiler.dart:498: || libraryName == 'dart:web_audio') { On 2012/11/22 03:22:51, Anton ...
8 years ago (2012-11-27 00:07:45 UTC) #11
Anton Muhin
lgtm
8 years ago (2012-11-27 03:30:37 UTC) #12
ahe
Changes to sdk/lib/_internal/compiler, LGTM https://codereview.chromium.org/11280103/diff/10010/sdk/lib/html/dart2js/html_dart2js.dart File sdk/lib/html/dart2js/html_dart2js.dart (right): https://codereview.chromium.org/11280103/diff/10010/sdk/lib/html/dart2js/html_dart2js.dart#newcode6 sdk/lib/html/dart2js/html_dart2js.dart:6: import 'dart:web_audio' as web_audio; Is ...
8 years ago (2012-11-27 07:55:50 UTC) #13
blois
https://codereview.chromium.org/11280103/diff/10010/sdk/lib/html/dart2js/html_dart2js.dart File sdk/lib/html/dart2js/html_dart2js.dart (right): https://codereview.chromium.org/11280103/diff/10010/sdk/lib/html/dart2js/html_dart2js.dart#newcode6 sdk/lib/html/dart2js/html_dart2js.dart:6: import 'dart:web_audio' as web_audio; On 2012/11/27 07:55:50, ahe wrote: ...
8 years ago (2012-11-27 17:14:55 UTC) #14
ahe
https://codereview.chromium.org/11280103/diff/10010/sdk/lib/html/dart2js/html_dart2js.dart File sdk/lib/html/dart2js/html_dart2js.dart (right): https://codereview.chromium.org/11280103/diff/10010/sdk/lib/html/dart2js/html_dart2js.dart#newcode6 sdk/lib/html/dart2js/html_dart2js.dart:6: import 'dart:web_audio' as web_audio; On 2012/11/27 17:14:55, blois wrote: ...
8 years ago (2012-11-27 19:01:22 UTC) #15
blois
On 2012/11/27 19:01:22, ahe wrote: > https://codereview.chromium.org/11280103/diff/10010/sdk/lib/html/dart2js/html_dart2js.dart > File sdk/lib/html/dart2js/html_dart2js.dart (right): > > https://codereview.chromium.org/11280103/diff/10010/sdk/lib/html/dart2js/html_dart2js.dart#newcode6 > ...
8 years ago (2012-11-27 20:49:41 UTC) #16
sra1
8 years ago (2012-12-04 01:30:48 UTC) #17
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/11280103/diff/10010/sdk/lib/html/dart2...
File sdk/lib/html/dart2js/html_dart2js.dart (right):

https://chromiumcodereview.appspot.com/11280103/diff/10010/sdk/lib/html/dart2...
sdk/lib/html/dart2js/html_dart2js.dart:6: import 'dart:web_audio' as web_audio;
On 2012/11/27 19:01:23, ahe wrote:
> On 2012/11/27 17:14:55, blois wrote:
> > On 2012/11/27 07:55:50, ahe wrote:
> > > Is this import used?
> > 
> > It's implicitly used in that dart:html can create audio objects via new
> > Element.tag() or access the types via document.query.
> > 
> > The import here basically ensures that the types are present so when an
audio
> > object is returned from these methods then it works properly.
> > 
> > We have ambitions to remove these imports and have some form of predictable
> > behavior when the types are encountered but never included. This is
> essentially
> > an aggressive form of tree-shaking, but we need to quantify the benefits
> because
> > it's going to take some work to do, and might be a bit unexpected for users.
> 
> Thank you for the explanation.  Add a TODO?

I think it makes sense for AudioElement to be part of dart:html.
It is not really part of WebAudio, and is used independent of the AudioNode
stuff.
It is a thin subclass of MediaElement which can play videos.

The classes that are marked in the IDL with Conditional=WEB_AUDIO belong here.

Powered by Google App Engine
This is Rietveld 408576698