Commit graph

476 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
1509d87545 codegen: Test WebIDL sequence arguments 2016-01-12 18:25:47 +01:00
Corey Farwell
f72d153c8d Implement HTMLFormElement::Length 2016-01-10 14:44:13 -05:00
Corey Farwell
bff8947e43 Implement HTMLFormElement::Elements
Fixes #8566
2016-01-10 12:08:24 -05:00
Corey Farwell
8f35652f25 Update HTMLFormElement WebIDL to match spec
https://html.spec.whatwg.org/multipage/#htmlformelement
2016-01-08 20:38:56 -05:00
Corey Farwell
a1795a54d0 Update HTMLFieldSetElement WebIDL to match spec
https://github.com/whatwg/html/pull/413

https://html.spec.whatwg.org/multipage/#htmlfieldsetelement
2016-01-08 20:37:30 -05:00
Brandon Fairchild
fb0304cfdb Rename fire_simple_event_params to fire_event
Fixes #9180.
2016-01-07 13:49:49 -05:00
Keith Yeung
1d62db405e Implement EventSource and update test expectations 2016-01-05 21:47:43 -05:00
bors-servo
1b0053f8b1 Auto merge of #9136 - frewsxcv:htmlbodyelement-background, r=nox
HTMLBodyElement 'background' attribute improvements

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9136)
<!-- Reviewable:end -->
2016-01-03 11:00:49 +05:30
bors-servo
6844adbe2d Auto merge of #9082 - nikkisquared:websocket_bufferedamount, r=eefriedman
Updated WebSocket buffered_amount to match change to html specification

The size of WebSocket's buffered_amount was changed[1] after an issue I opened, which I found while working on WebSocket previously[2]. @jdm suggested I make a PR updating Servo reflecting this, and so I have! As always, I'd like to hear any feedback on anything I can do to improve this.

[1] https://github.com/whatwg/html/issues/296
[2] https://github.com/servo/servo/pull/8218#issuecomment-152021737 point 5)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9082)
<!-- Reviewable:end -->
2016-01-03 08:43:55 +05:30
Corey Farwell
9a1fd472ab Implement 'background' IDL attribute on <body> 2016-01-02 15:42:25 -08:00
Keith Yeung
7001583047 Refactor FormData code to match updated spec
Use Atoms instead of Strings as keys
2016-01-01 05:38:10 -08:00
Josh Matthews
3ef39e1a30 Implement the onreset event handler. 2015-12-30 16:04:16 -05:00
Nikki
20edf21352 updated websocket buffered_amount to be u64 instead of u32 2015-12-29 13:30:35 -07:00
Corey Farwell
ba659cb99c Implement non-zero dimension attribute parsing
Fixes #8445

The only attributes I found that we have implemented that uses non-zero
dimenion attributes:

* `width` for `<td>` and `<th>` (table cells)
* `width` for `<table>`

I updated these implementations to use the new non-zero dimension
attribute parsing and added associated regression tests.
2015-12-24 13:20:43 -08:00
bors-servo
df087cc6cf Auto merge of #9036 - KiChjang:document-charset, r=Ms2ger
Implement Document charset

Rebase of #7966.

Fixes #7718.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9036)
<!-- Reviewable:end -->
2015-12-21 22:05:02 +05:30
vectorijk
c559270b83 implement document charset
- pre-compute the adjusted encoding name

Fix build errors and update test expectations
2015-12-21 03:17:52 -08:00
bors-servo
9a4d82c314 Auto merge of #8863 - simartin:issue_8352, r=jdm
Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().

Fixes https://github.com/servo/servo/issues/8352

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8863)
<!-- Reviewable:end -->
2015-12-21 02:28:32 +05:30
k-cross
ae8d3f67c8 touchlist dom api #8225 2015-12-19 12:10:18 -08:00
Simon Martin
0d910bb934 Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert(). 2015-12-19 12:51:33 +01:00
bors-servo
6ba4ef22fa Auto merge of #8882 - GuillaumeGomez:dom_quad, r=nox
Add DOMQuad element

cc  @nox

Part of #8821

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8882)
<!-- Reviewable:end -->
2015-12-18 23:37:12 +05:30
Guillaume Gomez
823e1b96c3 Add DOMQuad element 2015-12-18 17:37:10 +01:00
bors-servo
8dc4b8dcb9 Auto merge of #8993 - nox:small-codegen-slimming, r=Ms2ger
Slightly reduce the output of codegen

Interfaces which we know are never instantiated can generate less code.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8993)
<!-- Reviewable:end -->
2015-12-18 06:35:15 +05:30
bors-servo
63923bc7c9 Auto merge of #8825 - jmr0:master, r=jdm
adding initial support for websocket subprotocol negotation

Addresses #8177

I also noticed some bugs/gaps (and at least one of my TODO's can be an E-Easy)

cc @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8825)
<!-- Reviewable:end -->
2015-12-18 05:23:15 +05:30
jmr0
7d0bede8ba adding initial support for websocket subprotocol negotation 2015-12-17 09:17:15 -05:00
bors-servo
d9bf1ba616 Auto merge of #8747 - KiChjang:form-interactive-validation, r=Manishearth
Implement basic framework for static and interactive validation on forms

This came along when I was trying to do #3648. I was about to do form validation as well, but then I saw it was actually intended to be a student project. Hopefully I didn't step on too many toes on this one; I did leave most of the important bits out (the fun bits I believe, e.g. interactive validation doesn't actually interactively validate anything right now).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8747)
<!-- Reviewable:end -->
2015-12-17 05:41:45 +05:30
David Zbarsky
6a72d4dd12 Implement WebGL scissor method 2015-12-15 20:43:38 -08:00
Keith Yeung
3395e54585 Implement basic framework for static and interactive validation on forms 2015-12-15 16:34:42 -08:00
Anthony Ramine
22d3213737 Mark CSS as [Abstract]
It is never instantiated.
2015-12-16 00:42:20 +01:00
Guillaume Gomez
14a22953dd Fix invalid returned value for dictionary types 2015-12-15 18:26:35 +01:00
bors-servo
6032f8225b Auto merge of #8963 - Aesthetikx:unforgeable-istrusted, r=jdm
Make Event's isTrusted attribute unforgeable

Three failure expectations were able to be removed from `tests/wpt/web-platform-tests/dom/interfaces.html`. This is my first commit to servo and my first time with rust, hopefully I didn't overlook anything.

Fixes #8956.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8963)
<!-- Reviewable:end -->
2015-12-14 17:43:15 +05:30
David Zbarsky
0f4d6d58aa Implement various WebGL functions 2015-12-13 17:39:20 -08:00
John DeSilva
f244a7075c Make Event's isTrusted attribute unforgeable 2015-12-13 12:27:05 -05:00
Jitendra Jain
88e6504e0a Implement responseXML API and document response type for XHR 2015-12-09 17:48:04 -05:00
David Zbarsky
789a90a82f Implement IsPointInPath 2015-12-05 17:49:49 -08:00
bors-servo
261ce11297 Auto merge of #8810 - frewsxcv:webidl-spec-link, r=eefriedman
Fix broken WebIDL spec link

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8810)
<!-- Reviewable:end -->
2015-12-04 07:15:46 +05:30
Corey Farwell
47d8c879d9 Fix broken WebIDL spec link 2015-12-03 18:44:30 -05:00
bors-servo
5ee6fe120d Auto merge of #8712 - simartin:issue_8462, r=ecoal95
Issue #8462: Add support for BufferSubData, CompressedTexImage2D and CompressedSubTexImage2D and reenable individual webgl WPT tests

Fixes https://github.com/servo/servo/issues/8462

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8712)
<!-- Reviewable:end -->
2015-12-04 01:07:14 +05:30
bors-servo
20df7fb7c8 Auto merge of #7988 - nox:unforgeable, r=jdm
Implement [Unforgeable]

This is mostly stolen from Gecko. As there, we define the unforgeable members
on an object stored in the slots of the prototype object. They are then copied
onto instance objects when they are instantiated. It should be noted that
proxy objects see their unforgeable memebers defined on their expando object.

Unforgeable attributes aren't properly inherited in codegen (in a similar
fashion as getters and setters as filed in #5875) and require to be redefined
in derived interfaces. Fortunately, there are currently no such interfaces.

No unforgeable members can be included into the TestBinding interfaces for good
measure because they are not compatible with setters.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7988)
<!-- Reviewable:end -->
2015-12-03 11:03:05 +05:30
Sam Gibson
9668500e97 Makes setting negative values to maxLength throw an IndexSize exception 2015-12-03 14:00:59 +11:00
Sam Gibson
d26c555e2a Adds support for input element's maxlength attr
servo/servo#7320
servo/servo#7004
2015-12-03 14:00:51 +11:00
Anthony Ramine
60976406cc Implement [Unforgeable]
This is mostly stolen from Gecko. As there, we define the unforgeable members
on an object stored in the slots of the prototype object. They are then copied
onto instance objects when they are instantiated. It should be noted that
proxy objects see their unforgeable memebers defined on their expando object.

Unforgeable attributes aren't properly inherited in codegen (in a similar
fashion as getters and setters as filed in #5875) and require to be redefined
in derived interfaces. Fortunately, there are currently no such interfaces.

No unforgeable members can be included into the TestBinding interfaces for good
measure because they are not compatible with setters.

Given the unforgeable holder object has the same prototype as actual instances
of the interface, the finalize hook needs to check its slot pointer for nullity
before dropping it.

The new failing test isn't related to Unforgeable attributes, but to the fact
that all Document instances currently have a Location, even if their window
isn't in a browsing context.
2015-12-02 22:15:11 +01:00
Simon Martin
f79e1521b2 Issue #8462: Add support for BufferSubData, CompressedTexImage2D and
CompressedSubTexImage2D and re-enable individual webgl WPT tests.
2015-12-01 20:40:42 +01:00
Corey Farwell
320263199f Implement attribute 'fgColor' on 'document'
The 'text' attribute was implemented on '<body>' in #7841
2015-11-30 18:19:07 -05:00
Jason Schein
ccb8d070ad Make OnErrorEventHandlerNonNull return 'any' instead of 'boolean'. 2015-11-29 00:10:32 -08:00
bors-servo
2d164f2beb Auto merge of #8729 - dzbarsky:canvas_webidl, r=dzbarsky
Update Canvas webIDL to spec

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8729)
<!-- Reviewable:end -->
2015-11-29 09:32:28 +05:30
David Zbarsky
ee3f7ad451 Update Canvas webIDL to spec 2015-11-28 20:03:48 -08:00
Corey Farwell
feb16463ef Add tracking issues for body/document attributes 2015-11-28 17:53:59 -05:00
Guillaume Gomez
adf8b359bb Add XMLDocument object 2015-11-27 14:55:41 +01:00
bors-servo
e7b1924948 Auto merge of #6826 - dzbarsky:deletecontents, r=jdm
Implement Range#deleteContents

Sadly calling ExtractContents and discarding the result doesn't do the right thing.
It may be worth having a CutContents method that takes an `Option<DocumentFragment>` and switch the behavior based on it, to share the code between DeleteContents and ExtractContents, like what Gecko does.  Maybe a followup.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6826)
<!-- Reviewable:end -->
2015-11-25 19:55:02 +05:30
David Zbarsky
25b7c9523c Implement Range#deleteContents 2015-11-25 00:02:25 -08:00