Commit graph

1070 commits

Author SHA1 Message Date
bors-servo
c7e8e5a927 auto merge of #2374 : Manishearth/servo/customevent, r=jdm
This was previously PR'd on #2218
2014-05-23 17:28:55 -04:00
Manish Goregaokar
4c997e8934 Implement CustomEvent (#2173) 2014-05-24 02:51:22 +05:30
Tetsuharu OHZEKI
46d31632e0 Initial spec-incompliant implementation of default click action for anchor elements.
This is cherry-picked from https://github.com/mozilla/servo/pull/1688:

  * Initial spec-incompliant implementation of default click action for anchor elements.
  * Add documentation; gut the new document URL loading method
    and move it all into the new Window method.
  * Add test for default event prevention.

Original developer: Josh Matthews <josh@joshmatthews.net>
2014-05-23 23:30:09 +09:00
Ms2ger
eaedeb07cb Update Rust. 2014-05-22 16:36:40 -06:00
Manish Goregaokar
114d2e3565 Fix some XHR warnings 2014-05-21 10:27:55 +05:30
bors-servo
28e3c17340 auto merge of #2442 : Manishearth/servo/xhr-async, r=jdm
(Note that only `getAllResponseHeaders()` is supported at the moment, I'll be adding the other header methods later.)
2014-05-20 12:16:35 -04:00
bors-servo
ca9396ff9c auto merge of #2434 : Ms2ger/servo/contentWindow, r=jdm 2014-05-20 11:43:46 -04:00
Manish Goregaokar
533fab46f9 Async XHR GET with basic response header support 2014-05-20 21:01:12 +05:30
Manish Goregaokar
7bcfaa603b Handle type parameter in ProgressEvent constructor (#2379) 2014-05-18 14:43:52 +05:30
bors-servo
3ea507f3ea auto merge of #2454 : Ms2ger/servo/codegen-tests-retvals, r=jdm 2014-05-16 11:55:48 -04:00
Ms2ger
ab8b62e28d Add tests for return values of interface methods. 2014-05-16 16:53:54 +02:00
bors-servo
58283527bf auto merge of #2452 : Ms2ger/servo/getDefaultRetval, r=jdm 2014-05-16 10:25:51 -04:00
Ms2ger
fcd98e1c0d Stop returning a default return value from getRetvalInfo.
This is now unused.
2014-05-16 12:10:57 +02:00
Ms2ger
7abbef8919 Remove getDefaultRetval.
getDefaultRetval was supposed to be used after throwing an exception on the
ErrorResult outparam in C++. However, as we throw exceptions through the
return value in Servo, we don't need it at all.
2014-05-16 12:00:59 +02:00
Glenn Watson
7cba2f1738 Remove unused imports for UnionTypes codegen. Fixes #2440. 2014-05-16 08:46:20 +10:00
Ms2ger
8182105204 Use JS_ObjectToOuterObject in wrap callbacks. 2014-05-15 20:58:51 +02:00
Cameron Zwarich
b8d423d931 Switch to using ContravariantLifetime in JSRef<'a, T>.
Since ContravariantLifetime doesn't take up any storage space, this
means that JSRef will be a single word. This fixes #2333.
2014-05-14 14:13:58 -07:00
Ms2ger
765cea73d9 Implement iframe.contentWindow. 2014-05-14 17:58:40 +02:00
Ms2ger
85285113e4 Instate a pre-wrap hook that outerizes its argument, to satisfy an undocumented JSAPI requirement. 2014-05-14 17:39:13 +02:00
Ms2ger
44fb9eb28f Avoid unnecessary Rc clone in Window::new. 2014-05-14 12:26:24 +02:00
bors-servo
288550a2bf auto merge of #2428 : zwarich/servo/remove-add-html-element, r=jdm
We can just use the defaults for all of the HTML elements for now and
deal with the nonstandard behavior later. This fixes #2207.
2014-05-14 01:25:13 -04:00
bors-servo
049fa56fff auto merge of #2425 : saneyuki/servo/window_helper, r=jdm
Fix #2418
2014-05-14 00:55:17 -04:00
Cameron Zwarich
a44e9e8e6c Remove addHTMLElement from Bindings.conf.
We can just use the defaults for all of the HTML elements for now and
deal with the nonstandard behavior later. This fixes #2207.
2014-05-13 21:40:36 -07:00
bors-servo
48b1938ca3 auto merge of #2394 : Ms2ger/servo/instantiateJSToNativeConversionTemplate, r=jdm
This moves all the handling of optional arguments into `CGArgumentConverter`, and leaves `instantiateJSToNativeConversionTemplate` to only deal with the declaration of stack variables.
2014-05-14 00:25:17 -04:00
Tetsuharu OHZEKI
facffe0966 Move Window helper methods to a WindowHelpers trait 2014-05-14 13:14:29 +09:00
Ms2ger
cb9d875aef Handle all attributes coming from the HTML parser (fixes #1976). 2014-05-13 12:28:15 +02:00
bors-servo
fbcfe78bf6 auto merge of #2388 : zwarich/servo/cssom, r=jdm
Implementing the CSSOM requires giving the script task access to the
computed style for a node. Moving it into a new SharedLayoutData struct
member of LayoutDataRef seems to be the best way to achieve this.

This is the first step towards #1721.
2014-05-12 16:46:10 -04:00
Ms2ger
d095c42eaf Move the loading of documents in iframes into HTMLIFrameElement.
Right now, the load is kicked off inside the parser glue. This is unfortunate
for several reasons:

1) we'd like to replace the current parser (libhubbub) by our own parser,
   written in Rust, so code intertwined with the parser will have to be
   rewritten;
2) it is impossible to support dynamically (i.e. from script) created iframes
   in this way;
3) the code flow around loading subdocuments is complicated needlessly.

This commit adds the constellation channel (on which the message to actually
load the document is sent) as a field on the Page, to allow HTMLIFrameElement
to access it.

In rewriting the code, support for dynamically created iframes is added, and
a task failure is avoided when the value of the src attribute can not be
parsed.
2014-05-12 21:21:03 +02:00
Ms2ger
ab5bf80447 Drop the pointless indirection in Window::active_timers. 2014-05-12 17:15:35 +02:00
Ms2ger
8e9e930e3d Remove unused and misnamed url field on HTMLIFrameElement. 2014-05-11 20:37:55 +02:00
Ms2ger
30fcf7ed61 Remove the isOptional argument and the dealWithOptional return value from getJSToNativeConversionTemplate.
Note that dictionaries currently don't support members without default values
right now.

This commit does not change the generated code.
2014-05-10 11:00:01 +02:00
Ms2ger
6ed924f515 Remove the argcAndIndex argument from instantiateJSToNativeConversionTemplate.
This commit does not change the generated code.
2014-05-10 10:50:10 +02:00
bors-servo
5334d8bb25 auto merge of #2384 : saneyuki/servo/2383, r=Ms2ger
Fix #2383

These changes introduce `FooEvent::new_uninitialized()` constructor. This constructor use to create `FooEvent` without calling `FooEvent::InitFooEvent`.

#2383 says integrating `FooEvent::new()` and `InitFooEvent`, but we need to preserve simple `FooEvent::new_uninitialized()` for `document.createEvent()`.

@jdm r?
2014-05-10 03:01:13 -04:00
Tetsuharu OHZEKI
5f8f551c95 Add MouseEvent::new_uninitialized(). 2014-05-10 13:56:46 +09:00
Tetsuharu OHZEKI
ac288f6657 Add UIEvent::new_uninitialized(). 2014-05-10 13:55:19 +09:00
Guro Bokum
04c807dd53 Convert as many of Page's RefCell fields to Cell as possible (fixes #1990). 2014-05-09 23:52:06 +02:00
Cameron Zwarich
0e67202bc2 Move the computed style to a new SharedLayoutData struct.
Implementing the CSSOM requires giving the script task access to the
computed style for a node. Moving it into a new SharedLayoutData struct
member of LayoutDataRef seems to be the best way to achieve this.

This is the first step towards #1721.
2014-05-09 13:22:50 -07:00
bors-servo
1477652295 auto merge of #2357 : Manishearth/servo/xhr-syncget, r=ms2ger
This gets a basic synchronous GET request working. I've also tried to implement a portion of the procedures mentioned in the spec.


Blocks #2282
2014-05-09 11:34:07 -04:00
Manish Goregaokar
b40d8b4d53 Basic synchronous GET with XHR 2014-05-09 20:39:54 +05:30
Ms2ger
30055d9820 Move debug functions to Window IDL.
This is a cleaner way to expose those functions, and makes it possible to
remove a significant amount code in rust-mozjs.

The assert() function is no longer exposed, as it was unused and not very
useful.
2014-05-09 14:44:07 +02:00
bors-servo
78a768ae5c auto merge of #2372 : mrobinson/servo/issue-1596, r=metajack
The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.
2014-05-08 20:16:21 -04:00
Martin Robinson
300004f3e9 Use == instead of match for tests against a single enum value
The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.
2014-05-08 17:11:00 -07:00
bors-servo
a28665d3fd auto merge of #2375 : zwarich/servo/progressevent-rename, r=metajack 2014-05-08 19:40:16 -04:00
Cameron Zwarich
d56a308524 Rename an unused parameter to silence a warning. 2014-05-08 16:31:14 -07:00
Cameron Zwarich
20fa4d7e11 Remove an unused field from CodegenRust.py.
The defaultVisibility field was cloned from the C++ implementation,
where it tracks the difference between struct and class visibility.
Since no similar concept exists in Rust, it should be removed.
2014-05-08 13:59:53 -07:00
Manish Goregaokar
2f376a1104 Add ProgressEvent interface 2014-05-08 20:41:51 +05:30
bors-servo
86a6de209e auto merge of #2346 : gsingh93/servo/master, r=jdm 2014-05-07 18:58:18 -04:00
Gulshan Singh
fb0c433b70 Add Performance object to Window and implement Performance::Now() 2014-05-07 17:30:33 -04:00
Ms2ger
0ab3444af9 Add support for DOMString in unions (fixes #2324). 2014-05-07 17:30:32 -04:00
Ms2ger
87008a5ae1 Remove unused zip_copies. 2014-05-07 12:29:26 +02:00