Commit graph

65 commits

Author SHA1 Message Date
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
Anthony Ramine
a8e4558e82 Implement URL and trivially missing URLUtils members
Fixes #6322.
2015-06-20 15:17:55 +02:00
Michael Wu
675267b782 Upgrade to SM 39 2015-06-19 18:42:48 -04:00
Jack Moffitt
07d95627ca Generate code into OUT_DIR.
This is necessary to ensure Cargo knows when to rebuild. Normally
.gitignore would be enough to exclude these from Cargo's freshness
calculation, but https://github.com/rust-lang/cargo/issues/1729 prevents
this currently. This is the new, correct way to do these thigns, just
like the style crate does.
2015-06-17 16:18:22 -06:00
ecoal95
b0d04765ae webgl: Add WebGLActiveInfo and WebGLShaderPrecisionFormat interfaces 2015-06-13 23:03:37 +02:00
Ms2ger
9ef975d929 Fix a typo in the DOM documentation. 2015-06-10 13:45:05 +02:00
bors-servo
44a4b7886d Auto merge of #6284 - fbau123:6242-testbinding-add-specialoperations, r=nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6284)
<!-- Reviewable:end -->
2015-06-09 17:12:43 -06:00
Francesc Bautista
4ada1e9421 added TestBindingProxy.webidl and testbindingproxy.rs files
added testbindingproxy to dom/mod.rs and fixed unused variable warning of testingbindingproxy.rs

removed useless GlobalField, removed brackets use statements with only 1 element and changed the description of TestBindingProxy.webidl

renamed reflector to reflector_ and removed unused import in testbinding.rs
2015-06-09 23:14:05 +02:00
ecoal95
9f94d39c9e Implement new WebGL interfaces and methods
This commit implements:
* WebGLFramebuffer
* WebGLRenderbuffer
* WebGLTexture

And adds the following methods to `WebGLRenderingContext`:
* create{Texture,Framebuffer,Renderbuffer}
* bind{Texture,Framebuffer,Renderbuffer}
* destroy{Buffer,Texture,Framebuffer,Renderbuffer}

Fixes:
* WebGLUniform location shouldn't inherit from WebGLObject.

Known Issues:
* WebGL objects have to be destroyed on drop, we may want to keep a reference to the context, or maybe a clone of the renderer to achieve this

Also refactors a huge part of the current implementation, to allow
failing on creation of different WebGL objects.

Blocked on https://github.com/servo/gleam/pull/22

A reftest for most of the added functionality is not doable right now,
we need a few more functions in order to upload a texture, for example.
2015-06-06 12:14:01 +02:00
William Galliher
5afec62f07 Implement incomplete opening, sending, and closing behaviour for WebSockets using rust-websocket.
Authors:
Shivaji Vidhale <savidhal@ncsu.edu>
William Galliher <wpgallih@ncsu.edu>
Allen Chen <achen4@ncsu.edu>
Rucha Jogaikar <rsjogaik@ncsu.edu>
2015-05-05 12:17:35 -04:00
Diego Marcos
79b8e7aa34 It implements enough WebGL spec to draw a triangle 2015-05-02 19:21:05 -07:00
Anthony Ramine
31a26fa384 Implement the CSS interface 2015-04-25 12:36:38 +02:00
Diego Marcos
c82485874d Kicks off a WebGL implementation 2015-04-20 14:29:39 -07:00
Keith Yeung
4e5ab24654 Implement TextDecoder (fixes #4769). 2015-04-08 16:52:59 +02:00