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

Issue 10915245: Removing interfaces from dart:html (Closed)

Created:
8 years, 3 months ago by blois
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Removing interfaces. This converts all interfaces in dart:html to abstract classes and changes the factory providers from factory methods to static methods. This CL represents the minimal initial change to remove interfaces, but there's quite a bit of further cleanup which can be done after this (eliminating the factory providers in favor of redirecting factory constructors). Also I'll be splitting the dartdoc changes out to a separate CL since that's a fairly large change in itself. BUG=4525 Committed: https://code.google.com/p/dart/source/detail?r=12580

Patch Set 1 #

Patch Set 2 : Further fixes to compile cleanly with the dartc compiler. #

Patch Set 3 : Fixing conflict between SVGElement and Element. #

Patch Set 4 : Further fixes to dartium. #

Total comments: 20

Patch Set 5 : Incorporating review feedback. #

Total comments: 10

Patch Set 6 : Incorporating review feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4709 lines, -4321 lines) Patch
M lib/html/dart2js/html_dart2js.dart View 756 chunks +2196 lines, -2045 lines 0 comments Download
M lib/html/dartium/html_dartium.dart View 758 chunks +2178 lines, -2038 lines 0 comments Download
M lib/html/scripts/generator.py View 1 2 3 4 5 2 chunks +56 lines, -3 lines 0 comments Download
M lib/html/scripts/systemhtml.py View 1 2 3 4 5 6 chunks +34 lines, -30 lines 0 comments Download
M lib/html/src/KeyLocation.dart View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/src/KeyName.dart View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/src/ReadyState.dart View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/src/dart2js_FactoryProviders.dart View 4 5 1 chunk +7 lines, -6 lines 0 comments Download
M lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart View 4 5 1 chunk +7 lines, -5 lines 0 comments Download
M lib/html/src/dart2js_TypedArrayFactoryProvider.dart View 4 5 1 chunk +44 lines, -35 lines 0 comments Download
M lib/html/src/dartium_FactoryProviders.dart View 4 5 3 chunks +57 lines, -53 lines 0 comments Download
M lib/html/src/shared_FactoryProviders.dart View 4 5 6 chunks +12 lines, -11 lines 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_AudioElement.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_Blob.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_CSSMatrix.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate View 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_FormData.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_HttpRequest.darttemplate View 4 5 1 chunk +5 lines, -5 lines 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_OptionElement.darttemplate View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_SharedWorker.darttemplate View 4 5 1 chunk +5 lines, -4 lines 0 comments Download
M lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.darttemplate View 4 5 1 chunk +10 lines, -8 lines 0 comments Download
M lib/html/templates/html/dartium/factoryprovider.darttemplate View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/dartium/factoryprovider_HttpRequest.darttemplate View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M lib/html/templates/html/impl/impl_Element.darttemplate View 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M lib/html/templates/html/interface/interface.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/interface/interface_AudioContext.darttemplate View 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M lib/html/templates/html/interface/interface_CSSStyleDeclaration.darttemplate View 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M lib/html/templates/html/interface/interface_CanvasElement.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/interface/interface_Document.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/interface/interface_DocumentFragment.darttemplate View 4 5 1 chunk +6 lines, -4 lines 0 comments Download
M lib/html/templates/html/interface/interface_Element.darttemplate View 1 4 5 4 chunks +10 lines, -8 lines 0 comments Download
M lib/html/templates/html/interface/interface_Event.darttemplate View 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M lib/html/templates/html/interface/interface_EventTarget.darttemplate View 1 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M lib/html/templates/html/interface/interface_HttpRequest.darttemplate View 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M lib/html/templates/html/interface/interface_IDBKeyRange.darttemplate View 4 5 1 chunk +11 lines, -6 lines 0 comments Download
M lib/html/templates/html/interface/interface_MouseEvent.darttemplate View 4 5 1 chunk +8 lines, -3 lines 0 comments Download
M lib/html/templates/html/interface/interface_MutationObserver.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/interface/interface_Node.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/interface/interface_NodeList.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/interface/interface_NodeSelector.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/interface/interface_Point.darttemplate View 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M lib/html/templates/html/interface/interface_SVGElement.darttemplate View 1 2 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M lib/html/templates/html/interface/interface_SVGSVGElement.darttemplate View 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M lib/html/templates/html/interface/interface_Storage.darttemplate View 1 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/interface/interface_Text.darttemplate View 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M lib/html/templates/html/interface/interface_WebSocket.darttemplate View 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M lib/html/templates/html/interface/interface_Window.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/interface.darttemplate View 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
blois
8 years, 3 months ago (2012-09-14 20:36:01 UTC) #1
Anton Muhin
Pretty neat, thanks a lot! https://chromiumcodereview.appspot.com/10915245/diff/5002/lib/html/scripts/generator.py File lib/html/scripts/generator.py (right): https://chromiumcodereview.appspot.com/10915245/diff/5002/lib/html/scripts/generator.py#newcode369 lib/html/scripts/generator.py:369: if parameter_count is None: ...
8 years, 3 months ago (2012-09-17 10:11:28 UTC) #2
blois
https://chromiumcodereview.appspot.com/10915245/diff/5002/lib/html/scripts/generator.py File lib/html/scripts/generator.py (right): https://chromiumcodereview.appspot.com/10915245/diff/5002/lib/html/scripts/generator.py#newcode369 lib/html/scripts/generator.py:369: if parameter_count is None: On 2012/09/17 10:11:28, Anton Muhin ...
8 years, 3 months ago (2012-09-17 19:48:22 UTC) #3
Anton Muhin
STV! https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/scripts/generator.py File lib/html/scripts/generator.py (right): https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/scripts/generator.py#newcode430 lib/html/scripts/generator.py:430: def EmitOptionalParameterInvocation(index, emitter): up to you, another option ...
8 years, 3 months ago (2012-09-18 07:45:34 UTC) #4
Lasse Reichstein Nielsen
https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/src/dart2js_FactoryProviders.dart File lib/html/src/dart2js_FactoryProviders.dart (right): https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/src/dart2js_FactoryProviders.dart#newcode16 lib/html/src/dart2js_FactoryProviders.dart:16: } Can you make the original constructor do this ...
8 years, 3 months ago (2012-09-18 08:19:47 UTC) #5
Anton Muhin
https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/src/dart2js_FactoryProviders.dart File lib/html/src/dart2js_FactoryProviders.dart (right): https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/src/dart2js_FactoryProviders.dart#newcode16 lib/html/src/dart2js_FactoryProviders.dart:16: } Lasse, that is planned, but Peter prefers to ...
8 years, 3 months ago (2012-09-18 08:20:54 UTC) #6
vsm
LGTM! https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/scripts/generator.py File lib/html/scripts/generator.py (right): https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/scripts/generator.py#newcode420 lib/html/scripts/generator.py:420: ' factory $CTOR($PARAMS) => $FACTORY.$CTOR_FACTORY_NAME($FACTORY_PARAMS);\n', nit: line length ...
8 years, 3 months ago (2012-09-18 15:57:03 UTC) #7
blois
8 years, 3 months ago (2012-09-18 18:12:25 UTC) #8
https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/scripts/ge...
File lib/html/scripts/generator.py (right):

https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/scripts/ge...
lib/html/scripts/generator.py:420: '  factory $CTOR($PARAMS) =>
$FACTORY.$CTOR_FACTORY_NAME($FACTORY_PARAMS);\n',
On 2012/09/18 15:57:03, vsm wrote:
> nit: line length

Done.

https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/scripts/ge...
lib/html/scripts/generator.py:430: def EmitOptionalParameterInvocation(index,
emitter):
On 2012/09/18 07:45:34, Anton Muhin wrote:
> up to you, another option would be to put definition of this closure below
> definition of dispatcher_emitter and do no pass the argument at all.

Done.

https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/scripts/sy...
File lib/html/scripts/systemhtml.py (right):

https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/scripts/sy...
lib/html/scripts/systemhtml.py:492: suppressed_extends = []
On 2012/09/18 07:45:34, Anton Muhin wrote:
> suppressed_implements :) ?

Done. Note that the template still uses $IMPLEMENTS because it is shared
elsewhere where it actually is implements.

https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/templates/...
File lib/html/templates/html/interface/interface.darttemplate (right):

https://chromiumcodereview.appspot.com/10915245/diff/5007/lib/html/templates/...
lib/html/templates/html/interface/interface.darttemplate:8: abstract class
$ID$EXTENDS {
On 2012/09/18 15:57:03, vsm wrote:
> These $EXTENDS are now really implements, right?

Only sometimes (confusingly enough)- this template is interchangeable with ones
which do have a separate implements. Also, moving forward I'd like to make this
an explicit 'extends' (as a separate CL).

Powered by Google App Engine
This is Rietveld 408576698