Commit graph

78 commits

Author SHA1 Message Date
Vladimir Vukicevic
5bbec7469d Native MSVC windows build, convert to cmake 2016-08-17 09:50:51 -04:00
Jeena Lee
fabe2b8f7e Implement the Request API for the Fetch API.
This commit adds new files related to implementing the [Request
API](https://fetch.spec.whatwg.org/#request-class). This commit also
changes the expected web platform tests results. It also modifies the
following files:

components/net_traits/request.rs
HeapSizeOf is implemented in net_traits/request so that dom::request can
be used as a wrapper around net_traits::request::Request.

components/script/dom/headers.rs
Several methods are added to Headers so that request can access and
modify some of the headers fields.
2016-08-12 15:39:40 -07:00
Zhen Zhang
47a7d465fd Add FileReaderSync skeleton 2016-07-31 09:19:39 +02:00
Connor Brewster
8d7a0c2cda Add History interface
implement go, forward, back
2016-07-22 14:07:51 -06:00
Jeena Lee
530b02790b Add the append method for the Headers API for the Fetch API
This commit will add the append method and associated helper functions, and introduce any necessary changes for it.
2016-07-19 13:40:31 -07:00
Emilio Cobos Álvarez
46c14aced2
webgl: Refactor texture validations to take advantage of rust type system
This commit introduces the `WebGLValidator` trait, and uses it for multiple
validations in the texture-related WebGL code, to move that logic out of the
already bloated `webglrenderingcontext.rs` file.

It also creates a type-safe wrapper for some WebGL types, removing all the
`unreachable!`s there, and introduces a macro for generating them conveniently.

This partially addresses #10693, pending refactor more code to use this
infrastructure, and (possibly?) introducing an `AsGLError` trait for the errors
to make the error handling happen in `WebGLContext`.
2016-06-25 00:03:15 +02:00
Rahul Sharma
15a2064c0d implement related sw interface and register method 2016-06-02 04:09:39 +05:30
Anthony Ramine
7e06fb0c8a Fix the doc on inheritance and casting 2016-05-21 16:08:47 +02:00
Piotr Stankiewicz
d1af39c114 dom: Add missing event handlers
Adding:
* global event handlers,
* window event handlers,
* document and element handlers,
* and support for BeforeUnloadEvent.

Signed-off-by: Piotr Stankiewicz <bionicrift@gmail.com>
2016-05-20 18:25:13 +01:00
Connor Brewster
11dd0d7c46 add popstateevent, hashchangeevent, pagetransitionevent 2016-05-11 22:11:46 -06:00
bors-servo
f9d9cd3aae Auto merge of #8454 - jdm:media, r=KiChjang
Implement basic <media> infrastructure

This gets us to the point where we can start playing with actually integrating rust-media to process the data received by the network request, as currently it's just ignored.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8454)
<!-- Reviewable:end -->
2016-05-03 16:42:46 -07:00
Josh Matthews
5960fbe604 Implement load, canPlayType, and error APIs for media elements. 2016-05-03 18:05:18 -04:00
Zhen Zhang
0385f60310 fix docs 2016-05-02 11:17:35 +08:00
Connor Brewster
e83d29a7eb Implemented stub for NavigatorPlugins 2016-04-11 09:14:46 -06:00
Paul Rouget
df6e7394d4 forcetouch events support
This enables Apple forcetouch DOM events. It requires the preference dom.forcetouch.enabled.

The DOM events are described here:
- https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

The Cocoa mechanism is documented here:
- 20000016-SW274
2016-04-05 18:42:28 +08:00
bors-servo
f335586ff5 Auto merge of #10292 - jdm:cssom, r=jdm
Initial steps for CSSOM

Squashed and rebased #10133.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10292)
<!-- Reviewable:end -->
2016-04-01 04:29:08 +05:30
Mohamed Albashir
b7a57ef487 Initial steps for CSSOM API 2016-03-31 18:17:30 -04:00
Sagar Muchhal
051ffba0e5 Implement initial pieces of form validation. 2016-03-24 09:07:38 -04:00
Attila Dusnoki
e7d70cfabf WebBluetooth API classes 2016-03-16 10:34:48 +01:00
Josh Matthews
bec25a1759 Fix some errors in the DOM documentation. 2016-02-27 11:22:26 -05:00
Paul Rouget
c7195cb456 Implement focus and blur events 2016-02-18 03:49:31 +01:00
Keith Yeung
9e3af70941 Implement RadioNodeList 2016-01-24 13:05:47 -05:00
Lanza
cfc3500dbf Implement HTMLDetailsElement. Fixes #9216 2016-01-20 16:15:37 +01:00
Keith Yeung
b4a0d5b857 Add instructions to update create.rs when adding new DOM interfaces 2016-01-13 13:53:54 -05:00
Corey Farwell
bff8947e43 Implement HTMLFormElement::Elements
Fixes #8566
2016-01-10 12:08:24 -05:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Keith Yeung
1d62db405e Implement EventSource and update test expectations 2016-01-05 21:47:43 -05:00
Guillaume Gomez
823e1b96c3 Add DOMQuad element 2015-12-18 17:37:10 +01:00
Ms2ger
b7b5c79787 Rename the browsercontext module. 2015-12-11 15:27:27 -05:00
Guillaume Gomez
adf8b359bb Add XMLDocument object 2015-11-27 14:55:41 +01:00
jsharda
dca4e3730b M1503 - Integrate XML parse -Initial Steps 2015-11-04 19:18:20 -05:00
rohan.prinja
9fd823e449 replace InheritTypes imports with inheritance imports 2015-10-30 20:26:30 +09:00
rohan.prinja
bb2536cd01 move Castable into dom::bindings::inheritance 2015-10-30 20:24:42 +09:00
Matt Brubeck
4ed15a8853 Add bindings for TouchEvent DOM interfaces 2015-10-22 10:35:11 -07:00
Anthony Ramine
d0e022b64e Document the new inheritance machinery (fixes #8125) 2015-10-21 13:12:45 +02:00
Anthony Ramine
68014af78e Clean up the cast calls 2015-10-21 11:40:34 +02:00
Anthony Ramine
13ea3ac413 Introduce trait Castable
This trait is used to hold onto the downcast and upcast functions of all
castable IDL interfaces. A castable IDL interface is one which either derives
from or is derived by other interfaces.

The deriving relation is represented by implementations of marker trait
DerivedFrom<T: Castable> generated in InheritTypes.

/^[ ]*use dom::bindings::codegen::InheritTypes::.*(Base|Cast|Derived)/ {
    /::[a-zA-Z]+(Base|Cast|Derived);/d
    s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g
    s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g
    s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g
    s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g
    /\{([a-zA-Z]+(Base|Cast|Derived))?\};$/d
    s/\{([a-zA-Z_]+)\};$/\1;/
}

s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.upcast::<\1>()/g
s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.upcast::<\1>()/g
s/\(([a-zA-Z]+)Cast::from_ref\)/\(Castable::upcast::<\1>\)/g

s/([a-zA-Z]+)Cast::from_root/Root::upcast::<\1>/g

s/([a-zA-Z]+)Cast::from_layout_js\(\&([a-zA-Z_.]+)\)/\2.upcast::<\1>()/g

s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.downcast::<\1>()/g
s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.downcast::<\1>()/g
s/\(([a-zA-Z]+)Cast::to_ref\)/\(Castable::downcast::<\1>\)/g

s/([a-zA-Z]+)Cast::to_root/Root::downcast::<\1>/g

s/([a-zA-Z]+)Cast::to_layout_js\(&?([a-zA-Z_.]+(\(\))?)\)/\2.downcast::<\1>()/g

s/\.is_document\(\)/.is::<Document>()/g
s/\.is_htmlanchorelement\(\)/.is::<HTMLAnchorElement>()/g
s/\.is_htmlappletelement\(\)/.is::<HTMLAppletElement>()/g
s/\.is_htmlareaelement\(\)/.is::<HTMLAreaElement>()/g
s/\.is_htmlbodyelement\(\)/.is::<HTMLBodyElement>()/g
s/\.is_htmlembedelement\(\)/.is::<HTMLEmbedElement>()/g
s/\.is_htmlfieldsetelement\(\)/.is::<HTMLFieldSetElement>()/g
s/\.is_htmlformelement\(\)/.is::<HTMLFormElement>()/g
s/\.is_htmlframesetelement\(\)/.is::<HTMLFrameSetElement>()/g
s/\.is_htmlhtmlelement\(\)/.is::<HTMLHtmlElement>()/g
s/\.is_htmlimageelement\(\)/.is::<HTMLImageElement>()/g
s/\.is_htmllegendelement\(\)/.is::<HTMLLegendElement>()/g
s/\.is_htmloptgroupelement\(\)/.is::<HTMLOptGroupElement>()/g
s/\.is_htmloptionelement\(\)/.is::<HTMLOptionElement>()/g
s/\.is_htmlscriptelement\(\)/.is::<HTMLScriptElement>()/g
s/\.is_htmltabledatacellelement\(\)/.is::<HTMLTableDataCellElement>()/g
s/\.is_htmltableheadercellelement\(\)/.is::<HTMLTableHeaderCellElement>()/g
s/\.is_htmltablerowelement\(\)/.is::<HTMLTableRowElement>()/g
s/\.is_htmltablesectionelement\(\)/.is::<HTMLTableSectionElement>()/g
s/\.is_htmltitleelement\(\)/.is::<HTMLTitleElement>()/g
2015-10-21 11:37:16 +02:00
Till Schneidereit
4c1c05fac6 Improve implementation of DOMRect and implement DOMRectReadOnly
Passes most tests from test-css.
2015-10-17 22:47:01 +02:00
Dongie Agnir
61fe89d0e1 Add newline so code sample is parsed correctly. 2015-10-12 18:01:56 -10:00
Corey Farwell
4dc8fd76ec Consolidate magic number representing max unsigned long 2015-10-10 13:46:11 -04:00
Emilio Cobos Álvarez
7030f09823 webgl: Implement WebGLContextEvent and use it on context creation error
spec: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15
2015-10-08 00:29:31 +02:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Hugo Thiessard
6565e7b02f Issue #7390 correct the order of mod declaration 2015-09-18 22:02:04 +02:00
bors-servo
da0b9d7c01 Auto merge of #7337 - wilmoz:InheritanceDocumentation, r=mbrubeck
Documentation of inheritance in type ids

Aditional documentation about this issue https://github.com/servo/servo/issues/7205

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7337)
<!-- Reviewable:end -->
2015-09-04 21:18:52 -06:00
wilmoz
1830ada4bc Documentation of inheritance in type ids 2015-09-01 21:34:35 -05:00
Anthony Ramine
aa83643507 Remove reference to helper traits from documentation 2015-08-27 16:59:04 +02:00
Bogdan Cuza
8bc66f97f8 Implement the FileList interface. Fixes #6708 2015-08-01 19:31:20 +02:00
farodin91
27e760e28d Implement FileReader.{readAsText,readAsDataUrl}. Fixes #6172 2015-07-23 22:33:51 +02:00
Till Schneidereit
b692187ca2 Implement DOMPoint and DOMPointReadOnly
Passes some but not all WPT tests. One failure is caused by an issue in codegen for the `DOMPointInit` dictionary, the others by outdated tests: Gecko implements an old version of the spec that overloaded the `DOMPoint` constructor to optionally take an object as the first argument, and made `DOMPointReadOnly` non-constructible.
2015-07-23 19:09:36 +02:00
Tim Taubert
92874a89d2 Implement window.crypto.getRandomValues() 2015-07-03 18:34:00 +02:00