webidl 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/webidl/ast/operation.rb +5 -0
- data/lib/webidl/parse_tree/operation.rb +2 -1
- data/lib/webidl/parser/idl.rb +35 -16
- data/lib/webidl/parser/idl.treetop +1 -1
- data/lib/webidl/version.rb +1 -1
- data/spec/ast_spec.rb +5 -0
- data/spec/fixtures/html5.idl +343 -204
- data/spec/fixtures/interface_with_static_operation.idl +3 -0
- data/spec/parser_spec.rb +8 -0
- metadata +6 -5
data/lib/webidl/ast/operation.rb
CHANGED
@@ -9,6 +9,7 @@ module WebIDL
|
|
9
9
|
@parent = parent
|
10
10
|
@type = type
|
11
11
|
@name = opts[:name] || ''
|
12
|
+
@static = opts[:static]
|
12
13
|
@specials = opts[:specials] || []
|
13
14
|
@args = opts[:args] || []
|
14
15
|
@raises = opts[:raises] || []
|
@@ -38,6 +39,10 @@ module WebIDL
|
|
38
39
|
@specials.include? 'caller'
|
39
40
|
end
|
40
41
|
|
42
|
+
def static?
|
43
|
+
!!@static
|
44
|
+
end
|
45
|
+
|
41
46
|
end # Operation
|
42
47
|
end # Ast
|
43
48
|
end # WebIDL
|
data/lib/webidl/parser/idl.rb
CHANGED
@@ -1542,17 +1542,21 @@ module WebIDL
|
|
1542
1542
|
end
|
1543
1543
|
|
1544
1544
|
module Operation0
|
1545
|
-
def
|
1545
|
+
def static
|
1546
1546
|
elements[0]
|
1547
1547
|
end
|
1548
1548
|
|
1549
|
-
def
|
1549
|
+
def specials
|
1550
1550
|
elements[1]
|
1551
1551
|
end
|
1552
1552
|
|
1553
|
-
def
|
1553
|
+
def ws
|
1554
1554
|
elements[2]
|
1555
1555
|
end
|
1556
|
+
|
1557
|
+
def op
|
1558
|
+
elements[3]
|
1559
|
+
end
|
1556
1560
|
end
|
1557
1561
|
|
1558
1562
|
def _nt_Operation
|
@@ -1567,26 +1571,41 @@ module WebIDL
|
|
1567
1571
|
end
|
1568
1572
|
|
1569
1573
|
i0, s0 = index, []
|
1570
|
-
|
1571
|
-
|
1574
|
+
if has_terminal?("static", false, index)
|
1575
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + 6))
|
1576
|
+
@index += 6
|
1577
|
+
else
|
1578
|
+
terminal_parse_failure("static")
|
1579
|
+
r2 = nil
|
1580
|
+
end
|
1572
1581
|
if r2
|
1573
1582
|
r1 = r2
|
1574
1583
|
else
|
1575
|
-
|
1576
|
-
if r3
|
1577
|
-
r1 = r3
|
1578
|
-
else
|
1579
|
-
@index = i1
|
1580
|
-
r1 = nil
|
1581
|
-
end
|
1584
|
+
r1 = instantiate_node(SyntaxNode,input, index...index)
|
1582
1585
|
end
|
1583
1586
|
s0 << r1
|
1584
1587
|
if r1
|
1585
|
-
|
1586
|
-
|
1588
|
+
i3 = index
|
1589
|
+
r4 = _nt_OmittableSpecials
|
1587
1590
|
if r4
|
1588
|
-
|
1589
|
-
|
1591
|
+
r3 = r4
|
1592
|
+
else
|
1593
|
+
r5 = _nt_Specials
|
1594
|
+
if r5
|
1595
|
+
r3 = r5
|
1596
|
+
else
|
1597
|
+
@index = i3
|
1598
|
+
r3 = nil
|
1599
|
+
end
|
1600
|
+
end
|
1601
|
+
s0 << r3
|
1602
|
+
if r3
|
1603
|
+
r6 = _nt_ws
|
1604
|
+
s0 << r6
|
1605
|
+
if r6
|
1606
|
+
r7 = _nt_OperationRest
|
1607
|
+
s0 << r7
|
1608
|
+
end
|
1590
1609
|
end
|
1591
1610
|
end
|
1592
1611
|
if s0.last
|
@@ -91,7 +91,7 @@ module WebIDL
|
|
91
91
|
end
|
92
92
|
|
93
93
|
rule Operation
|
94
|
-
specials:(OmittableSpecials / Specials) ws op:OperationRest <ParseTree::Operation>
|
94
|
+
static:"static"? specials:(OmittableSpecials / Specials) ws op:OperationRest <ParseTree::Operation>
|
95
95
|
end
|
96
96
|
|
97
97
|
rule OmittableSpecials
|
data/lib/webidl/version.rb
CHANGED
data/spec/ast_spec.rb
CHANGED
@@ -214,6 +214,11 @@ describe WebIDL::Ast do
|
|
214
214
|
last.type.should be_nullable
|
215
215
|
end
|
216
216
|
|
217
|
+
it "creates a static operation" do
|
218
|
+
interface = parse(fixture("interface_with_static_operation.idl")).build.first
|
219
|
+
interface.members.first.should be_static
|
220
|
+
end
|
221
|
+
|
217
222
|
it "creates an implements statement" do
|
218
223
|
mod = parse(fixture("module_with_implements_statement.idl")).build.first
|
219
224
|
|
data/spec/fixtures/html5.idl
CHANGED
@@ -1,10 +1,6 @@
|
|
1
|
-
interface Example {
|
2
|
-
// this is an IDL definition
|
3
|
-
};
|
4
|
-
|
5
1
|
interface HTMLCollection {
|
6
2
|
readonly attribute unsigned long length;
|
7
|
-
caller getter
|
3
|
+
caller getter Element item(in unsigned long index);
|
8
4
|
caller getter object namedItem(in DOMString name); // only returns Element
|
9
5
|
};
|
10
6
|
|
@@ -30,6 +26,7 @@ interface HTMLOptionsCollection : HTMLCollection {
|
|
30
26
|
void add(in HTMLElement element, in optional HTMLElement before);
|
31
27
|
void add(in HTMLElement element, in long before);
|
32
28
|
void remove(in long index);
|
29
|
+
attribute long selectedIndex;
|
33
30
|
};
|
34
31
|
|
35
32
|
interface HTMLPropertiesCollection : HTMLCollection {
|
@@ -65,6 +62,19 @@ interface DOMStringMap {
|
|
65
62
|
deleter void (in DOMString name);
|
66
63
|
};
|
67
64
|
|
65
|
+
interface DOMElementMap {
|
66
|
+
getter DOMString (in DOMString name);
|
67
|
+
setter void (in DOMString name, in Element value);
|
68
|
+
creator void (in DOMString name, in Element value);
|
69
|
+
deleter void (in DOMString name);
|
70
|
+
};
|
71
|
+
|
72
|
+
[Supplemental] exception DOMException {
|
73
|
+
const unsigned short URL_MISMATCH_ERR = 21;
|
74
|
+
const unsigned short QUOTA_EXCEEDED_ERR = 22;
|
75
|
+
const unsigned short DATA_CLONE_ERR = 25;
|
76
|
+
};
|
77
|
+
|
68
78
|
[OverrideBuiltins]
|
69
79
|
interface HTMLDocument {
|
70
80
|
// resource metadata management
|
@@ -94,7 +104,8 @@ interface HTMLDocument {
|
|
94
104
|
readonly attribute HTMLCollection scripts;
|
95
105
|
NodeList getElementsByName(in DOMString elementName);
|
96
106
|
NodeList getElementsByClassName(in DOMString classNames);
|
97
|
-
NodeList getItems(in optional DOMString typeNames); // microdata
|
107
|
+
NodeList getItems(in optional DOMString typeNames); // microdata
|
108
|
+
readonly attribute DOMElementMap cssElementMap;
|
98
109
|
|
99
110
|
// dynamic markup insertion
|
100
111
|
attribute DOMString innerHTML;
|
@@ -106,7 +117,6 @@ interface HTMLDocument {
|
|
106
117
|
|
107
118
|
// user interaction
|
108
119
|
readonly attribute WindowProxy defaultView;
|
109
|
-
Selection getSelection();
|
110
120
|
readonly attribute Element activeElement;
|
111
121
|
boolean hasFocus();
|
112
122
|
attribute DOMString designMode;
|
@@ -144,8 +154,6 @@ interface HTMLDocument {
|
|
144
154
|
attribute Function onended;
|
145
155
|
attribute Function onerror;
|
146
156
|
attribute Function onfocus;
|
147
|
-
attribute Function onformchange;
|
148
|
-
attribute Function onforminput;
|
149
157
|
attribute Function oninput;
|
150
158
|
attribute Function oninvalid;
|
151
159
|
attribute Function onkeydown;
|
@@ -167,6 +175,7 @@ interface HTMLDocument {
|
|
167
175
|
attribute Function onprogress;
|
168
176
|
attribute Function onratechange;
|
169
177
|
attribute Function onreadystatechange;
|
178
|
+
attribute Function onreset;
|
170
179
|
attribute Function onscroll;
|
171
180
|
attribute Function onseeked;
|
172
181
|
attribute Function onseeking;
|
@@ -189,7 +198,6 @@ DOMImplementation implements DOMHTMLImplementation;
|
|
189
198
|
|
190
199
|
[Supplemental, NoInterfaceObject]
|
191
200
|
interface XMLDocumentLoader {
|
192
|
-
attribute boolean async;
|
193
201
|
boolean load(in DOMString url);
|
194
202
|
};
|
195
203
|
|
@@ -211,7 +219,7 @@ interface HTMLElement : Element {
|
|
211
219
|
readonly attribute DOMTokenList classList;
|
212
220
|
readonly attribute DOMStringMap dataset;
|
213
221
|
|
214
|
-
// microdata
|
222
|
+
// microdata
|
215
223
|
attribute boolean itemScope;
|
216
224
|
attribute DOMString itemType;
|
217
225
|
attribute DOMString itemId;
|
@@ -223,18 +231,17 @@ interface HTMLElement : Element {
|
|
223
231
|
// user interaction
|
224
232
|
attribute boolean hidden;
|
225
233
|
void click();
|
226
|
-
void scrollIntoView();
|
227
|
-
void scrollIntoView(in boolean top);
|
228
234
|
attribute long tabIndex;
|
229
235
|
void focus();
|
230
236
|
void blur();
|
231
237
|
attribute DOMString accessKey;
|
232
238
|
readonly attribute DOMString accessKeyLabel;
|
233
239
|
attribute boolean draggable;
|
240
|
+
[PutForwards=value] attribute DOMSettableTokenList dropzone;
|
234
241
|
attribute DOMString contentEditable;
|
235
242
|
readonly attribute boolean isContentEditable;
|
236
243
|
attribute HTMLMenuElement contextMenu;
|
237
|
-
attribute
|
244
|
+
attribute boolean spellcheck;
|
238
245
|
|
239
246
|
// command API
|
240
247
|
readonly attribute DOMString commandType;
|
@@ -270,8 +277,6 @@ interface HTMLElement : Element {
|
|
270
277
|
attribute Function onended;
|
271
278
|
attribute Function onerror;
|
272
279
|
attribute Function onfocus;
|
273
|
-
attribute Function onformchange;
|
274
|
-
attribute Function onforminput;
|
275
280
|
attribute Function oninput;
|
276
281
|
attribute Function oninvalid;
|
277
282
|
attribute Function onkeydown;
|
@@ -293,6 +298,7 @@ interface HTMLElement : Element {
|
|
293
298
|
attribute Function onprogress;
|
294
299
|
attribute Function onratechange;
|
295
300
|
attribute Function onreadystatechange;
|
301
|
+
attribute Function onreset;
|
296
302
|
attribute Function onscroll;
|
297
303
|
attribute Function onseeked;
|
298
304
|
attribute Function onseeking;
|
@@ -373,6 +379,7 @@ interface HTMLBodyElement : HTMLElement {
|
|
373
379
|
attribute Function onpageshow;
|
374
380
|
attribute Function onredo;
|
375
381
|
attribute Function onresize;
|
382
|
+
attribute Function onscroll;
|
376
383
|
attribute Function onstorage;
|
377
384
|
attribute Function onundo;
|
378
385
|
attribute Function onunload;
|
@@ -393,6 +400,7 @@ interface HTMLQuoteElement : HTMLElement {
|
|
393
400
|
interface HTMLOListElement : HTMLElement {
|
394
401
|
attribute boolean reversed;
|
395
402
|
attribute long start;
|
403
|
+
attribute DOMString type;
|
396
404
|
};
|
397
405
|
|
398
406
|
interface HTMLUListElement : HTMLElement {};
|
@@ -502,11 +510,12 @@ interface HTMLParamElement : HTMLElement {
|
|
502
510
|
};
|
503
511
|
|
504
512
|
interface HTMLVideoElement : HTMLMediaElement {
|
505
|
-
attribute
|
506
|
-
attribute
|
513
|
+
attribute unsigned long width;
|
514
|
+
attribute unsigned long height;
|
507
515
|
readonly attribute unsigned long videoWidth;
|
508
516
|
readonly attribute unsigned long videoHeight;
|
509
517
|
attribute DOMString poster;
|
518
|
+
[PutForwards=value] attribute DOMSettableTokenList audio;
|
510
519
|
};
|
511
520
|
|
512
521
|
[NamedConstructor=Audio(),
|
@@ -521,11 +530,12 @@ interface HTMLSourceElement : HTMLElement {
|
|
521
530
|
|
522
531
|
interface HTMLTrackElement : HTMLElement {
|
523
532
|
attribute DOMString kind;
|
524
|
-
attribute DOMString label;
|
525
533
|
attribute DOMString src;
|
526
534
|
attribute DOMString srclang;
|
535
|
+
attribute DOMString label;
|
536
|
+
attribute boolean default;
|
527
537
|
|
528
|
-
readonly attribute
|
538
|
+
readonly attribute TextTrack track;
|
529
539
|
};
|
530
540
|
|
531
541
|
interface HTMLMediaElement : HTMLElement {
|
@@ -556,12 +566,13 @@ interface HTMLMediaElement : HTMLElement {
|
|
556
566
|
readonly attribute boolean seeking;
|
557
567
|
|
558
568
|
// playback state
|
559
|
-
attribute
|
560
|
-
readonly attribute
|
561
|
-
readonly attribute
|
569
|
+
attribute double currentTime;
|
570
|
+
readonly attribute double initialTime;
|
571
|
+
readonly attribute double duration;
|
572
|
+
readonly attribute Date startOffsetTime;
|
562
573
|
readonly attribute boolean paused;
|
563
|
-
attribute
|
564
|
-
attribute
|
574
|
+
attribute double defaultPlaybackRate;
|
575
|
+
attribute double playbackRate;
|
565
576
|
readonly attribute TimeRanges played;
|
566
577
|
readonly attribute TimeRanges seekable;
|
567
578
|
readonly attribute boolean ended;
|
@@ -570,14 +581,22 @@ interface HTMLMediaElement : HTMLElement {
|
|
570
581
|
void play();
|
571
582
|
void pause();
|
572
583
|
|
584
|
+
// media controller
|
585
|
+
attribute DOMString mediaGroup;
|
586
|
+
attribute MediaController controller;
|
587
|
+
|
573
588
|
// controls
|
574
589
|
attribute boolean controls;
|
575
|
-
attribute
|
590
|
+
attribute double volume;
|
576
591
|
attribute boolean muted;
|
577
592
|
|
578
|
-
//
|
579
|
-
|
580
|
-
|
593
|
+
// tracks
|
594
|
+
|
595
|
+
readonly attribute MultipleTrackList audioTracks;
|
596
|
+
readonly attribute ExclusiveTrackList videoTracks;
|
597
|
+
|
598
|
+
readonly attribute TextTrack[] textTracks;
|
599
|
+
MutableTextTrack addTextTrack(in DOMString kind, in optional DOMString label, in optional DOMString language);
|
581
600
|
|
582
601
|
};
|
583
602
|
|
@@ -589,7 +608,51 @@ interface MediaError {
|
|
589
608
|
readonly attribute unsigned short code;
|
590
609
|
};
|
591
610
|
|
592
|
-
interface
|
611
|
+
interface TrackList {
|
612
|
+
readonly attribute unsigned long length;
|
613
|
+
DOMString getName(in unsigned long index);
|
614
|
+
DOMString getLanguage(in unsigned long index);
|
615
|
+
|
616
|
+
attribute Function onchange;
|
617
|
+
};
|
618
|
+
|
619
|
+
interface MultipleTrackList : TrackList {
|
620
|
+
boolean isEnabled(in unsigned long index);
|
621
|
+
void enable(in unsigned long index);
|
622
|
+
void disable(in unsigned long index);
|
623
|
+
};
|
624
|
+
|
625
|
+
interface ExclusiveTrackList : TrackList {
|
626
|
+
readonly attribute unsigned long selectedIndex;
|
627
|
+
void select(in unsigned long index);
|
628
|
+
};
|
629
|
+
|
630
|
+
[Constructor]
|
631
|
+
interface MediaController {
|
632
|
+
readonly attribute TimeRanges buffered;
|
633
|
+
readonly attribute TimeRanges seekable;
|
634
|
+
readonly attribute double duration;
|
635
|
+
attribute double currentTime;
|
636
|
+
|
637
|
+
readonly attribute boolean paused;
|
638
|
+
void play();
|
639
|
+
void pause();
|
640
|
+
|
641
|
+
attribute double defaultPlaybackRate;
|
642
|
+
attribute double playbackRate;
|
643
|
+
|
644
|
+
attribute double volume;
|
645
|
+
attribute boolean muted;
|
646
|
+
|
647
|
+
attribute Function ondurationchange;
|
648
|
+
attribute Function ontimeupdate;
|
649
|
+
attribute Function onplay;
|
650
|
+
attribute Function onpause;
|
651
|
+
attribute Function onratechange;
|
652
|
+
attribute Function onvolumechange;
|
653
|
+
};
|
654
|
+
|
655
|
+
interface TextTrack {
|
593
656
|
readonly attribute DOMString kind;
|
594
657
|
readonly attribute DOMString label;
|
595
658
|
readonly attribute DOMString language;
|
@@ -599,40 +662,45 @@ interface TimedTrack {
|
|
599
662
|
const unsigned short LOADED = 2;
|
600
663
|
const unsigned short ERROR = 3;
|
601
664
|
readonly attribute unsigned short readyState;
|
602
|
-
|
603
|
-
|
665
|
+
attribute Function onload;
|
666
|
+
attribute Function onerror;
|
604
667
|
|
605
668
|
const unsigned short OFF = 0;
|
606
669
|
const unsigned short HIDDEN = 1;
|
607
670
|
const unsigned short SHOWING = 2;
|
608
671
|
attribute unsigned short mode;
|
609
672
|
|
610
|
-
readonly attribute
|
611
|
-
readonly attribute
|
673
|
+
readonly attribute TextTrackCueList cues;
|
674
|
+
readonly attribute TextTrackCueList activeCues;
|
612
675
|
|
613
|
-
|
676
|
+
attribute Function oncuechange;
|
614
677
|
};
|
678
|
+
TextTrack implements EventTarget;
|
615
679
|
|
616
|
-
interface
|
617
|
-
void addCue(in
|
618
|
-
void removeCue(in
|
680
|
+
interface MutableTextTrack : TextTrack {
|
681
|
+
void addCue(in TextTrackCue cue);
|
682
|
+
void removeCue(in TextTrackCue cue);
|
619
683
|
};
|
620
684
|
|
621
|
-
interface
|
685
|
+
interface TextTrackCueList {
|
622
686
|
readonly attribute unsigned long length;
|
623
|
-
getter
|
624
|
-
|
687
|
+
getter TextTrackCue (in unsigned long index);
|
688
|
+
TextTrackCue getCueById(in DOMString id);
|
625
689
|
};
|
626
690
|
|
627
|
-
|
628
|
-
|
629
|
-
|
691
|
+
|
692
|
+
|
693
|
+
[Constructor(in DOMString id, in double startTime, in double endTime, in DOMString text, in optional DOMString settings, in optional boolean pauseOnExit)]
|
694
|
+
|
695
|
+
interface TextTrackCue {
|
696
|
+
readonly attribute TextTrack track;
|
630
697
|
readonly attribute DOMString id;
|
631
698
|
|
632
|
-
readonly attribute
|
633
|
-
readonly attribute
|
699
|
+
readonly attribute double startTime;
|
700
|
+
readonly attribute double endTime;
|
634
701
|
readonly attribute boolean pauseOnExit;
|
635
702
|
|
703
|
+
|
636
704
|
readonly attribute DOMString direction;
|
637
705
|
readonly attribute boolean snapToLines;
|
638
706
|
readonly attribute long linePosition;
|
@@ -640,18 +708,19 @@ interface TimedTrackCue {
|
|
640
708
|
readonly attribute long size;
|
641
709
|
readonly attribute DOMString alignment;
|
642
710
|
|
643
|
-
|
711
|
+
|
644
712
|
DOMString getCueAsSource();
|
645
713
|
DocumentFragment getCueAsHTML();
|
646
714
|
|
647
|
-
|
648
|
-
|
715
|
+
attribute Function onenter;
|
716
|
+
attribute Function onexit;
|
649
717
|
};
|
718
|
+
TextTrackCue implements EventTarget;
|
650
719
|
|
651
720
|
interface TimeRanges {
|
652
721
|
readonly attribute unsigned long length;
|
653
|
-
|
654
|
-
|
722
|
+
double start(in unsigned long index);
|
723
|
+
double end(in unsigned long index);
|
655
724
|
};
|
656
725
|
|
657
726
|
interface HTMLCanvasElement : HTMLElement {
|
@@ -660,7 +729,7 @@ interface HTMLCanvasElement : HTMLElement {
|
|
660
729
|
|
661
730
|
DOMString toDataURL(in optional DOMString type, in any... args);
|
662
731
|
|
663
|
-
object getContext(in DOMString contextId);
|
732
|
+
object getContext(in DOMString contextId, in any... args);
|
664
733
|
};
|
665
734
|
|
666
735
|
interface CanvasRenderingContext2D {
|
@@ -673,86 +742,86 @@ interface CanvasRenderingContext2D {
|
|
673
742
|
void restore(); // pop state stack and restore state
|
674
743
|
|
675
744
|
// transformations (default transform is the identity matrix)
|
676
|
-
void scale(in
|
677
|
-
void rotate(in
|
678
|
-
void translate(in
|
679
|
-
void transform(in
|
680
|
-
void setTransform(in
|
745
|
+
void scale(in double x, in double y);
|
746
|
+
void rotate(in double angle);
|
747
|
+
void translate(in double x, in double y);
|
748
|
+
void transform(in double a, in double b, in double c, in double d, in double e, in double f);
|
749
|
+
void setTransform(in double a, in double b, in double c, in double d, in double e, in double f);
|
681
750
|
|
682
751
|
// compositing
|
683
|
-
attribute
|
752
|
+
attribute double globalAlpha; // (default 1.0)
|
684
753
|
attribute DOMString globalCompositeOperation; // (default source-over)
|
685
754
|
|
686
755
|
// colors and styles
|
687
756
|
attribute any strokeStyle; // (default black)
|
688
757
|
attribute any fillStyle; // (default black)
|
689
|
-
CanvasGradient createLinearGradient(in
|
690
|
-
CanvasGradient createRadialGradient(in
|
758
|
+
CanvasGradient createLinearGradient(in double x0, in double y0, in double x1, in double y1);
|
759
|
+
CanvasGradient createRadialGradient(in double x0, in double y0, in double r0, in double x1, in double y1, in double r1);
|
691
760
|
CanvasPattern createPattern(in HTMLImageElement image, in DOMString repetition);
|
692
761
|
CanvasPattern createPattern(in HTMLCanvasElement image, in DOMString repetition);
|
693
762
|
CanvasPattern createPattern(in HTMLVideoElement image, in DOMString repetition);
|
694
763
|
|
695
764
|
// line caps/joins
|
696
|
-
attribute
|
765
|
+
attribute double lineWidth; // (default 1)
|
697
766
|
attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
|
698
767
|
attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
|
699
|
-
attribute
|
768
|
+
attribute double miterLimit; // (default 10)
|
700
769
|
|
701
770
|
// shadows
|
702
|
-
attribute
|
703
|
-
attribute
|
704
|
-
attribute
|
771
|
+
attribute double shadowOffsetX; // (default 0)
|
772
|
+
attribute double shadowOffsetY; // (default 0)
|
773
|
+
attribute double shadowBlur; // (default 0)
|
705
774
|
attribute DOMString shadowColor; // (default transparent black)
|
706
775
|
|
707
776
|
// rects
|
708
|
-
void clearRect(in
|
709
|
-
void fillRect(in
|
710
|
-
void strokeRect(in
|
777
|
+
void clearRect(in double x, in double y, in double w, in double h);
|
778
|
+
void fillRect(in double x, in double y, in double w, in double h);
|
779
|
+
void strokeRect(in double x, in double y, in double w, in double h);
|
711
780
|
|
712
781
|
// path API
|
713
782
|
void beginPath();
|
714
783
|
void closePath();
|
715
|
-
void moveTo(in
|
716
|
-
void lineTo(in
|
717
|
-
void quadraticCurveTo(in
|
718
|
-
void bezierCurveTo(in
|
719
|
-
void arcTo(in
|
720
|
-
void rect(in
|
721
|
-
void arc(in
|
784
|
+
void moveTo(in double x, in double y);
|
785
|
+
void lineTo(in double x, in double y);
|
786
|
+
void quadraticCurveTo(in double cpx, in double cpy, in double x, in double y);
|
787
|
+
void bezierCurveTo(in double cp1x, in double cp1y, in double cp2x, in double cp2y, in double x, in double y);
|
788
|
+
void arcTo(in double x1, in double y1, in double x2, in double y2, in double radius);
|
789
|
+
void rect(in double x, in double y, in double w, in double h);
|
790
|
+
void arc(in double x, in double y, in double radius, in double startAngle, in double endAngle, in optional boolean anticlockwise);
|
722
791
|
void fill();
|
723
792
|
void stroke();
|
724
793
|
void clip();
|
725
|
-
boolean isPointInPath(in
|
794
|
+
boolean isPointInPath(in double x, in double y);
|
726
795
|
|
727
796
|
// focus management
|
728
|
-
boolean drawFocusRing(in Element element, in
|
797
|
+
boolean drawFocusRing(in Element element, in double xCaret, in double yCaret, in optional boolean canDrawCustom);
|
729
798
|
|
730
799
|
// text
|
731
800
|
attribute DOMString font; // (default 10px sans-serif)
|
732
801
|
attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start")
|
733
802
|
attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
|
734
|
-
void fillText(in DOMString text, in
|
735
|
-
void strokeText(in DOMString text, in
|
803
|
+
void fillText(in DOMString text, in double x, in double y, in optional double maxWidth);
|
804
|
+
void strokeText(in DOMString text, in double x, in double y, in optional double maxWidth);
|
736
805
|
TextMetrics measureText(in DOMString text);
|
737
806
|
|
738
807
|
// drawing images
|
739
|
-
void drawImage(in HTMLImageElement image, in
|
740
|
-
void drawImage(in HTMLImageElement image, in
|
741
|
-
void drawImage(in HTMLCanvasElement image, in
|
742
|
-
void drawImage(in HTMLCanvasElement image, in
|
743
|
-
void drawImage(in HTMLVideoElement image, in
|
744
|
-
void drawImage(in HTMLVideoElement image, in
|
808
|
+
void drawImage(in HTMLImageElement image, in double dx, in double dy, in optional double dw, in double dh);
|
809
|
+
void drawImage(in HTMLImageElement image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
|
810
|
+
void drawImage(in HTMLCanvasElement image, in double dx, in double dy, in optional double dw, in double dh);
|
811
|
+
void drawImage(in HTMLCanvasElement image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
|
812
|
+
void drawImage(in HTMLVideoElement image, in double dx, in double dy, in optional double dw, in double dh);
|
813
|
+
void drawImage(in HTMLVideoElement image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
|
745
814
|
|
746
815
|
// pixel manipulation
|
747
|
-
ImageData createImageData(in
|
816
|
+
ImageData createImageData(in double sw, in double sh);
|
748
817
|
ImageData createImageData(in ImageData imagedata);
|
749
|
-
ImageData getImageData(in
|
750
|
-
void putImageData(in ImageData imagedata, in
|
818
|
+
ImageData getImageData(in double sx, in double sy, in double sw, in double sh);
|
819
|
+
void putImageData(in ImageData imagedata, in double dx, in double dy, in optional double dirtyX, in double dirtyY, in double dirtyWidth, in double dirtyHeight);
|
751
820
|
};
|
752
821
|
|
753
822
|
interface CanvasGradient {
|
754
823
|
// opaque object
|
755
|
-
void addColorStop(in
|
824
|
+
void addColorStop(in double offset, in DOMString color);
|
756
825
|
};
|
757
826
|
|
758
827
|
interface CanvasPattern {
|
@@ -760,7 +829,7 @@ interface CanvasPattern {
|
|
760
829
|
};
|
761
830
|
|
762
831
|
interface TextMetrics {
|
763
|
-
readonly attribute
|
832
|
+
readonly attribute double width;
|
764
833
|
};
|
765
834
|
|
766
835
|
interface ImageData {
|
@@ -863,6 +932,7 @@ interface HTMLFormElement : HTMLElement {
|
|
863
932
|
attribute DOMString action;
|
864
933
|
attribute DOMString autocomplete;
|
865
934
|
attribute DOMString enctype;
|
935
|
+
attribute DOMString encoding;
|
866
936
|
attribute DOMString method;
|
867
937
|
attribute DOMString name;
|
868
938
|
attribute boolean noValidate;
|
@@ -870,15 +940,12 @@ interface HTMLFormElement : HTMLElement {
|
|
870
940
|
|
871
941
|
readonly attribute HTMLFormControlsCollection elements;
|
872
942
|
readonly attribute long length;
|
873
|
-
caller getter any
|
874
|
-
caller getter any
|
943
|
+
caller getter any (in unsigned long index);
|
944
|
+
caller getter any (in DOMString name);
|
875
945
|
|
876
946
|
void submit();
|
877
947
|
void reset();
|
878
948
|
boolean checkValidity();
|
879
|
-
|
880
|
-
void dispatchFormInput();
|
881
|
-
void dispatchFormChange();
|
882
949
|
};
|
883
950
|
|
884
951
|
interface HTMLFieldSetElement : HTMLElement {
|
@@ -914,6 +981,7 @@ interface HTMLInputElement : HTMLElement {
|
|
914
981
|
attribute boolean autofocus;
|
915
982
|
attribute boolean defaultChecked;
|
916
983
|
attribute boolean checked;
|
984
|
+
attribute DOMString dirName;
|
917
985
|
attribute boolean disabled;
|
918
986
|
readonly attribute HTMLFormElement form;
|
919
987
|
readonly attribute FileList files;
|
@@ -990,14 +1058,15 @@ interface HTMLSelectElement : HTMLElement {
|
|
990
1058
|
readonly attribute HTMLFormElement form;
|
991
1059
|
attribute boolean multiple;
|
992
1060
|
attribute DOMString name;
|
1061
|
+
attribute boolean required;
|
993
1062
|
attribute unsigned long size;
|
994
1063
|
|
995
1064
|
readonly attribute DOMString type;
|
996
1065
|
|
997
1066
|
readonly attribute HTMLOptionsCollection options;
|
998
1067
|
attribute unsigned long length;
|
999
|
-
|
1000
|
-
|
1068
|
+
getter any item(in unsigned long index);
|
1069
|
+
any namedItem(in DOMString name);
|
1001
1070
|
void add(in HTMLElement element, in optional HTMLElement before);
|
1002
1071
|
void add(in HTMLElement element, in long before);
|
1003
1072
|
void remove(in long index);
|
@@ -1044,6 +1113,7 @@ interface HTMLOptionElement : HTMLElement {
|
|
1044
1113
|
interface HTMLTextAreaElement : HTMLElement {
|
1045
1114
|
attribute boolean autofocus;
|
1046
1115
|
attribute unsigned long cols;
|
1116
|
+
attribute DOMString dirName;
|
1047
1117
|
attribute boolean disabled;
|
1048
1118
|
readonly attribute HTMLFormElement form;
|
1049
1119
|
attribute long maxLength;
|
@@ -1111,20 +1181,20 @@ interface HTMLOutputElement : HTMLElement {
|
|
1111
1181
|
};
|
1112
1182
|
|
1113
1183
|
interface HTMLProgressElement : HTMLElement {
|
1114
|
-
attribute
|
1115
|
-
attribute
|
1116
|
-
readonly attribute
|
1184
|
+
attribute double value;
|
1185
|
+
attribute double max;
|
1186
|
+
readonly attribute double position;
|
1117
1187
|
readonly attribute HTMLFormElement form;
|
1118
1188
|
readonly attribute NodeList labels;
|
1119
1189
|
};
|
1120
1190
|
|
1121
1191
|
interface HTMLMeterElement : HTMLElement {
|
1122
|
-
attribute
|
1123
|
-
attribute
|
1124
|
-
attribute
|
1125
|
-
attribute
|
1126
|
-
attribute
|
1127
|
-
attribute
|
1192
|
+
attribute double value;
|
1193
|
+
attribute double min;
|
1194
|
+
attribute double max;
|
1195
|
+
attribute double low;
|
1196
|
+
attribute double high;
|
1197
|
+
attribute double optimum;
|
1128
1198
|
readonly attribute HTMLFormElement form;
|
1129
1199
|
readonly attribute NodeList labels;
|
1130
1200
|
};
|
@@ -1159,62 +1229,18 @@ interface HTMLMenuElement : HTMLElement {
|
|
1159
1229
|
attribute DOMString label;
|
1160
1230
|
};
|
1161
1231
|
|
1162
|
-
|
1163
|
-
attribute DOMString type;
|
1164
|
-
readonly attribute any data;
|
1165
|
-
};
|
1166
|
-
|
1167
|
-
interface Stream {
|
1168
|
-
readonly attribute DOMString url;
|
1169
|
-
StreamRecorder record();
|
1170
|
-
};
|
1171
|
-
|
1172
|
-
interface StreamRecorder {
|
1173
|
-
File stop();
|
1174
|
-
};
|
1175
|
-
|
1176
|
-
[Constructor(in DOMString serverConfiguration)]
|
1177
|
-
interface ConnectionPeer {
|
1178
|
-
void sendText(in DOMString text);
|
1179
|
-
attribute Function ontext; // receiving
|
1180
|
-
|
1181
|
-
void sendBitmap(in HTMLImageElement image);
|
1182
|
-
attribute Function onbitmap; // receiving
|
1183
|
-
|
1184
|
-
void sendFile(in File file);
|
1185
|
-
attribute Function onfile; // receiving
|
1186
|
-
|
1187
|
-
void addStream(in Stream stream);
|
1188
|
-
void removeStream(in Stream stream);
|
1189
|
-
readonly attribute Stream[] localStreams;
|
1190
|
-
readonly attribute Stream[] remoteStreams;
|
1191
|
-
attribute Function onstream; // receiving
|
1192
|
-
|
1193
|
-
void getLocalConfiguration(in ConnectionPeerConfigurationCallback callback); // maybe this should be in the constructor
|
1194
|
-
void addRemoteConfiguration(in DOMString configuration);
|
1195
|
-
void close(); // disconnects and stops listening
|
1196
|
-
|
1197
|
-
attribute Function onconnect;
|
1198
|
-
attribute Function onerror;
|
1199
|
-
attribute Function ondisconnect;
|
1200
|
-
};
|
1201
|
-
|
1202
|
-
[Callback=FunctionOnly, NoInterfaceObject]
|
1203
|
-
interface ConnectionPeerConfigurationCallback {
|
1204
|
-
void handleEvent(in ConnectionPeer server, in DOMString configuration);
|
1205
|
-
};
|
1206
|
-
|
1207
|
-
[OverrideBuiltins, ReplaceableNamedProperties]
|
1232
|
+
[ReplaceableNamedProperties]
|
1208
1233
|
interface Window {
|
1209
1234
|
// the current browsing context
|
1210
1235
|
readonly attribute WindowProxy window;
|
1211
1236
|
readonly attribute WindowProxy self;
|
1212
1237
|
readonly attribute Document document;
|
1213
|
-
attribute DOMString name;
|
1238
|
+
attribute DOMString name;
|
1214
1239
|
[PutForwards=href] readonly attribute Location location;
|
1215
1240
|
readonly attribute History history;
|
1241
|
+
|
1216
1242
|
readonly attribute UndoManager undoManager;
|
1217
|
-
|
1243
|
+
|
1218
1244
|
[Replaceable] readonly attribute BarProp locationbar;
|
1219
1245
|
[Replaceable] readonly attribute BarProp menubar;
|
1220
1246
|
[Replaceable] readonly attribute BarProp personalbar;
|
@@ -1230,7 +1256,7 @@ interface Window {
|
|
1230
1256
|
[Replaceable] readonly attribute WindowProxy frames;
|
1231
1257
|
[Replaceable] readonly attribute unsigned long length;
|
1232
1258
|
readonly attribute WindowProxy top;
|
1233
|
-
|
1259
|
+
attribute WindowProxy opener;
|
1234
1260
|
readonly attribute WindowProxy parent;
|
1235
1261
|
readonly attribute Element frameElement;
|
1236
1262
|
WindowProxy open(in optional DOMString url, in optional DOMString target, in optional DOMString features, in optional DOMString replace);
|
@@ -1238,7 +1264,7 @@ interface Window {
|
|
1238
1264
|
getter any (in DOMString name);
|
1239
1265
|
|
1240
1266
|
// the user agent
|
1241
|
-
readonly attribute Navigator navigator;
|
1267
|
+
readonly attribute Navigator navigator;
|
1242
1268
|
readonly attribute ApplicationCache applicationCache;
|
1243
1269
|
|
1244
1270
|
// user prompts
|
@@ -1278,8 +1304,6 @@ interface Window {
|
|
1278
1304
|
attribute Function onended;
|
1279
1305
|
attribute Function onerror;
|
1280
1306
|
attribute Function onfocus;
|
1281
|
-
attribute Function onformchange;
|
1282
|
-
attribute Function onforminput;
|
1283
1307
|
attribute Function onhashchange;
|
1284
1308
|
attribute Function oninput;
|
1285
1309
|
attribute Function oninvalid;
|
@@ -1309,6 +1333,7 @@ interface Window {
|
|
1309
1333
|
attribute Function onratechange;
|
1310
1334
|
attribute Function onreadystatechange;
|
1311
1335
|
attribute Function onredo;
|
1336
|
+
attribute Function onreset;
|
1312
1337
|
attribute Function onresize;
|
1313
1338
|
attribute Function onscroll;
|
1314
1339
|
attribute Function onseeked;
|
@@ -1333,6 +1358,7 @@ interface BarProp {
|
|
1333
1358
|
|
1334
1359
|
interface History {
|
1335
1360
|
readonly attribute long length;
|
1361
|
+
readonly attribute any state;
|
1336
1362
|
void go(in optional long delta);
|
1337
1363
|
void back();
|
1338
1364
|
void forward();
|
@@ -1346,7 +1372,7 @@ interface Location {
|
|
1346
1372
|
void replace(in DOMString url);
|
1347
1373
|
void reload();
|
1348
1374
|
|
1349
|
-
// URL decomposition IDL attributes
|
1375
|
+
// URL decomposition IDL attributes
|
1350
1376
|
attribute DOMString protocol;
|
1351
1377
|
attribute DOMString host;
|
1352
1378
|
attribute DOMString hostname;
|
@@ -1365,14 +1391,14 @@ interface PopStateEvent : Event {
|
|
1365
1391
|
};
|
1366
1392
|
|
1367
1393
|
interface HashChangeEvent : Event {
|
1368
|
-
readonly attribute
|
1369
|
-
readonly attribute
|
1394
|
+
readonly attribute DOMString oldURL;
|
1395
|
+
readonly attribute DOMString newURL;
|
1370
1396
|
void initHashChangeEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString oldURLArg, in DOMString newURLArg);
|
1371
1397
|
};
|
1372
1398
|
|
1373
1399
|
interface PageTransitionEvent : Event {
|
1374
|
-
readonly attribute
|
1375
|
-
void initPageTransitionEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in
|
1400
|
+
readonly attribute boolean persisted;
|
1401
|
+
void initPageTransitionEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean persistedArg);
|
1376
1402
|
};
|
1377
1403
|
|
1378
1404
|
interface BeforeUnloadEvent : Event {
|
@@ -1406,11 +1432,23 @@ interface ApplicationCache {
|
|
1406
1432
|
};
|
1407
1433
|
ApplicationCache implements EventTarget;
|
1408
1434
|
|
1435
|
+
[Supplemental, NoInterfaceObject]
|
1436
|
+
interface NavigatorOnLine {
|
1437
|
+
readonly attribute boolean onLine;
|
1438
|
+
};
|
1439
|
+
|
1409
1440
|
[Callback=FunctionOnly, NoInterfaceObject]
|
1410
1441
|
interface Function {
|
1411
1442
|
any call(in any... arguments);
|
1412
1443
|
};
|
1413
1444
|
|
1445
|
+
[Supplemental, NoInterfaceObject]
|
1446
|
+
interface WindowBase64 {
|
1447
|
+
DOMString btoa(in DOMString btoa);
|
1448
|
+
DOMString atob(in DOMString atob);
|
1449
|
+
};
|
1450
|
+
Window implements WindowBase64;
|
1451
|
+
|
1414
1452
|
[Supplemental, NoInterfaceObject]
|
1415
1453
|
interface WindowTimers {
|
1416
1454
|
long setTimeout(in any handler, in optional any timeout, in any... args);
|
@@ -1420,7 +1458,7 @@ interface WindowTimers {
|
|
1420
1458
|
};
|
1421
1459
|
Window implements WindowTimers;
|
1422
1460
|
|
1423
|
-
[
|
1461
|
+
[NoInterfaceObject] interface WindowModal {
|
1424
1462
|
readonly attribute any dialogArguments;
|
1425
1463
|
attribute DOMString returnValue;
|
1426
1464
|
};
|
@@ -1430,7 +1468,8 @@ interface Navigator {
|
|
1430
1468
|
};
|
1431
1469
|
Navigator implements NavigatorID;
|
1432
1470
|
Navigator implements NavigatorOnLine;
|
1433
|
-
Navigator implements
|
1471
|
+
Navigator implements NavigatorContentUtils;
|
1472
|
+
Navigator implements NavigatorStorageUtils;
|
1434
1473
|
|
1435
1474
|
[Supplemental, NoInterfaceObject]
|
1436
1475
|
interface NavigatorID {
|
@@ -1441,55 +1480,60 @@ interface NavigatorID {
|
|
1441
1480
|
};
|
1442
1481
|
|
1443
1482
|
[Supplemental, NoInterfaceObject]
|
1444
|
-
interface
|
1445
|
-
readonly attribute boolean onLine;
|
1446
|
-
};
|
1447
|
-
|
1448
|
-
[Supplemental, NoInterfaceObject]
|
1449
|
-
interface NavigatorAbilities {
|
1483
|
+
interface NavigatorContentUtils {
|
1450
1484
|
// content handler registration
|
1451
1485
|
void registerProtocolHandler(in DOMString scheme, in DOMString url, in DOMString title);
|
1452
1486
|
void registerContentHandler(in DOMString mimeType, in DOMString url, in DOMString title);
|
1453
|
-
void yieldForStorageUpdates();
|
1454
1487
|
};
|
1455
1488
|
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
readonly attribute Node focusNode;
|
1460
|
-
readonly attribute long focusOffset;
|
1461
|
-
readonly attribute boolean isCollapsed;
|
1462
|
-
void collapse(in Node parentNode, in long offset);
|
1463
|
-
void collapseToStart();
|
1464
|
-
void collapseToEnd();
|
1465
|
-
void selectAllChildren(in Node parentNode);
|
1466
|
-
void deleteFromDocument();
|
1467
|
-
readonly attribute long rangeCount;
|
1468
|
-
Range getRangeAt(in long index);
|
1469
|
-
void addRange(in Range range);
|
1470
|
-
void removeRange(in Range range);
|
1471
|
-
void removeAllRanges();
|
1472
|
-
stringifier DOMString ();
|
1473
|
-
};
|
1474
|
-
|
1475
|
-
interface DragEvent : MouseEvent {
|
1476
|
-
readonly attribute DataTransfer dataTransfer;
|
1477
|
-
|
1478
|
-
void initDragEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dummyArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in DataTransfer dataTransferArg);
|
1489
|
+
[Supplemental, NoInterfaceObject]
|
1490
|
+
interface NavigatorStorageUtils {
|
1491
|
+
void yieldForStorageUpdates();
|
1479
1492
|
};
|
1480
1493
|
|
1481
1494
|
interface DataTransfer {
|
1482
1495
|
attribute DOMString dropEffect;
|
1483
1496
|
attribute DOMString effectAllowed;
|
1484
1497
|
|
1498
|
+
readonly attribute DataTransferItems items;
|
1499
|
+
|
1500
|
+
void setDragImage(in Element image, in long x, in long y);
|
1501
|
+
void addElement(in Element element);
|
1502
|
+
|
1503
|
+
/* old interface */
|
1485
1504
|
readonly attribute DOMStringList types;
|
1486
|
-
void clearData(in optional DOMString format);
|
1487
|
-
void setData(in DOMString format, in DOMString data);
|
1488
1505
|
DOMString getData(in DOMString format);
|
1506
|
+
void setData(in DOMString format, in DOMString data);
|
1507
|
+
void clearData(in optional DOMString format);
|
1489
1508
|
readonly attribute FileList files;
|
1509
|
+
};
|
1490
1510
|
|
1491
|
-
|
1492
|
-
|
1511
|
+
interface DataTransferItems {
|
1512
|
+
readonly attribute unsigned long length;
|
1513
|
+
getter DataTransferItem (in unsigned long index);
|
1514
|
+
deleter void (in unsigned long index);
|
1515
|
+
void clear();
|
1516
|
+
|
1517
|
+
DataTransferItem add(in DOMString data, in DOMString type);
|
1518
|
+
DataTransferItem add(in File data);
|
1519
|
+
};
|
1520
|
+
|
1521
|
+
interface DataTransferItem {
|
1522
|
+
readonly attribute DOMString kind;
|
1523
|
+
readonly attribute DOMString type;
|
1524
|
+
void getAsString(in FunctionStringCallback callback);
|
1525
|
+
File getAsFile();
|
1526
|
+
};
|
1527
|
+
|
1528
|
+
[Callback=FunctionOnly, NoInterfaceObject]
|
1529
|
+
interface FunctionStringCallback {
|
1530
|
+
void handleEvent(in DOMString data);
|
1531
|
+
};
|
1532
|
+
|
1533
|
+
interface DragEvent : MouseEvent {
|
1534
|
+
readonly attribute DataTransfer dataTransfer;
|
1535
|
+
|
1536
|
+
void initDragEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dummyArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in DataTransfer dataTransferArg);
|
1493
1537
|
};
|
1494
1538
|
|
1495
1539
|
interface UndoManager {
|
@@ -1507,6 +1551,100 @@ interface UndoManagerEvent : Event {
|
|
1507
1551
|
void initUndoManagerEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg);
|
1508
1552
|
};
|
1509
1553
|
|
1554
|
+
[Supplemental, NoInterfaceObject]
|
1555
|
+
interface NavigatorUserMedia {
|
1556
|
+
void getUserMedia(in DOMString options, in NavigatorUserMediaSuccessCallback successCallback, in optional NavigatorUserMediaErrorCallback errorCallback);
|
1557
|
+
};
|
1558
|
+
Navigator implements NavigatorUserMedia;
|
1559
|
+
|
1560
|
+
[Callback=FunctionOnly, NoInterfaceObject]
|
1561
|
+
interface NavigatorUserMediaSuccessCallback {
|
1562
|
+
void handleEvent(in GeneratedStream stream);
|
1563
|
+
};
|
1564
|
+
|
1565
|
+
[NoInterfaceObject]
|
1566
|
+
interface NavigatorUserMediaError {
|
1567
|
+
const unsigned short PERMISSION_DENIED = 1;
|
1568
|
+
readonly attribute unsigned short code;
|
1569
|
+
};
|
1570
|
+
|
1571
|
+
[Callback=FunctionOnly, NoInterfaceObject]
|
1572
|
+
interface NavigatorUserMediaErrorCallback {
|
1573
|
+
void handleEvent(in NavigatorUserMediaError error);
|
1574
|
+
};
|
1575
|
+
|
1576
|
+
interface Stream {
|
1577
|
+
readonly attribute DOMString label;
|
1578
|
+
StreamRecorder record();
|
1579
|
+
|
1580
|
+
const unsigned short LIVE = 1;
|
1581
|
+
const unsigned short ENDED = 2;
|
1582
|
+
readonly attribute unsigned short readyState;
|
1583
|
+
attribute Function onended;
|
1584
|
+
};
|
1585
|
+
Stream implements EventTarget;
|
1586
|
+
|
1587
|
+
interface GeneratedStream : Stream {
|
1588
|
+
void stop();
|
1589
|
+
|
1590
|
+
// track control
|
1591
|
+
readonly attribute MultipleTrackList audioTracks;
|
1592
|
+
readonly attribute ExclusiveTrackList videoTracks;
|
1593
|
+
};
|
1594
|
+
|
1595
|
+
interface StreamRecorder {
|
1596
|
+
void getRecordedData(in BlobCallback callback);
|
1597
|
+
};
|
1598
|
+
|
1599
|
+
[Callback=FunctionOnly, NoInterfaceObject]
|
1600
|
+
interface BlobCallback {
|
1601
|
+
void handleEvent(in Blob blob);
|
1602
|
+
};
|
1603
|
+
|
1604
|
+
[Supplemental]
|
1605
|
+
interface URL {
|
1606
|
+
static DOMString createObjectURL(in Stream stream);
|
1607
|
+
};
|
1608
|
+
|
1609
|
+
[Constructor(in DOMString configuration, in SignalingCallback signalingCallback)]
|
1610
|
+
interface PeerConnection {
|
1611
|
+
void signalingMessage(in DOMString message);
|
1612
|
+
|
1613
|
+
const unsigned short NEW = 0;
|
1614
|
+
const unsigned short NEGOTIATING = 1;
|
1615
|
+
const unsigned short ACTIVE = 2;
|
1616
|
+
const unsigned short CLOSED = 3;
|
1617
|
+
readonly attribute unsigned short readyState;
|
1618
|
+
|
1619
|
+
void send(in DOMString text);
|
1620
|
+
void addStream(in Stream stream);
|
1621
|
+
void removeStream(in Stream stream);
|
1622
|
+
readonly attribute Stream[] localStreams;
|
1623
|
+
readonly attribute Stream[] remoteStreams;
|
1624
|
+
|
1625
|
+
void close();
|
1626
|
+
|
1627
|
+
// connection quality information
|
1628
|
+
attribute Function onconnecting;
|
1629
|
+
attribute Function onopen;
|
1630
|
+
attribute Function onerror;
|
1631
|
+
attribute Function onclose;
|
1632
|
+
attribute Function onmessage;
|
1633
|
+
attribute Function onaddstream;
|
1634
|
+
attribute Function onremovestream;
|
1635
|
+
};
|
1636
|
+
PeerConnection implements EventTarget;
|
1637
|
+
|
1638
|
+
[Callback=FunctionOnly, NoInterfaceObject]
|
1639
|
+
interface SignalingCallback {
|
1640
|
+
void handleEvent(in DOMString message, in PeerConnection source);
|
1641
|
+
};
|
1642
|
+
|
1643
|
+
interface StreamEvent : Event {
|
1644
|
+
readonly attribute Stream stream;
|
1645
|
+
void initStreamEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in Stream streamArg);
|
1646
|
+
};
|
1647
|
+
|
1510
1648
|
interface MessageEvent : Event {
|
1511
1649
|
readonly attribute any data;
|
1512
1650
|
readonly attribute DOMString origin;
|
@@ -1543,7 +1681,7 @@ interface HTMLAppletElement : HTMLElement {
|
|
1543
1681
|
attribute DOMString height;
|
1544
1682
|
attribute unsigned long hspace;
|
1545
1683
|
attribute DOMString name;
|
1546
|
-
attribute DOMString _object; // the underscore is not part of the identifier
|
1684
|
+
attribute DOMString _object; // the underscore is not part of the identifier
|
1547
1685
|
attribute unsigned long vspace;
|
1548
1686
|
attribute DOMString width;
|
1549
1687
|
};
|
@@ -1557,7 +1695,7 @@ interface HTMLMarqueeElement : HTMLElement {
|
|
1557
1695
|
attribute long loop;
|
1558
1696
|
attribute unsigned long scrollAmount;
|
1559
1697
|
attribute unsigned long scrollDelay;
|
1560
|
-
attribute
|
1698
|
+
attribute boolean trueSpeed;
|
1561
1699
|
attribute unsigned long vspace;
|
1562
1700
|
attribute DOMString width;
|
1563
1701
|
|
@@ -1588,6 +1726,7 @@ interface HTMLFrameSetElement : HTMLElement {
|
|
1588
1726
|
attribute Function onpopstate;
|
1589
1727
|
attribute Function onredo;
|
1590
1728
|
attribute Function onresize;
|
1729
|
+
attribute Function onscroll;
|
1591
1730
|
attribute Function onstorage;
|
1592
1731
|
attribute Function onundo;
|
1593
1732
|
attribute Function onunload;
|
@@ -1603,6 +1742,7 @@ interface HTMLFrameElement : HTMLElement {
|
|
1603
1742
|
attribute DOMString scrolling;
|
1604
1743
|
attribute DOMString src;
|
1605
1744
|
readonly attribute Document contentDocument;
|
1745
|
+
readonly attribute WindowProxy contentWindow;
|
1606
1746
|
};
|
1607
1747
|
|
1608
1748
|
[Supplemental]
|
@@ -1622,7 +1762,7 @@ interface HTMLAreaElement {
|
|
1622
1762
|
interface HTMLBaseFontElement : HTMLElement {
|
1623
1763
|
attribute DOMString color;
|
1624
1764
|
attribute DOMString face;
|
1625
|
-
attribute long size;
|
1765
|
+
attribute long size;
|
1626
1766
|
};
|
1627
1767
|
|
1628
1768
|
[Supplemental]
|
@@ -1677,7 +1817,7 @@ interface HTMLEmbedElement {
|
|
1677
1817
|
interface HTMLFontElement : HTMLElement {
|
1678
1818
|
attribute DOMString color;
|
1679
1819
|
attribute DOMString face;
|
1680
|
-
attribute DOMString size;
|
1820
|
+
attribute DOMString size;
|
1681
1821
|
};
|
1682
1822
|
|
1683
1823
|
[Supplemental]
|
@@ -1769,7 +1909,6 @@ interface HTMLObjectElement {
|
|
1769
1909
|
[Supplemental]
|
1770
1910
|
interface HTMLOListElement {
|
1771
1911
|
attribute boolean compact;
|
1772
|
-
attribute DOMString type;
|
1773
1912
|
};
|
1774
1913
|
|
1775
1914
|
[Supplemental]
|
data/spec/parser_spec.rb
CHANGED
@@ -71,6 +71,14 @@ describe WebIDL::Parser::IDLParser do
|
|
71
71
|
parse(str).should_not be_nil
|
72
72
|
end
|
73
73
|
|
74
|
+
it "parses static types" do
|
75
|
+
str = <<-IDL
|
76
|
+
interface Bar { static DOMString createBar(); };
|
77
|
+
IDL
|
78
|
+
|
79
|
+
parse(str).should_not be_nil
|
80
|
+
end
|
81
|
+
|
74
82
|
it "parses the WebSocket interface idl" do
|
75
83
|
parse(fixture("websocket.idl")).should_not be_nil
|
76
84
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: webidl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.9
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jari Bakken
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-04-09 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: treetop
|
@@ -119,6 +118,7 @@ files:
|
|
119
118
|
- spec/fixtures/interface_with_inheritance.idl
|
120
119
|
- spec/fixtures/interface_with_members.idl
|
121
120
|
- spec/fixtures/interface_with_specials.idl
|
121
|
+
- spec/fixtures/interface_with_static_operation.idl
|
122
122
|
- spec/fixtures/interface_with_stringifiers.idl
|
123
123
|
- spec/fixtures/module_with_exception.idl
|
124
124
|
- spec/fixtures/module_with_implements_statement.idl
|
@@ -136,7 +136,6 @@ files:
|
|
136
136
|
- spec/spec_helper.rb
|
137
137
|
- support/webidl-spec-2010-08-05.html
|
138
138
|
- webidl.gemspec
|
139
|
-
has_rdoc: true
|
140
139
|
homepage: http://github.com/jarib/webidl
|
141
140
|
licenses: []
|
142
141
|
|
@@ -160,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
159
|
requirements: []
|
161
160
|
|
162
161
|
rubyforge_project: webidl
|
163
|
-
rubygems_version: 1.
|
162
|
+
rubygems_version: 1.7.2
|
164
163
|
signing_key:
|
165
164
|
specification_version: 3
|
166
165
|
summary: Ruby parser for WebIDL
|
@@ -175,6 +174,7 @@ test_files:
|
|
175
174
|
- spec/fixtures/interface_with_inheritance.idl
|
176
175
|
- spec/fixtures/interface_with_members.idl
|
177
176
|
- spec/fixtures/interface_with_specials.idl
|
177
|
+
- spec/fixtures/interface_with_static_operation.idl
|
178
178
|
- spec/fixtures/interface_with_stringifiers.idl
|
179
179
|
- spec/fixtures/module_with_exception.idl
|
180
180
|
- spec/fixtures/module_with_implements_statement.idl
|
@@ -190,3 +190,4 @@ test_files:
|
|
190
190
|
- spec/parser_spec.rb
|
191
191
|
- spec/spec.opts
|
192
192
|
- spec/spec_helper.rb
|
193
|
+
has_rdoc:
|