Commit Graph

52 Commits

Author SHA1 Message Date
sra@google.com d5bf145d29 Mark VoidCallback as a [Callback]
This will let Dart 0-arg functions be passed to
NotifcationCenter.requestPermission to fix Issue 830.

The change required merging interface extended attributes.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8935001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2373 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-13 03:11:50 +00:00
sra@google.com aed94fd301 Generate EventListener attributes of non-EventTarget classes.
Some DOM types have EventListenter attributes but are not
EventTargets.  For these types we have no choice but to implement the
onxxx attributes.

This change also reverts the addition of EventTarget to the
implemented types of JavaScriptAudioNode.  That was a mistake.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8894029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2336 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-10 09:53:46 +00:00
vsm@google.com 649071d8c5 Add enables consistent with Chrome's WebKit
jacobr: You'll also pick up new apis next time you gen dart:html.

Review URL: http://codereview.chromium.org//8895013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2328 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 23:15:30 +00:00
sra@google.com 753088eb43 Add KeyName and KeyLocation to frog dom.
Removed the 'snippet' and added these classes to src.

dart:html could also #source these files now.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8872058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2299 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 07:06:02 +00:00
sra@google.com 0868e8fafa Turn on ENABLE_VIDEO to enable AudioContext.createMediaElementSource
BUG=
TEST=

Review URL: http://codereview.chromium.org//8889042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2298 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 05:51:06 +00:00
sra@google.com d0cd0a5e58 Work-around Frog codegen bug where Window is derived from native DOMWindow.
Window really needs to be an alias for DOMWindow.

Worker-friendly console.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8879044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2297 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 02:25:40 +00:00
vsm@google.com 895891f8e8 Added WebSocket support for dartc and frog
Review URL: http://codereview.chromium.org//8879037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2289 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 23:16:19 +00:00
sra@google.com 4521347a0b Fix AudioContext constructor for Dartc.
Frog is still broken, but this should fix the build.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8873011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2231 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 09:05:49 +00:00
sra@google.com cc6a29f991 Enable fullscreen API and file system API
These were discussed in the Hackathon HTML5 lecture.
They are also enabled in Dartium.
Enabling so they can be used.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8879007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2227 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 06:46:27 +00:00
vsm@google.com 03a41b0b73 Added constructor for AudioContext for dartc and frog
Review URL: http://codereview.chromium.org//8873008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2225 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 05:51:01 +00:00
sra@google.com 58fea99105 Revert "Revert "Implement typed array constructors.""
This reverts commit c994dafc93117a7ba270df5c92212a7c85dcc705.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8883007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2222 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 03:22:23 +00:00
sra@google.com 1dc0d0899b Revert "Implement typed array constructors."
This reverts commit ace636521ecc117cc02b07ebd221d57913f01d7a.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8885004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2221 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 02:49:11 +00:00
sra@google.com c050587f5d Implement typed array constructors.
This change implements a set of three constructors for each of TypedArrays, e.g:

Float32Array(int len);
Float32Array.fromList(List<num> list);
Float32Array.fromBuffer(ArrayBuffer buffer);

Implemented for both Dartc and Frog.
Test case coming in a different CL.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8889001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2220 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 02:43:59 +00:00
sra@google.com 1e5755b3d8 Custom native class spec for Console.
BUG=
TEST=

Review URL: http://codereview.chromium.org//8758022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2140 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 20:43:20 +00:00
sra@google.com 52944bf7b6 Work-around for FireFox: patch non-leaf types statically if possible.
BUG=
TEST=

Review URL: http://codereview.chromium.org//8820004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2114 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 03:41:19 +00:00
sra@google.com 5008a20945 Fix CanvasPixelArray's operator[] for the wrapping js dom
The item() indexing accessor went away, so implement Dart indexing on
top of JS indexing.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8784013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2055 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-03 09:02:37 +00:00
sra@google.com 4a7fece9e9 Generate callbacks as typedefs.
IDL interfaces with the Callback extended attribute are emitted as
typedefs instead of interfaces or classes.  This brings the JS doms
into line with the Dartium version.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8786016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2054 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-03 06:08:32 +00:00
sra@google.com 33c8cecafd Turn on webaudio for JS backends.
There was a comment to fix the idl/parser but it no longer seems to be
a problem.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8785014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2052 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-03 03:20:40 +00:00
sra@google.com 79ad37eb5f Generate JS code to characterize browsers.
The generated html can be run in several browsers to gather data to
determine the common set of DOM objects with constructors in the
global namespace.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8784011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2049 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-03 02:22:37 +00:00
sra@google.com 4f20c6ca03 Mark frog DOMWindow as aliased with global scope.
BUG=
TEST=

Review URL: http://codereview.chromium.org//8773024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2006 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 00:20:47 +00:00
dgrove@google.com 75eaa7d815 Add '#library' to tests that need a #import or #source.
Review URL: http://codereview.chromium.org//8764018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1967 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 05:54:22 +00:00
sra@google.com a6f410174d Generate constants for IDL classes
We will have to revert this if we go back to pure interfaces.

Fixes:
dartfrog-generated/dom/Cache.html	text
dartfrog-generated/dom/Exceptions.html	text
dartfrog-generated/dom/IsolateLight.html	text
dartfrog-generated/dom/DOMConstructors.html	text

BUG=
TEST=

Review URL: http://codereview.chromium.org//8473008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1878 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 21:28:12 +00:00
podivilov@google.com 437f27b534 Remove support for attribute event listeners.
R=vsm@google.com
BUG=5590885

Review URL: http://codereview.chromium.org//8637013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1790 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 13:31:13 +00:00
sra@google.com fb98a21f8c Switch to " native '*Class' "
BUG=
TEST=

Review URL: http://codereview.chromium.org//8665012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1775 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 02:50:29 +00:00
sra@google.com 42f62445ff Enable SVG for dartc and frog
This will increase the size of dart:dom by ~30%
There is a basic layout test that will be checked in soon.

BUG=5353686
TEST=

Review URL: http://codereview.chromium.org//8618007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1726 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 23:57:21 +00:00
vsm@google.com 7a0c8ebee2 Generate constructors for frog DOM
Note, this overlaps with the other CL (http://codereview.chromium.org/8595020/) as the underlying IDL has changed.

Stephen: If this looks good, I can autogen the wrapper templates as well.

Review URL: http://codereview.chromium.org//8569017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1691 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 04:51:45 +00:00
vsm@google.com 0da36c6374 Cleanup old code and refresh on IDL
Note, this picks up Pavel's custom->any IDL change.

Review URL: http://codereview.chromium.org//8595020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1690 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 04:43:03 +00:00
sra@google.com d98d380d29 Cleanup generators
Make generators uniform.

Remove some dead code from the old use of interface injection to
constructing union types.

This CL makes no changes to the generated files.

TBR=vsm
BUG=
TEST=

Review URL: http://codereview.chromium.org//8500007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1684 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-19 05:55:38 +00:00
sra@google.com 3e199eec2d Wrapper dom changes in preparation for SVG
SVG defines methods that override base class methods. This requires
the Dart static helper methods to have unique names since Dart
inconveniently does not permit static method shadowing.  Rather than
furr up all the names with yet another copy of the class or interface
name, this change only adds the interface name if there actually is a
base class method of the same name.

Almost all of this change is due to applying the same technique to the
attribute getters and setters, which makes many names a little shorter.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8548010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1646 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 06:10:51 +00:00
vsm@google.com f0e5d25767 Roll DOM APIs forward on IDL & update Frog DOM
Note, the frog DOM is generated via:
> ../tools/copy_dart.py frog frog_dom.dart
to keep it a single file.

I'll experiment to get rid of this level of indirection in a later CL.

Review URL: http://codereview.chromium.org//8591026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1644 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 03:04:12 +00:00
vsm@google.com 8299dfe610 Regenerate from IDL with LANGUAGE_JAVASCRIPT on
Review URL: http://codereview.chromium.org//8588010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1620 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 15:01:35 +00:00
vsm@google.com bfb17fba32 Support DOMString[] and regenerate from IDL
Notes:
- This rolls forward to just before Pavel's LANGUAGE_JAVASCRIPT change.  I'll update from there in a second CL.
- I'll need to reapply to initWebKitWheelEvent manually to this.

Review URL: http://codereview.chromium.org//8574040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1590 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 23:05:15 +00:00
jacobr@google.com 157b35983a Implement measurement using promises
BUG=
TEST=

Review URL: http://codereview.chromium.org//8363040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1050 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-01 23:17:47 +00:00
sra@google.com 4e729db1f7 Add explicit 'super()' calls for dartc / frog.
BUG=
TEST=

Review URL: http://codereview.chromium.org//8432025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@988 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-01 04:15:04 +00:00
sra@google.com f22ce24b56 Work-arounds for missing and broken Frog functionality.
Local functions with named parameters don't work (missing metadata?)

Local functions with these paremeters don't parse:
  -  indented(action()) { // fix:  indented(action) {
  -  wln([node=null]) {   // fix:  wln([node]) {

TBR=vsm

BUG=
TEST=

Review URL: http://codereview.chromium.org//8384029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@986 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-01 03:21:33 +00:00
vsm@google.com 7b3449d97a Mods to generate frog dom apis
Note: The generated DOM will be added under generated/src/frog.  I'll upload them once you've had a chance to look at the script changes without clutter.

Review URL: https://chromereviews.googleplex.com/3563020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@976 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 22:18:02 +00:00
ngeoffray@google.com 5496005d1d Add optional arguments to our indexOf/lastIndexOf methods.
Review URL: http://codereview.chromium.org//8424012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@947 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-31 13:21:30 +00:00
sra@google.com b1cdd76ec5 Revert "Revert "PEG Parser: under review at http://codereview.chromium.org/8399029""
This reverts commit 662a83bbf617fd8a008c3b55f7bf122be23dfd53.

Has added suppression to keep dartc green.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8414040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@929 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-29 01:14:18 +00:00
sra@google.com 9aacf5aa62 Revert "PEG Parser: under review at http://codereview.chromium.org/8399029"
This reverts commit e9f4f54f10af8a0b808b0fd4a1ea54384df0d7d9.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8414016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@870 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 05:34:41 +00:00
sra@google.com 5801bcfbb3 PEG Parser: under review at http://codereview.chromium.org/8399029
Some features are not yet implemented (e.g. attributes).

BUG=
TEST=

Review URL: http://codereview.chromium.org//8404031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@869 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 05:12:12 +00:00
vsm@google.com 91601e09fc Fix for events fired on different isolates.
Ensures that a DOM callback will be fired on the isolate that it
originated on.

BUG=5151491
TEST=https://chromereviews.googleplex.com/3624031/

Review URL: http://codereview.chromium.org//8370031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@798 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-27 03:02:43 +00:00
sra@google.com 6ae8d1a4a7 Remove createXMLHttpRequest and other 'factory' constructors.
These are now available with 'new' syntax (i.e. from genuine factory
constructors.)

BUG=5464478
TEST=

Review URL: http://codereview.chromium.org//8344019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@537 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 21:46:37 +00:00
knorton@google.com 0b647b51c0 Convert cache property from array to object.
This fixes hangs on Safari where it attempts to stringify the array.
Review URL: http://codereview.chromium.org/8301007/

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@463 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-15 01:32:09 +00:00
pdr@google.com b8397762e1 IE9 dom fixes: Add check for __proto__ before using it and add some name workarounds.
Review URL: http://codereview.chromium.org//8277016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@452 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 20:25:00 +00:00
jacobr@google.com ddaacbe83b checkpoint
BUG=
TEST=

Review URL: https://chromereviews.googleplex.com/3556012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@265 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 23:29:39 +00:00
sra@google.com 5883649a35 Browser compat fix for setInterval and SetTimeout.
Firefox passes an argument to the TimeoutHander, Chrome doesn't.  Fix
by dropping all arguments before calling the strict Dart function.

BUG=
TEST=

Review URL: https://chromereviews.googleplex.com/3544020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@163 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 22:08:36 +00:00
sra@google.com 5f7a1541ef Implement List.xxxRange methods for DOM types in wrapping DOM.
All implementations are stubs.  Since the lists are read-only,
only getRange need to be reimplemented.

BUG=
TEST=

Review URL: https://chromereviews.googleplex.com/3538017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@148 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 19:17:44 +00:00
vsm@google.com 1bcf461c37 One more optional arg fix
Forgot this one.

Review URL: https://chromereviews.googleplex.com/3530017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@135 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 16:11:05 +00:00
sra@google.com ea49561596 Mark parameters with [Optional=CallWithDefaultValue] as not optional.
This extended attribute was recently added to many WebKit IDL
operations to mark arguments that were accepted as missing.
Many are stupid legacy behaviour, like NodeList.item(index).
We don't want Dart to have such a broad API.

An example change is  http://repo.or.cz/w/webkit.git/commit/2f24f204931478c3f51dc9dbd6d5a05109917bdd

There will be some parameters marked as [Optional=CallWithDefaultValue] that
really should be optional.  We will discover those and have to whitelist them.

BUG=
TEST=

Review URL: https://chromereviews.googleplex.com/3531016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@89 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 04:30:51 +00:00
vsm@google.com 12b69ca3ba New named optional arguments syntax
BUG=5218494

Review URL: https://chromereviews.googleplex.com/3516022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@79 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 22:35:00 +00:00