Anthony Ramine
3c56d2f5a7
Move handle_potential_webgl_error to the dom macros module
2018-04-04 13:12:41 +02:00
Simon Sapin
793bebfc0e
Upgrade to rustc 1.23.0-nightly (02004ef78 2017-11-08)
2017-11-09 16:56:39 +01:00
Simon Sapin
aa15dc269f
Remove use of unstable box syntax.
...
http://www.robohornet.org gives a score of 101.36 on master,
and 102.68 with this PR. The latter is slightly better,
but probably within noise level.
So it looks like this PR does not affect DOM performance.
This is expected since `Box::new` is defined as:
```rust
impl<T> Box<T> {
#[inline(always)]
pub fn new(x: T) -> Box<T> {
box x
}
}
```
With inlining, it should compile to the same as box syntax.
2017-10-16 17:16:20 +02:00
Anthony Ramine
71b015173f
Fix the form action IDL attributes
...
The returned string, if the attribute is present and non-empty,
should be a URL resolved against the element's document's base URL.
2017-10-11 13:56:10 +02:00
Anthony Ramine
605c679fee
Fix URL attributes
...
URL attributes should always use AttrValue::Url, and the input should be
resolved against the document's base URL at setting time always.
2017-10-11 13:56:07 +02:00
Anthony Ramine
f87c2a8d76
Rename Root<T> to DomRoot<T>
...
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
2017-09-26 09:49:10 +02:00
Anthony Ramine
0e3c54c191
Rename dom::bindings::js to dom::bindings::root
2017-09-26 02:19:05 +02:00
Fernando Jiménez Moreno
8412f5403a
User Timing API
2017-09-06 13:33:30 +02:00
Anthony Ramine
7875fea6cf
Use absolute paths in the event handlers macros
2017-09-01 11:54:09 +02:00
Imanol Fernandez
fe4ee6de2e
WebVR 1.1 spec compatibility
2017-07-05 22:38:29 +02:00
Jonathan Chan
a4cbbeef14
Have unsafe_no_jsmanaged_fields! macro take a type as argument rather than an ident.
...
We only write unsafe_no_jsmanaged_fields!(SomeType), and the
documentation says it is to be used for types.
2017-06-27 15:59:00 -07:00
Arseniy Ivanov
72ec00e0b5
Refactor some window_from_node calls based on feedback
2017-02-03 14:57:08 -05:00
Arseniy Ivanov
d23b34e243
Check for the presence of a window when working with event handlers forwarded to the window
2017-02-03 13:23:34 -05:00
Anthony Ramine
26ab0f82a8
Properly root the running animation list in a RootedVec
2016-12-12 10:47:55 -10:00
Anthony Ramine
535765907d
Introduce jsmanaged_array
2016-12-06 13:15:18 -10:00
Anthony Ramine
f20361179d
Remove generics from unsafe_no_jsmanaged_fields
2016-12-06 13:15:16 -10:00
Anthony Ramine
620a67ff14
Mark JSTraceable and its method as unsafe
2016-12-06 13:15:06 -10:00
Pu Xingyu
91f3d4f474
Remove redundant url clones
...
They are now redundant since now document.url() returns a struct rather
than a reference.
2016-11-18 12:39:22 +08:00
Simon Sapin
53b638c0e2
Update to string-cache 0.3
2016-11-03 16:23:05 +01:00
Corey Farwell
2944c8d964
Make make_enumerated_getter prettier again.
...
Fixes https://github.com/servo/servo/issues/4723 .
2016-10-12 23:00:07 -04:00
Keith Yeung
668163ec5c
Emit TransitionEnd events in the layout thread and process it in the script thread
2016-10-11 19:36:06 -07:00
Jake Goldsborough
ce249d9384
adding macro to return string or url,
...
using that macro with the form action,
making the form submit process use base url,
adding tests.
2016-09-27 09:33:11 -07:00
vrod
defaa5bee7
Implement HTMLLIElement#value
2016-07-28 21:07:21 -03:00
Eduard Burtescu
b79a7d468e
Use a stack guard and a macro for RootedVec instead of return_address.
2016-07-04 20:59:06 +03:00
Ms2ger
684510bc94
Stop re-exporting AttrValue.
2016-06-07 13:15:23 +02:00
Anthony Ramine
cdc7bca944
Move DOMString back to script
...
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +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
Josh Matthews
a80320e24e
Add event handlers for media-related events.
2016-05-03 18:05:22 -04:00
Simon Sapin
7932ab6ac2
Upgrade to rust-url 1.0 and hyper 0.9
2016-04-23 20:27:58 +02:00
Connor Brewster
3fd7634f54
webgl: finish, flush, detachShader, generateMipmap, Uniform1i
2016-04-02 12:31:47 -06:00
João Oliveira
b60d668908
use return value of invoking event handlers to cancel the event
2016-02-26 10:17:57 -05:00
Jeff Harrison
d4fe40089b
Add onresize handler to GlobalEventHandlers
...
Refs: https://github.com/servo/servo/issues/7996
Rebased: https://github.com/servo/servo/pull/8006
2016-01-29 18:22:52 -05:00
Lanza
cfc3500dbf
Implement HTMLDetailsElement. Fixes #9216
2016-01-20 16:15:37 +01:00
Corey Farwell
1a808219a8
Remove parsed attribute 'background' field on HTMLBodyElement
...
https://github.com/servo/servo/issues/7863
2016-01-02 16:54:38 -08:00
Josh Matthews
3ef39e1a30
Implement the onreset event handler.
2015-12-30 16:04:16 -05: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
Sam Gibson
9668500e97
Makes setting negative values to maxLength throw an IndexSize exception
2015-12-03 14:00:59 +11:00
Sam Gibson
2ba1750c40
Resolves long-running merge conflicts
2015-12-03 14:00:53 +11:00
Sam Gibson
eecdfdf6c1
Makes int_getter macro, and uses -1 as default maxlength instead of maxint
2015-12-03 14:00:52 +11:00
Eli Friedman
c02c0576c8
Compute attribute name atoms at compile-time.
2015-11-27 15:42:34 -08:00
Alan Jeffrey
3dec6edd10
Update string_cache to 0.2.
...
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
Alan Jeffrey
84bde75b42
Replaced DOMString constructor by conversion functions.
...
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
Josh Matthews
2340583e56
Differentiate between error and non-error event handlers per the spec.
2015-11-12 16:21:24 -05:00
bors-servo
cd6813ea39
Auto merge of #8434 - frewsxcv:dimension-attrvalue, r=eefriedman
...
Add Dimension member to AttrValue
Fixes #8417
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8434 )
<!-- Reviewable:end -->
2015-11-10 08:15:37 +05:30
Corey Farwell
71aa2392f8
Remove HTMLTableElement::width struct field
2015-11-09 20:35:29 -05:00
Corey Farwell
73314ab10c
Add Dimension member to AttrValue
...
Fixes #8417
2015-11-09 20:32:56 -05:00
Eli Friedman
4b68fc18c3
Move storage of bgcolor for <tr>
and <tbody>
.
2015-11-09 12:27:16 -08:00
Eli Friedman
0901e5bc97
Move storage of bgcolor attribute on <body>.
2015-11-08 17:29:49 -08:00
Ms2ger
6b75078503
Make DOMString a newtype around String, rather than a typedef.
...
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00
David Zbarsky
722aa86c89
Get rid of a bunch of explicit derefs
2015-11-03 19:51:46 -08:00